From 0b177b4185f3e0d30ae2f269e847292815af37ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20Jaffr=C3=A9?= Date: Sat, 30 Dec 2017 19:58:37 +0100 Subject: [PATCH 1/6] Remove a test blocking the update of the `log` crate It tested #44953. `log` macros in newer versions are no longer recursive, so these duplicated error messages (about unstable feature uses) previously occurring at each level of recursion are no longer possible, even with the fix by #45540. Furthermore this test breaks when multiple versions of `log` are in the sysroot (`log 0.3.9` depends on`log 0.4.1`) --- .../ui-fulldeps/issue-44953/issue-44953.rs | 20 ------------------- .../issue-44953/issue-44953.stderr | 19 ------------------ 2 files changed, 39 deletions(-) delete mode 100644 src/test/ui-fulldeps/issue-44953/issue-44953.rs delete mode 100644 src/test/ui-fulldeps/issue-44953/issue-44953.stderr diff --git a/src/test/ui-fulldeps/issue-44953/issue-44953.rs b/src/test/ui-fulldeps/issue-44953/issue-44953.rs deleted file mode 100644 index de798e2cf0baa..0000000000000 --- a/src/test/ui-fulldeps/issue-44953/issue-44953.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. -// - - -#![feature(proc_macro)] -#![allow(unused_macros)] - -#[macro_use] extern crate log; //~ ERROR use of unstable library feature - -pub fn main() { - info!("This is a log message."); -} diff --git a/src/test/ui-fulldeps/issue-44953/issue-44953.stderr b/src/test/ui-fulldeps/issue-44953/issue-44953.stderr deleted file mode 100644 index e0e96ec3f4fca..0000000000000 --- a/src/test/ui-fulldeps/issue-44953/issue-44953.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) - --> $DIR/issue-44953.rs:16:14 - | -16 | #[macro_use] extern crate log; //~ ERROR use of unstable library feature - | ^^^^^^^^^^^^^^^^^ - | - = help: add #![feature(rustc_private)] to the crate attributes to enable - -error: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) - --> $DIR/issue-44953.rs:19:5 - | -19 | info!("This is a log message."); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: add #![feature(rustc_private)] to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: aborting due to 2 previous errors - From 8ed13d643a62cda3f94233bde933efbcba0be17f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20Jaffr=C3=A9?= Date: Fri, 29 Dec 2017 11:24:38 +0100 Subject: [PATCH 2/6] Update crates and submodules to pull doc fixes Update `rand` crate to `0.3.19`. Update `log` crate to `0.3.9` and `0.4.1`. Update `parking_lot_core` crate to `0.2.9`. Upgrade all flate2 dependencies to `1.0.1`. - Update `rust-installer` submodule. --- src/Cargo.lock | 156 ++++++++++++------------ src/librustc/Cargo.toml | 2 +- src/librustc_metadata/Cargo.toml | 2 +- src/librustc_trans/Cargo.toml | 2 +- src/librustc_trans/back/bytecode.rs | 2 +- src/librustc_trans/base.rs | 2 +- src/librustc_trans_utils/Cargo.toml | 2 +- src/librustc_trans_utils/trans_crate.rs | 2 +- src/tools/rust-installer | 2 +- 9 files changed, 86 insertions(+), 86 deletions(-) diff --git a/src/Cargo.lock b/src/Cargo.lock index 14cc1d4ec4965..52bfa2ab1090e 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -28,7 +28,7 @@ name = "alloc" version = "0.0.0" dependencies = [ "core 0.0.0", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "std_unicode 0.0.0", ] @@ -198,7 +198,7 @@ dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "psapi-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -250,7 +250,7 @@ dependencies = [ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -373,7 +373,7 @@ dependencies = [ "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -389,7 +389,7 @@ dependencies = [ "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -600,7 +600,7 @@ name = "env_logger" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -609,7 +609,7 @@ name = "env_logger" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -677,15 +677,6 @@ version = "0.1.0" name = "find_impls" version = "0.1.0" -[[package]] -name = "flate2" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "flate2" version = "1.0.1" @@ -729,19 +720,17 @@ dependencies = [ [[package]] name = "fuchsia-zircon" -version = "0.2.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fuchsia-zircon-sys" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "futf" @@ -782,7 +771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -798,7 +787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -822,7 +811,7 @@ version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -860,7 +849,7 @@ name = "html5ever" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "markup5ever 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -890,7 +879,7 @@ dependencies = [ "crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -915,7 +904,7 @@ version = "0.0.0" dependencies = [ "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -943,7 +932,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -957,7 +946,7 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1067,8 +1056,19 @@ version = "0.1.0" [[package]] name = "log" -version = "0.3.8" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "log_settings" @@ -1122,7 +1122,7 @@ dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "handlebars 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1240,7 +1240,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1369,17 +1369,17 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1417,7 +1417,7 @@ version = "0.7.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1510,7 +1510,7 @@ dependencies = [ "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_syntax 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1527,10 +1527,10 @@ dependencies = [ [[package]] name = "rand" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1552,7 +1552,7 @@ dependencies = [ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1629,7 +1629,7 @@ dependencies = [ "jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "languageserver-types 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "racer 2.0.12 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-analysis 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1650,7 +1650,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "derive-new 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "radix_trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rls-data 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1708,11 +1708,11 @@ dependencies = [ "backtrace 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "fmt_macros 0.0.0", "graphviz 0.0.0", "jobserver 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_apfloat 0.0.0", "rustc_back 0.0.0", "rustc_const_math 0.0.0", @@ -1774,8 +1774,8 @@ dependencies = [ name = "rustc_back" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "serialize 0.0.0", "syntax 0.0.0", ] @@ -1794,7 +1794,7 @@ name = "rustc_borrowck" version = "0.0.0" dependencies = [ "graphviz 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_errors 0.0.0", "rustc_mir 0.0.0", @@ -1807,7 +1807,7 @@ name = "rustc_const_eval" version = "0.0.0" dependencies = [ "arena 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", @@ -1837,9 +1837,9 @@ name = "rustc_data_structures" version = "0.0.0" dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "serialize 0.0.0", "stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1852,7 +1852,7 @@ dependencies = [ "arena 0.0.0", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "graphviz 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_allocator 0.0.0", "rustc_back 0.0.0", @@ -1893,8 +1893,8 @@ name = "rustc_incremental" version = "0.0.0" dependencies = [ "graphviz 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_data_structures 0.0.0", "serialize 0.0.0", @@ -1906,7 +1906,7 @@ dependencies = [ name = "rustc_lint" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_const_eval 0.0.0", "syntax 0.0.0", @@ -1938,8 +1938,8 @@ dependencies = [ name = "rustc_metadata" version = "0.0.0" dependencies = [ - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "proc_macro 0.0.0", "rustc 0.0.0", "rustc_back 0.0.0", @@ -1958,7 +1958,7 @@ dependencies = [ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "graphviz 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_apfloat 0.0.0", @@ -1988,7 +1988,7 @@ dependencies = [ name = "rustc_passes" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_const_eval 0.0.0", "rustc_const_math 0.0.0", @@ -2027,7 +2027,7 @@ name = "rustc_resolve" version = "0.0.0" dependencies = [ "arena 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", @@ -2039,7 +2039,7 @@ dependencies = [ name = "rustc_save_analysis" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rls-data 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", @@ -2056,9 +2056,9 @@ version = "0.0.0" dependencies = [ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "jobserver 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2085,8 +2085,8 @@ name = "rustc_trans_utils" version = "0.0.0" dependencies = [ "ar 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_back 0.0.0", "rustc_data_structures 0.0.0", @@ -2111,7 +2111,7 @@ version = "0.0.0" dependencies = [ "arena 0.0.0", "fmt_macros 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", @@ -2150,7 +2150,7 @@ dependencies = [ "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2330,7 +2330,7 @@ dependencies = [ "panic_abort 0.0.0", "panic_unwind 0.0.0", "profiler_builtins 0.0.0", - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_asan 0.0.0", "rustc_lsan 0.0.0", "rustc_msan 0.0.0", @@ -2413,7 +2413,7 @@ name = "syntax" version = "0.0.0" dependencies = [ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_cratesio_shim 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", @@ -2447,7 +2447,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2469,7 +2469,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2493,7 +2493,7 @@ name = "tempdir" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2837,14 +2837,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82" "checksum failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cdda555bb90c9bb67a3b670a0f42de8e73f5981524123ad8578aafec8ddb8b" "checksum filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "aa75ec8f7927063335a9583e7fa87b0110bb888cf766dc01b54c0ff70d760c8e" -"checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" "checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866" -"checksum fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0581a4e363262e52b87f59ee2afe3415361c6ec35e665924eb08afe8ff159" -"checksum fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "43f3795b4bae048dc6123a6b972cadde2e676f9ded08aef6bb77f5f157684a82" +"checksum fuchsia-zircon 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bd510087c325af53ba24f3be8f1c081b0982319adcb8b03cad764512923ccc19" +"checksum fuchsia-zircon-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "08b3a6f13ad6b96572b53ce7af74543132f1a7055ccceb6d073dd36c54481859" "checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3" "checksum futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "118b49cac82e04121117cbd3121ede3147e885627d82c4546b87c702debb90c1" "checksum getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "65922871abd2f101a2eb0eaebadc66668e54a87ad9c3dd82520b5f86ede5eff9" @@ -2876,7 +2875,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "82fc20bd8beefe7c9f98aae2d3cff78e57f544cdd83d58fe181ec37a5fbe0c77" "checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75" "checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16" -"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b" +"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" "checksum log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d382732ea0fbc09790c4899db3255bdea0fc78b54bf234bd18a63bb603915b6" "checksum lzma-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c1b93b78f89e8737dac81837fc8f5521ac162abcba902e1a3db949d55346d1da" "checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" @@ -2906,7 +2906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum os_pipe 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "998bfbb3042e715190fe2a41abfa047d7e8cb81374d2977d7f100eacd8619cb1" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3e7f7c9857874e54afeb950eebeae662b1e51a2493666d2ea4c0a5d91dcf0412" -"checksum parking_lot_core 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "12d20aac4f67aa75f681aded784bac91f910ba3f2af1812573cdcf687414e122" +"checksum parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6bf05dc61189828dfd7a59fd6e66d538e88d6b30390da1124a291e09fd3098b3" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8" "checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" @@ -2924,7 +2924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum racer 2.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "034f1c4528581c40a60e96875467c03315868084e08ff4ceb46a00f7be3b16b4" "checksum radix_trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "211c49b6a9995cac0fd1dd9ca60b42cf3a51e151a12eb954b3a9e75513426ee8" -"checksum rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6475140dfd8655aeb72e1fd4b7a1cc1c202be65d71669476e392fe62532b9edd" +"checksum rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "9e7944d95d25ace8f377da3ac7068ce517e4c646754c43a1b1849177bbf72e59" "checksum rayon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed02d09394c94ffbdfdc755ad62a132e94c3224a8354e78a1200ced34df12edf" "checksum rayon-core 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e64b609139d83da75902f88fd6c01820046840a18471e4dfcd5ac7c0f46bea53" "checksum redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "ab105df655884ede59d45b7070c8a65002d921461ee813a024558ca16030eea0" diff --git a/src/librustc/Cargo.toml b/src/librustc/Cargo.toml index 3a4b30294db74..9dad3c2031d40 100644 --- a/src/librustc/Cargo.toml +++ b/src/librustc/Cargo.toml @@ -54,4 +54,4 @@ byteorder = { version = "1.1", features = ["i128"]} # tl;dr; this is not needed to get `rustc` to compile, but if you remove it then # later crate stop compiling. If you can remove this and everything # compiles, then please feel free to do so! -flate2 = "0.2" +flate2 = "1.0" diff --git a/src/librustc_metadata/Cargo.toml b/src/librustc_metadata/Cargo.toml index 3d61bc102e251..45f5e9feaf888 100644 --- a/src/librustc_metadata/Cargo.toml +++ b/src/librustc_metadata/Cargo.toml @@ -9,7 +9,7 @@ path = "lib.rs" crate-type = ["dylib"] [dependencies] -flate2 = "0.2" +flate2 = "1.0" log = "0.3" proc_macro = { path = "../libproc_macro" } rustc = { path = "../librustc" } diff --git a/src/librustc_trans/Cargo.toml b/src/librustc_trans/Cargo.toml index f1549d9842154..7b242d2b867b6 100644 --- a/src/librustc_trans/Cargo.toml +++ b/src/librustc_trans/Cargo.toml @@ -11,7 +11,7 @@ test = false [dependencies] bitflags = "1.0" -flate2 = "0.2" +flate2 = "1.0" jobserver = "0.1.5" log = "0.3" num_cpus = "1.0" diff --git a/src/librustc_trans/back/bytecode.rs b/src/librustc_trans/back/bytecode.rs index 55c96322a95c0..9e4630c08f9f8 100644 --- a/src/librustc_trans/back/bytecode.rs +++ b/src/librustc_trans/back/bytecode.rs @@ -74,7 +74,7 @@ pub fn encode(identifier: &str, bytecode: &[u8]) -> Vec { encoded.extend_from_slice(&[0, 0, 0, 0, 0, 0, 0, 0]); let before = encoded.len(); - DeflateEncoder::new(&mut encoded, Compression::Fast) + DeflateEncoder::new(&mut encoded, Compression::fast()) .write_all(bytecode) .unwrap(); let after = encoded.len(); diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs index 680821d6d681e..7c8479d1a0c3f 100644 --- a/src/librustc_trans/base.rs +++ b/src/librustc_trans/base.rs @@ -651,7 +651,7 @@ fn write_metadata<'a, 'gcx>(tcx: TyCtxt<'a, 'gcx, 'gcx>, assert!(kind == MetadataKind::Compressed); let mut compressed = tcx.metadata_encoding_version(); - DeflateEncoder::new(&mut compressed, Compression::Fast) + DeflateEncoder::new(&mut compressed, Compression::fast()) .write_all(&metadata.raw_data).unwrap(); let llmeta = C_bytes_in_context(metadata_llcx, &compressed); diff --git a/src/librustc_trans_utils/Cargo.toml b/src/librustc_trans_utils/Cargo.toml index cab44778baabe..83f06bff33441 100644 --- a/src/librustc_trans_utils/Cargo.toml +++ b/src/librustc_trans_utils/Cargo.toml @@ -11,7 +11,7 @@ test = false [dependencies] ar = "0.3.0" -flate2 = "0.2" +flate2 = "1.0" log = "0.3" syntax = { path = "../libsyntax" } diff --git a/src/librustc_trans_utils/trans_crate.rs b/src/librustc_trans_utils/trans_crate.rs index 122914fa40b52..47143893e59e2 100644 --- a/src/librustc_trans_utils/trans_crate.rs +++ b/src/librustc_trans_utils/trans_crate.rs @@ -225,7 +225,7 @@ impl TransCrate for MetadataOnlyTransCrate { out_filename(sess, crate_type, &outputs, &trans.0.crate_name.as_str()); let mut compressed = trans.0.metadata_version.clone(); let metadata = if crate_type == CrateType::CrateTypeDylib { - DeflateEncoder::new(&mut compressed, Compression::Fast) + DeflateEncoder::new(&mut compressed, Compression::fast()) .write_all(&trans.0.metadata.raw_data) .unwrap(); &compressed diff --git a/src/tools/rust-installer b/src/tools/rust-installer index 0ddd53c4bc2a7..745a020e924c0 160000 --- a/src/tools/rust-installer +++ b/src/tools/rust-installer @@ -1 +1 @@ -Subproject commit 0ddd53c4bc2a76df565a1c1fc0cc6f19f254b51e +Subproject commit 745a020e924c0532b01e8f017ed72820913642ee From 7249539de93eae54a3873bdc35732ade408dc27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20Jaffr=C3=A9?= Date: Sun, 31 Dec 2017 17:08:04 +0100 Subject: [PATCH 3/6] Fix broken links in internal docs --- src/librustc/dep_graph/graph.rs | 6 +++--- src/librustc/hir/mod.rs | 4 +++- src/librustc/mir/mod.rs | 4 +++- src/librustc/ty/context.rs | 6 ++++-- src/librustc/ty/sty.rs | 6 ++---- src/librustc_plugin/lib.rs | 2 +- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs index 7acb466e9f38b..3816bbc1a3378 100644 --- a/src/librustc/dep_graph/graph.rs +++ b/src/librustc/dep_graph/graph.rs @@ -158,8 +158,8 @@ impl DepGraph { /// what state they have access to. In particular, we want to /// prevent implicit 'leaks' of tracked state into the task (which /// could then be read without generating correct edges in the - /// dep-graph -- see the [README] for more details on the - /// dep-graph). To this end, the task function gets exactly two + /// dep-graph -- see the module-level [README] for more details on + /// the dep-graph). To this end, the task function gets exactly two /// pieces of state: the context `cx` and an argument `arg`. Both /// of these bits of state must be of some type that implements /// `DepGraphSafe` and hence does not leak. @@ -178,7 +178,7 @@ impl DepGraph { /// - If you need 3+ arguments, use a tuple for the /// `arg` parameter. /// - /// [README]: README.md + /// [README]: https://github.com/rust-lang/rust/blob/master/src/librustc/dep_graph/README.md pub fn with_task(&self, key: DepNode, cx: C, diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index 9ab3b5ca15e70..7d3699b35eb23 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -588,7 +588,9 @@ pub type CrateConfig = HirVec>; /// The top-level data structure that stores the entire contents of /// the crate currently being compiled. /// -/// For more details, see [the module-level README](README.md). +/// For more details, see the module-level [README]. +/// +/// [README]: https://github.com/rust-lang/rust/blob/master/src/librustc/hir/README.md. #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Debug)] pub struct Crate { pub module: Mod, diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index 68f8098709c43..c52be9caa4f91 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -8,7 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! MIR datatypes and passes. See [the README](README.md) for details. +//! MIR datatypes and passes. See the module-level [README] for details. +//! +//! [README]: https://github.com/rust-lang/rust/blob/master/src/librustc/mir/README.md use graphviz::IntoCow; use middle::const_val::ConstVal; diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index b233156cf7fc6..e21eb8bbf8ad2 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -778,8 +778,10 @@ impl<'tcx> CommonTypes<'tcx> { /// The central data structure of the compiler. It stores references /// to the various **arenas** and also houses the results of the -/// various **compiler queries** that have been performed. See [the -/// README](README.md) for more deatils. +/// various **compiler queries** that have been performed. See the +/// module-level [README] for more details. +/// +/// [README]: https://github.com/rust-lang/rust/blob/master/src/librustc/ty/README.md #[derive(Copy, Clone)] pub struct TyCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> { gcx: &'a GlobalCtxt<'gcx>, diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 02729c6d60084..04477b82f29bd 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -1647,10 +1647,8 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> { /// /// Note that during type checking, we use an inference variable /// to represent the closure kind, because it has not yet been - /// inferred. Once [upvar inference] is complete, that type varibale - /// will be unified. - /// - /// [upvar inference]: src/librustc_typeck/check/upvar.rs + /// inferred. Once upvar inference (in `src/librustc_typeck/check/upvar.rs`) + /// is complete, that type variable will be unified. pub fn to_opt_closure_kind(&self) -> Option { match self.sty { TyInt(int_ty) => match int_ty { diff --git a/src/librustc_plugin/lib.rs b/src/librustc_plugin/lib.rs index 3df56c4e728ca..c0f830f1fbe2e 100644 --- a/src/librustc_plugin/lib.rs +++ b/src/librustc_plugin/lib.rs @@ -57,7 +57,7 @@ //! #![plugin(myplugin)] //! ``` //! -//! See the [`plugin` feature](../../unstable-book/language-features/plugin.html) of +//! See the [`plugin` feature](../unstable-book/language-features/plugin.html) of //! the Unstable Book for more examples. #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", From 8395798d1aa33bb6ee74d05825bb775a75a9b70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20Jaffr=C3=A9?= Date: Fri, 29 Dec 2017 11:31:13 +0100 Subject: [PATCH 4/6] Ignore remaining broken links caused by rustdoc bugs As pointed out by @ollie27. --- src/tools/linkchecker/main.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs index 3b0925d3ef6a4..469525ae7386f 100644 --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -132,7 +132,16 @@ fn check(cache: &mut Cache, // Unfortunately we're not 100% full of valid links today to we need a few // whitelists to get this past `make check` today. // FIXME(#32129) - if file.ends_with("std/string/struct.String.html") { + if file.ends_with("std/string/struct.String.html") || + file.ends_with("interpret/struct.ValTy.html") || + file.ends_with("symbol/struct.InternedString.html") || + file.ends_with("ast/struct.ThinVec.html") || + file.ends_with("util/struct.ThinVec.html") || + file.ends_with("util/struct.RcSlice.html") || + file.ends_with("layout/struct.TyLayout.html") || + file.ends_with("ty/struct.Slice.html") || + file.ends_with("ty/enum.Attributes.html") || + file.ends_with("ty/struct.SymbolName.html") { return None; } // FIXME(#32553) @@ -144,7 +153,16 @@ fn check(cache: &mut Cache, file.ends_with("struct.BTreeSet.html") || file.ends_with("btree_map/struct.BTreeMap.html") || file.ends_with("hash_map/struct.HashMap.html") || - file.ends_with("hash_set/struct.HashSet.html") { + file.ends_with("hash_set/struct.HashSet.html") || + file.ends_with("sync/struct.Lrc.html") || + file.ends_with("sync/struct.RwLock.html") { + return None; + } + // FIXME(#47038) + if file.ends_with("deriving/generic/index.html") || + file.ends_with("deriving/generic/macro.vec.html") || + file.ends_with("deriving/custom/macro.panic.html") || + file.ends_with("proc_macro_impl/macro.panic.html") { return None; } From cbb32a94181d359ca16659b3e74303e945e8ea92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20Jaffr=C3=A9?= Date: Sun, 31 Dec 2017 17:17:01 +0100 Subject: [PATCH 5/6] Fix docs for future pulldown migration --- src/libarena/lib.rs | 4 +- src/libgraphviz/lib.rs | 4 +- src/librustc/dep_graph/dep_tracking_map.rs | 2 +- src/librustc/hir/def.rs | 15 +++--- src/librustc/hir/map/blocks.rs | 1 + src/librustc/infer/anon_types/mod.rs | 48 +++++++++++------ src/librustc/middle/region.rs | 5 +- src/librustc/mir/mod.rs | 3 ++ src/librustc/traits/select.rs | 1 + src/librustc/ty/adjustment.rs | 52 +++++++++---------- src/librustc/ty/instance.rs | 2 +- src/librustc/ty/layout.rs | 6 ++- src/librustc/ty/mod.rs | 6 +-- src/librustc/ty/sty.rs | 5 +- src/librustc_apfloat/ieee.rs | 6 +-- src/librustc_apfloat/lib.rs | 13 ++--- src/librustc_back/target/mod.rs | 2 +- .../control_flow_graph/dominators/mod.rs | 2 +- src/librustc_mir/monomorphize/collector.rs | 2 +- src/librustc_mir/monomorphize/partitioning.rs | 2 +- src/libsyntax/ast.rs | 4 +- src/libsyntax/codemap.rs | 1 + src/libsyntax/ext/base.rs | 3 +- src/libsyntax/feature_gate.rs | 4 +- src/libsyntax_pos/hygiene.rs | 11 ++-- src/libtest/stats.rs | 18 +++---- 26 files changed, 128 insertions(+), 94 deletions(-) diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index 2be7b1bc2e17c..e635df5204007 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -148,10 +148,11 @@ impl TypedArena { } } - /// Allocates a slice of objects that are copy into the `TypedArena`, returning a mutable + /// Allocates a slice of objects that are copied into the `TypedArena`, returning a mutable /// reference to it. Will panic if passed a zero-sized types. /// /// Panics: + /// /// - Zero-sized types /// - Zero-length slices #[inline] @@ -369,6 +370,7 @@ impl DroplessArena { /// reference to it. Will panic if passed a zero-sized type. /// /// Panics: + /// /// - Zero-sized types /// - Zero-length slices #[inline] diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index 110493bbec159..cd893b9784ab6 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -306,7 +306,7 @@ pub enum LabelText<'a> { LabelStr(Cow<'a, str>), /// This kind of label uses the graphviz label escString type: - /// http://www.graphviz.org/content/attrs#kescString + /// /// /// Occurrences of backslashes (`\`) are not escaped; instead they /// are interpreted as initiating an escString escape sequence. @@ -326,7 +326,7 @@ pub enum LabelText<'a> { } /// The style for a node or edge. -/// See http://www.graphviz.org/doc/info/attrs.html#k:style for descriptions. +/// See for descriptions. /// Note that some of these are not valid for edges. #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum Style { diff --git a/src/librustc/dep_graph/dep_tracking_map.rs b/src/librustc/dep_graph/dep_tracking_map.rs index 2d19b34c5040e..7e46c202a84d4 100644 --- a/src/librustc/dep_graph/dep_tracking_map.rs +++ b/src/librustc/dep_graph/dep_tracking_map.rs @@ -56,7 +56,7 @@ impl MemoizationMap for RefCell> { /// map; and `CurrentTask` represents the current task when /// `memoize` is invoked. /// - /// **Important:* when `op` is invoked, the current task will be + /// **Important:** when `op` is invoked, the current task will be /// switched to `Map(key)`. Therefore, if `op` makes use of any /// HIR nodes or shared state accessed through its closure /// environment, it must explicitly register a read of that diff --git a/src/librustc/hir/def.rs b/src/librustc/hir/def.rs index 57a7e6c9904f7..8e4a4d32c0bad 100644 --- a/src/librustc/hir/def.rs +++ b/src/librustc/hir/def.rs @@ -71,13 +71,16 @@ pub enum Def { /// `base_def` is definition of resolved part of the /// path, `unresolved_segments` is the number of unresolved /// segments. -/// module::Type::AssocX::AssocY::MethodOrAssocType -/// ^~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -/// base_def unresolved_segments = 3 /// -/// ::AssocX::AssocY::MethodOrAssocType -/// ^~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ -/// base_def unresolved_segments = 2 +/// ```text +/// module::Type::AssocX::AssocY::MethodOrAssocType +/// ^~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/// base_def unresolved_segments = 3 +/// +/// ::AssocX::AssocY::MethodOrAssocType +/// ^~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ +/// base_def unresolved_segments = 2 +/// ``` #[derive(Copy, Clone, Debug)] pub struct PathResolution { base_def: Def, diff --git a/src/librustc/hir/map/blocks.rs b/src/librustc/hir/map/blocks.rs index d2888dcf6aaa4..1eaacdb1d7ff3 100644 --- a/src/librustc/hir/map/blocks.rs +++ b/src/librustc/hir/map/blocks.rs @@ -33,6 +33,7 @@ use syntax_pos::Span; /// and a body (as well as a NodeId, a span, etc). /// /// More specifically, it is one of either: +/// /// - A function item, /// - A closure expr (i.e. an ExprClosure), or /// - The default implementation for a trait method. diff --git a/src/librustc/infer/anon_types/mod.rs b/src/librustc/infer/anon_types/mod.rs index be5314a2c170a..f5b88dbc2a9c7 100644 --- a/src/librustc/infer/anon_types/mod.rs +++ b/src/librustc/infer/anon_types/mod.rs @@ -147,7 +147,9 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { /// Let's work through an example to explain how it works. Assume /// the current function is as follows: /// - /// fn foo<'a, 'b>(..) -> (impl Bar<'a>, impl Bar<'b>) + /// ```text + /// fn foo<'a, 'b>(..) -> (impl Bar<'a>, impl Bar<'b>) + /// ``` /// /// Here, we have two `impl Trait` types whose values are being /// inferred (the `impl Bar<'a>` and the `impl @@ -155,13 +157,15 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { /// define underlying abstract types (`Foo1`, `Foo2`) and then, in /// the return type of `foo`, we *reference* those definitions: /// - /// abstract type Foo1<'x>: Bar<'x>; - /// abstract type Foo2<'x>: Bar<'x>; - /// fn foo<'a, 'b>(..) -> (Foo1<'a>, Foo2<'b>) { .. } - /// // ^^^^ ^^ - /// // | | - /// // | substs - /// // def_id + /// ```text + /// abstract type Foo1<'x>: Bar<'x>; + /// abstract type Foo2<'x>: Bar<'x>; + /// fn foo<'a, 'b>(..) -> (Foo1<'a>, Foo2<'b>) { .. } + /// // ^^^^ ^^ + /// // | | + /// // | substs + /// // def_id + /// ``` /// /// As indicating in the comments above, each of those references /// is (in the compiler) basically a substitution (`substs`) @@ -175,8 +179,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { /// `Foo2`. That is, this gives rise to higher-order (pattern) unification /// constraints like: /// - /// for<'a> (Foo1<'a> = C1) - /// for<'b> (Foo1<'b> = C2) + /// ```text + /// for<'a> (Foo1<'a> = C1) + /// for<'b> (Foo1<'b> = C2) + /// ``` /// /// For these equation to be satisfiable, the types `C1` and `C2` /// can only refer to a limited set of regions. For example, `C1` @@ -189,15 +195,19 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { /// regions. In fact, it is fairly likely that they do! Consider /// this possible definition of `foo`: /// - /// fn foo<'a, 'b>(x: &'a i32, y: &'b i32) -> (impl Bar<'a>, impl Bar<'b>) { + /// ```text + /// fn foo<'a, 'b>(x: &'a i32, y: &'b i32) -> (impl Bar<'a>, impl Bar<'b>) { /// (&*x, &*y) /// } + /// ``` /// /// Here, the values for the concrete types of the two impl /// traits will include inference variables: /// - /// &'0 i32 - /// &'1 i32 + /// ```text + /// &'0 i32 + /// &'1 i32 + /// ``` /// /// Ordinarily, the subtyping rules would ensure that these are /// sufficiently large. But since `impl Bar<'a>` isn't a specific @@ -207,7 +217,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { /// inferred type are regions that could validly appear. /// /// This is actually a bit of a tricky constraint in general. We - /// want to say that each variable (e.g., `'0``) can only take on + /// want to say that each variable (e.g., `'0`) can only take on /// values that were supplied as arguments to the abstract type /// (e.g., `'a` for `Foo1<'a>`) or `'static`, which is always in /// scope. We don't have a constraint quite of this kind in the current @@ -225,7 +235,9 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { /// /// In some cases, there is no minimum. Consider this example: /// - /// fn baz<'a, 'b>() -> impl Trait<'a, 'b> { ... } + /// ```text + /// fn baz<'a, 'b>() -> impl Trait<'a, 'b> { ... } + /// ``` /// /// Here we would report an error, because `'a` and `'b` have no /// relation to one another. @@ -245,8 +257,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { /// which is the current function. It also means that we can /// take "implied bounds" into account in some cases: /// - /// trait SomeTrait<'a, 'b> { } - /// fn foo<'a, 'b>(_: &'a &'b u32) -> impl SomeTrait<'a, 'b> { .. } + /// ```text + /// trait SomeTrait<'a, 'b> { } + /// fn foo<'a, 'b>(_: &'a &'b u32) -> impl SomeTrait<'a, 'b> { .. } + /// ``` /// /// Here, the fact that `'b: 'a` is known only because of the /// implied bounds from the `&'a &'b u32` parameter, and is not diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index d3aa80e5585e2..049bf4470cbc6 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -53,9 +53,9 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher, /// expression for the indexed statement, until the end of the block. /// /// So: the following code can be broken down into the scopes beneath: -/// ``` +/// +/// ```text /// let a = f().g( 'b: { let x = d(); let y = d(); x.h(y) } ) ; -/// ``` /// /// +-+ (D12.) /// +-+ (D11.) @@ -82,6 +82,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher, /// (R10.): Remainder scope for block `'b:`, stmt 1 (let y = ...). /// (D11.): DestructionScope for temporaries and bindings from block `'b:`. /// (D12.): DestructionScope for temporaries created during M1 (e.g. f()). +/// ``` /// /// Note that while the above picture shows the destruction scopes /// as following their corresponding node scopes, in the internal diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index c52be9caa4f91..3aa94b3469942 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -497,6 +497,7 @@ pub struct LocalDecl<'tcx> { /// /// That's it, if we have a let-statement like the one in this /// function: + /// /// ``` /// fn foo(x: &str) { /// #[allow(unused_mut)] @@ -540,6 +541,7 @@ pub struct LocalDecl<'tcx> { /// /// The end result looks like this: /// + /// ```text /// ROOT SCOPE /// │{ argument x: &str } /// │ @@ -559,6 +561,7 @@ pub struct LocalDecl<'tcx> { /// │ │{ let x: u32 } /// │ │← x.source_info.scope /// │ │← `drop(x)` // this accesses `x: u32` + /// ``` pub syntactic_scope: VisibilityScope, } diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index e70de0e566e41..6482ecc7ee161 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -906,6 +906,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> { /// For defaulted traits, we use a co-inductive strategy to solve, so /// that recursion is ok. This routine returns true if the top of the /// stack (`cycle[0]`): + /// /// - is a defaulted trait, and /// - it also appears in the backtrace at some position `X`; and, /// - all the predicates at positions `X..` between `X` an the top are diff --git a/src/librustc/ty/adjustment.rs b/src/librustc/ty/adjustment.rs index 349d77cfc1b24..6df6bb9df2320 100644 --- a/src/librustc/ty/adjustment.rs +++ b/src/librustc/ty/adjustment.rs @@ -22,38 +22,38 @@ use ty::subst::Substs; /// Here are some common scenarios: /// /// 1. The simplest cases are where a pointer is not adjusted fat vs thin. -/// Here the pointer will be dereferenced N times (where a dereference can -/// happen to raw or borrowed pointers or any smart pointer which implements -/// Deref, including Box<_>). The types of dereferences is given by -/// `autoderefs`. It can then be auto-referenced zero or one times, indicated -/// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is -/// `false`. +/// Here the pointer will be dereferenced N times (where a dereference can +/// happen to raw or borrowed pointers or any smart pointer which implements +/// Deref, including Box<_>). The types of dereferences is given by +/// `autoderefs`. It can then be auto-referenced zero or one times, indicated +/// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is +/// `false`. /// /// 2. A thin-to-fat coercion involves unsizing the underlying data. We start -/// with a thin pointer, deref a number of times, unsize the underlying data, -/// then autoref. The 'unsize' phase may change a fixed length array to a -/// dynamically sized one, a concrete object to a trait object, or statically -/// sized struct to a dynamically sized one. E.g., &[i32; 4] -> &[i32] is -/// represented by: +/// with a thin pointer, deref a number of times, unsize the underlying data, +/// then autoref. The 'unsize' phase may change a fixed length array to a +/// dynamically sized one, a concrete object to a trait object, or statically +/// sized struct to a dynamically sized one. E.g., &[i32; 4] -> &[i32] is +/// represented by: /// -/// ``` -/// Deref(None) -> [i32; 4], -/// Borrow(AutoBorrow::Ref) -> &[i32; 4], -/// Unsize -> &[i32], -/// ``` +/// ``` +/// Deref(None) -> [i32; 4], +/// Borrow(AutoBorrow::Ref) -> &[i32; 4], +/// Unsize -> &[i32], +/// ``` /// -/// Note that for a struct, the 'deep' unsizing of the struct is not recorded. -/// E.g., `struct Foo { x: T }` we can coerce &Foo<[i32; 4]> to &Foo<[i32]> -/// The autoderef and -ref are the same as in the above example, but the type -/// stored in `unsize` is `Foo<[i32]>`, we don't store any further detail about -/// the underlying conversions from `[i32; 4]` to `[i32]`. +/// Note that for a struct, the 'deep' unsizing of the struct is not recorded. +/// E.g., `struct Foo { x: T }` we can coerce &Foo<[i32; 4]> to &Foo<[i32]> +/// The autoderef and -ref are the same as in the above example, but the type +/// stored in `unsize` is `Foo<[i32]>`, we don't store any further detail about +/// the underlying conversions from `[i32; 4]` to `[i32]`. /// /// 3. Coercing a `Box` to `Box` is an interesting special case. In -/// that case, we have the pointer we need coming in, so there are no -/// autoderefs, and no autoref. Instead we just do the `Unsize` transformation. -/// At some point, of course, `Box` should move out of the compiler, in which -/// case this is analogous to transforming a struct. E.g., Box<[i32; 4]> -> -/// Box<[i32]> is an `Adjust::Unsize` with the target `Box<[i32]>`. +/// that case, we have the pointer we need coming in, so there are no +/// autoderefs, and no autoref. Instead we just do the `Unsize` transformation. +/// At some point, of course, `Box` should move out of the compiler, in which +/// case this is analogous to transforming a struct. E.g., Box<[i32; 4]> -> +/// Box<[i32]> is an `Adjust::Unsize` with the target `Box<[i32]>`. #[derive(Clone, RustcEncodable, RustcDecodable)] pub struct Adjustment<'tcx> { pub kind: Adjust<'tcx>, diff --git a/src/librustc/ty/instance.rs b/src/librustc/ty/instance.rs index 5b87273194c69..63bf52a9bdf78 100644 --- a/src/librustc/ty/instance.rs +++ b/src/librustc/ty/instance.rs @@ -28,7 +28,7 @@ pub enum InstanceDef<'tcx> { Item(DefId), Intrinsic(DefId), - /// ::call_* + /// \::call_* /// def-id is FnTrait::call_* FnPtrShim(DefId, Ty<'tcx>), diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs index 017b16e412665..2a8c259dff89b 100644 --- a/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs @@ -340,8 +340,8 @@ impl AddAssign for Size { /// Alignment of a type in bytes, both ABI-mandated and preferred. /// Each field is a power of two, giving the alignment a maximum -/// value of 2^(2^8 - 1), which is limited by LLVM to a i32, with -/// a maximum capacity of 2^31 - 1 or 2147483647. +/// value of 2(28 - 1), which is limited by LLVM to a i32, with +/// a maximum capacity of 231 - 1 or 2147483647. #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] pub struct Align { abi: u8, @@ -651,11 +651,13 @@ impl Scalar { } /// The first half of a fat pointer. +/// /// - For a trait object, this is the address of the box. /// - For a slice, this is the base address. pub const FAT_PTR_ADDR: usize = 0; /// The second half of a fat pointer. +/// /// - For a trait object, this is the address of the vtable. /// - For a slice, this is the length. pub const FAT_PTR_EXTRA: usize = 1; diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 12e5451f83cf4..2cea8c01cdf96 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -1098,8 +1098,8 @@ pub type PolySubtypePredicate<'tcx> = ty::Binder>; /// In particular, form #1 is "desugared" to the combination of a /// normal trait predicate (`T : TraitRef<...>`) and one of these /// predicates. Form #2 is a broader form in that it also permits -/// equality between arbitrary types. Processing an instance of Form -/// #2 eventually yields one of these `ProjectionPredicate` +/// equality between arbitrary types. Processing an instance of +/// Form #2 eventually yields one of these `ProjectionPredicate` /// instances to normalize the LHS. #[derive(Copy, Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)] pub struct ProjectionPredicate<'tcx> { @@ -1401,7 +1401,7 @@ bitflags! { /// fields/variants) and as such, whether downstream crates must match exhaustively on the /// fields/variants of this data type. /// - /// See RFC 2008 (https://github.com/rust-lang/rfcs/pull/2008). + /// See RFC 2008 (). const IS_NON_EXHAUSTIVE = 1 << 5; } } diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 04477b82f29bd..433c72f4b2ca6 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -673,6 +673,7 @@ impl Binder { /// accounting. /// /// Some examples where `skip_binder` is reasonable: + /// /// - extracting the def-id from a PolyTraitRef; /// - comparing the self type of a PolyTraitRef to see if it is equal to /// a type parameter `X`, since the type `X` does not reference any regions @@ -992,8 +993,8 @@ pub type Region<'tcx> = &'tcx RegionKind; /// happen, you can use `leak_check`. This is more clearly explained /// by infer/higher_ranked/README.md. /// -/// [1] http://smallcultfollowing.com/babysteps/blog/2013/10/29/intermingled-parameter-lists/ -/// [2] http://smallcultfollowing.com/babysteps/blog/2013/11/04/intermingled-parameter-lists/ +/// [1]: http://smallcultfollowing.com/babysteps/blog/2013/10/29/intermingled-parameter-lists/ +/// [2]: http://smallcultfollowing.com/babysteps/blog/2013/11/04/intermingled-parameter-lists/ #[derive(Clone, PartialEq, Eq, Hash, Copy, RustcEncodable, RustcDecodable, PartialOrd, Ord)] pub enum RegionKind { // Region bound in a type or fn declaration which will be diff --git a/src/librustc_apfloat/ieee.rs b/src/librustc_apfloat/ieee.rs index 124c840cc56d6..3e76b60b84a13 100644 --- a/src/librustc_apfloat/ieee.rs +++ b/src/librustc_apfloat/ieee.rs @@ -65,11 +65,11 @@ pub trait Semantics: Sized { /// Number of bits in the significand. This includes the integer bit. const PRECISION: usize; - /// The largest E such that 2^E is representable; this matches the + /// The largest E such that 2E is representable; this matches the /// definition of IEEE 754. const MAX_EXP: ExpInt; - /// The smallest E such that 2^E is a normalized number; this + /// The smallest E such that 2E is a normalized number; this /// matches the definition of IEEE 754. const MIN_EXP: ExpInt = -Self::MAX_EXP + 1; @@ -2608,7 +2608,7 @@ mod sig { /// /// `(n - 1) * (n - 1) + 2 * (n - 1) == (n - 1) * (n + 1)` /// - /// which is less than n^2. + /// which is less than n2. pub(super) fn widening_mul(a: Limb, b: Limb) -> [Limb; 2] { let mut wide = [0, 0]; diff --git a/src/librustc_apfloat/lib.rs b/src/librustc_apfloat/lib.rs index 7dea3dae0bcd1..3afc2f684009d 100644 --- a/src/librustc_apfloat/lib.rs +++ b/src/librustc_apfloat/lib.rs @@ -10,7 +10,8 @@ //! Port of LLVM's APFloat software floating-point implementation from the //! following C++ sources (please update commit hash when backporting): -//! https://github.com/llvm-mirror/llvm/tree/23efab2bbd424ed13495a420ad8641cb2c6c28f9 +//! +//! //! * `include/llvm/ADT/APFloat.h` -> `Float` and `FloatConvert` traits //! * `lib/Support/APFloat.cpp` -> `ieee` and `ppc` modules //! * `unittests/ADT/APFloatTest.cpp` -> `tests` directory @@ -221,8 +222,8 @@ pub struct ParseError(pub &'static str); /// /// `apfloat` does not provide any exception handling beyond default exception /// handling. We represent Signaling NaNs via IEEE-754R 2008 6.2.1 should clause -/// by encoding Signaling NaNs with the first bit of its trailing significand as -/// 0. +/// by encoding Signaling NaNs with the first bit of its trailing significand +/// as 0. /// /// Future work /// =========== @@ -259,11 +260,11 @@ pub trait Float /// Number of bits in the significand. This includes the integer bit. const PRECISION: usize; - /// The largest E such that 2^E is representable; this matches the + /// The largest E such that 2E is representable; this matches the /// definition of IEEE 754. const MAX_EXP: ExpInt; - /// The smallest E such that 2^E is a normalized number; this + /// The smallest E such that 2E is a normalized number; this /// matches the definition of IEEE 754. const MIN_EXP: ExpInt; @@ -571,7 +572,7 @@ pub trait Float /// fn ilogb(self) -> ExpInt; - /// Returns: self * 2^exp for integral exponents. + /// Returns: self * 2exp for integral exponents. fn scalbn_r(self, exp: ExpInt, round: Round) -> Self; fn scalbn(self, exp: ExpInt) -> Self { self.scalbn_r(exp, Round::NearestTiesToEven) diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs index 202e094854191..6fcdedfb34042 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -367,7 +367,7 @@ pub struct TargetOptions { /// Whether the linker support GNU-like arguments such as -O. Defaults to false. pub linker_is_gnu: bool, /// The MinGW toolchain has a known issue that prevents it from correctly - /// handling COFF object files with more than 2^15 sections. Since each weak + /// handling COFF object files with more than 215 sections. Since each weak /// symbol needs its own COMDAT section, weak linkage implies a large /// number sections that easily exceeds the given limit for larger /// codebases. Consequently we want a way to disallow weak linkage on some diff --git a/src/librustc_data_structures/control_flow_graph/dominators/mod.rs b/src/librustc_data_structures/control_flow_graph/dominators/mod.rs index 90670517f5967..dc487f1162ca9 100644 --- a/src/librustc_data_structures/control_flow_graph/dominators/mod.rs +++ b/src/librustc_data_structures/control_flow_graph/dominators/mod.rs @@ -12,7 +12,7 @@ //! A Simple, Fast Dominance Algorithm. //! Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy //! Rice Computer Science TS-06-33870 -//! https://www.cs.rice.edu/~keith/EMBED/dom.pdf +//! use super::ControlFlowGraph; use super::iterate::reverse_post_order; diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index 10fa379924b1f..e9a8c2427b373 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/src/librustc_mir/monomorphize/collector.rs @@ -149,7 +149,7 @@ //! The binary of a crate will not only contain machine code for the items //! defined in the source code of that crate. It will also contain monomorphic //! instantiations of any extern generic functions and of functions marked with -//! #[inline]. +//! `#[inline]`. //! The collection algorithm handles this more or less mono. If it is //! about to create a mono item for something with an external `DefId`, //! it will take a look if the MIR for that item is available, and if so just diff --git a/src/librustc_mir/monomorphize/partitioning.rs b/src/librustc_mir/monomorphize/partitioning.rs index 55c194ae7a584..996195800cef8 100644 --- a/src/librustc_mir/monomorphize/partitioning.rs +++ b/src/librustc_mir/monomorphize/partitioning.rs @@ -94,7 +94,7 @@ //! inlined, so it can distribute function instantiations accordingly. Since //! there is no way of knowing for sure which functions LLVM will decide to //! inline in the end, we apply a heuristic here: Only functions marked with -//! #[inline] are considered for inlining by the partitioner. The current +//! `#[inline]` are considered for inlining by the partitioner. The current //! implementation will not try to determine if a function is likely to be //! inlined by looking at the functions definition. //! diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index e0f14c04c6cc9..15682b2d459fa 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1543,7 +1543,7 @@ pub enum TraitObjectSyntax { /// Inline assembly dialect. /// -/// E.g. `"intel"` as in `asm!("mov eax, 2" : "={eax}"(result) : : : "intel")`` +/// E.g. `"intel"` as in `asm!("mov eax, 2" : "={eax}"(result) : : : "intel")` #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum AsmDialect { Att, @@ -1552,7 +1552,7 @@ pub enum AsmDialect { /// Inline assembly. /// -/// E.g. `"={eax}"(result)` as in `asm!("mov eax, 2" : "={eax}"(result) : : : "intel")`` +/// E.g. `"={eax}"(result)` as in `asm!("mov eax, 2" : "={eax}"(result) : : : "intel")` #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct InlineAsmOutput { pub constraint: Symbol, diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 2f3e2b6611368..129defd209324 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -391,6 +391,7 @@ impl CodeMap { /// Returns `Some(span)`, a union of the lhs and rhs span. The lhs must precede the rhs. If /// there are gaps between lhs and rhs, the resulting union will cross these gaps. /// For this to work, the spans have to be: + /// /// * the ctxt of both spans much match /// * the lhs span needs to end on the same line the rhs span begins /// * the lhs span must start at or before the rhs span diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index be71d6e038c85..0d3be28ffefe5 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -776,7 +776,8 @@ impl<'a> ExtCtxt<'a> { /// Emit `msg` attached to `sp`, and stop compilation immediately. /// /// `span_err` should be strongly preferred where-ever possible: - /// this should *only* be used when + /// this should *only* be used when: + /// /// - continuing has a high risk of flow-on errors (e.g. errors in /// declaring a macro would cause all uses of that macro to /// complain about "undefined macro"), or diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index c5de0da0979a1..e5ef9393e7bf7 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -63,9 +63,9 @@ macro_rules! declare_features { /// A set of features to be used by later passes. pub struct Features { - /// #![feature] attrs for stable language features, for error reporting + /// `#![feature]` attrs for stable language features, for error reporting pub declared_stable_lang_features: Vec<(Symbol, Span)>, - /// #![feature] attrs for non-language (library) features + /// `#![feature]` attrs for non-language (library) features pub declared_lib_features: Vec<(Symbol, Span)>, $(pub $feature: bool),+ } diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index 55342c2768a0e..06a9306501c04 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -10,10 +10,10 @@ //! Machinery for hygienic macros, inspired by the MTWT[1] paper. //! -//! [1] Matthew Flatt, Ryan Culpepper, David Darais, and Robert Bruce Findler. -//! 2012. *Macros that work together: Compile-time bindings, partial expansion, +//! [1] Matthew Flatt, Ryan Culpepper, David Darais, and Robert Bruce Findler. 2012. +//! *Macros that work together: Compile-time bindings, partial expansion, //! and definition contexts*. J. Funct. Program. 22, 2 (March 2012), 181-216. -//! DOI=10.1017/S0956796812000093 http://dx.doi.org/10.1017/S0956796812000093 +//! DOI=10.1017/S0956796812000093 use Span; use symbol::{Ident, Symbol}; @@ -224,6 +224,7 @@ impl SyntaxContext { /// Adjust this context for resolution in a scope created by the given expansion. /// For example, consider the following three resolutions of `f`: + /// /// ```rust /// mod foo { pub fn f() {} } // `f`'s `SyntaxContext` is empty. /// m!(f); @@ -255,7 +256,8 @@ impl SyntaxContext { /// Adjust this context for resolution in a scope created by the given expansion /// via a glob import with the given `SyntaxContext`. - /// For example, + /// For example: + /// /// ```rust /// m!(f); /// macro m($i:ident) { @@ -293,6 +295,7 @@ impl SyntaxContext { } /// Undo `glob_adjust` if possible: + /// /// ```rust /// if let Some(privacy_checking_scope) = self.reverse_glob_adjust(expansion, glob_ctxt) { /// assert!(self.glob_adjust(expansion, glob_ctxt) == Some(privacy_checking_scope)); diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index f04394f716660..9f8b4a73d0cc0 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -53,13 +53,13 @@ pub trait Stats { /// Arithmetic mean (average) of the samples: sum divided by sample-count. /// - /// See: https://en.wikipedia.org/wiki/Arithmetic_mean + /// See: fn mean(&self) -> f64; /// Median of the samples: value separating the lower half of the samples from the higher half. /// Equal to `self.percentile(50.0)`. /// - /// See: https://en.wikipedia.org/wiki/Median + /// See: fn median(&self) -> f64; /// Variance of the samples: bias-corrected mean of the squares of the differences of each @@ -68,7 +68,7 @@ pub trait Stats { /// bias that would appear if we calculated a population variance, by dividing by `(n-1)` rather /// than `n`. /// - /// See: https://en.wikipedia.org/wiki/Variance + /// See: fn var(&self) -> f64; /// Standard deviation: the square root of the sample variance. @@ -76,7 +76,7 @@ pub trait Stats { /// Note: this is not a robust statistic for non-normal distributions. Prefer the /// `median_abs_dev` for unknown distributions. /// - /// See: https://en.wikipedia.org/wiki/Standard_deviation + /// See: fn std_dev(&self) -> f64; /// Standard deviation as a percent of the mean value. See `std_dev` and `mean`. @@ -91,7 +91,7 @@ pub trait Stats { /// by the constant `1.4826` to allow its use as a consistent estimator for the standard /// deviation. /// - /// See: http://en.wikipedia.org/wiki/Median_absolute_deviation + /// See: fn median_abs_dev(&self) -> f64; /// Median absolute deviation as a percent of the median. See `median_abs_dev` and `median`. @@ -103,7 +103,7 @@ pub trait Stats { /// /// Calculated by linear interpolation between closest ranks. /// - /// See: http://en.wikipedia.org/wiki/Percentile + /// See: fn percentile(&self, pct: f64) -> f64; /// Quartiles of the sample: three values that divide the sample into four equal groups, each @@ -111,13 +111,13 @@ pub trait Stats { /// function may calculate the 3 quartiles more efficiently than 3 calls to `percentile`, but /// is otherwise equivalent. /// - /// See also: https://en.wikipedia.org/wiki/Quartile + /// See also: fn quartiles(&self) -> (f64, f64, f64); /// Inter-quartile range: the difference between the 25th percentile (1st quartile) and the 75th /// percentile (3rd quartile). See `quartiles`. /// - /// See also: https://en.wikipedia.org/wiki/Interquartile_range + /// See also: fn iqr(&self) -> f64; } @@ -311,7 +311,7 @@ fn percentile_of_sorted(sorted_samples: &[f64], pct: f64) -> f64 { /// It differs from trimming in that it does not change the number of samples, /// just changes the values of those that are outliers. /// -/// See: http://en.wikipedia.org/wiki/Winsorising +/// See: pub fn winsorize(samples: &mut [f64], pct: f64) { let mut tmp = samples.to_vec(); local_sort(&mut tmp); From 2449230cce246f48d9faa212b41a6430b1e373b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20Jaffr=C3=A9?= Date: Fri, 29 Dec 2017 16:07:37 +0100 Subject: [PATCH 6/6] Enable compiler docs testing in x86_64-gnu --- src/ci/docker/x86_64-gnu/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ci/docker/x86_64-gnu/Dockerfile b/src/ci/docker/x86_64-gnu/Dockerfile index 7570bca5906d1..444a8fe5da87a 100644 --- a/src/ci/docker/x86_64-gnu/Dockerfile +++ b/src/ci/docker/x86_64-gnu/Dockerfile @@ -16,5 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --enable-sanitizers --enable-profiler +ENV RUST_CONFIGURE_ARGS \ + --build=x86_64-unknown-linux-gnu \ + --enable-sanitizers \ + --enable-profiler \ + --enable-compiler-docs ENV SCRIPT python2.7 ../x.py test