From 908328fca03c1bf69ce335974f4dcabd8e5d18f4 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 11 Mar 2018 07:41:13 -0400 Subject: [PATCH 01/12] Document when types have OS-dependent sizes As per issue #43601, types that can change size depending on the target operating system should say so in their documentation. I used this template when adding doc comments: The size of a(n) struct may vary depending on the target operating system, and may change between Rust releases. For enums, I used "instance" instead of "struct". --- src/libstd/io/stdio.rs | 9 +++++++++ src/libstd/net/addr.rs | 9 +++++++++ src/libstd/net/ip.rs | 9 +++++++++ src/libstd/time.rs | 6 ++++++ 4 files changed, 33 insertions(+) diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 1f73054e3beed..4565b7fa0d6f2 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -30,18 +30,27 @@ thread_local! { /// /// This handle is not synchronized or buffered in any fashion. Constructed via /// the `std::io::stdio::stdin_raw` function. +/// +/// The size of a StdinRaw struct may vary depending on the target operating +/// system, and may change between Rust releases. struct StdinRaw(stdio::Stdin); /// A handle to a raw instance of the standard output stream of this process. /// /// This handle is not synchronized or buffered in any fashion. Constructed via /// the `std::io::stdio::stdout_raw` function. +/// +/// The size of a StdoutRaw struct may vary depending on the target operating +/// system, and may change between Rust releases. struct StdoutRaw(stdio::Stdout); /// A handle to a raw instance of the standard output stream of this process. /// /// This handle is not synchronized or buffered in any fashion. Constructed via /// the `std::io::stdio::stderr_raw` function. +/// +/// The size of a StderrRaw struct may vary depending on the target operating +/// system, and may change between Rust releases. struct StderrRaw(stdio::Stderr); /// Constructs a new raw handle to the standard input of this process. diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs index fa430939f058c..75b050638392e 100644 --- a/src/libstd/net/addr.rs +++ b/src/libstd/net/addr.rs @@ -28,6 +28,9 @@ use slice; /// as possibly some version-dependent additional information. See [`SocketAddrV4`]'s and /// [`SocketAddrV6`]'s respective documentation for more details. /// +/// The size of a SocketAddr instance may vary depending on the target operating +/// system, and may change between Rust releases. +/// /// [IP address]: ../../std/net/enum.IpAddr.html /// [`SocketAddrV4`]: ../../std/net/struct.SocketAddrV4.html /// [`SocketAddrV6`]: ../../std/net/struct.SocketAddrV6.html @@ -61,6 +64,9 @@ pub enum SocketAddr { /// /// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. /// +/// The size of a SocketAddrV4 struct may vary depending on the target operating +/// system, and may change between Rust releases. +/// /// [IETF RFC 793]: https://tools.ietf.org/html/rfc793 /// [IPv4 address]: ../../std/net/struct.Ipv4Addr.html /// [`SocketAddr`]: ../../std/net/enum.SocketAddr.html @@ -88,6 +94,9 @@ pub struct SocketAddrV4 { inner: c::sockaddr_in } /// /// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. /// +/// The size of a SocketAddrV6 struct may vary depending on the target operating +/// system, and may change between Rust releases. +/// /// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3 /// [IPv6 address]: ../../std/net/struct.Ipv6Addr.html /// [`SocketAddr`]: ../../std/net/enum.SocketAddr.html diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index 0d73a6f4fd7f4..36a34e147d558 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -26,6 +26,9 @@ use sys_common::{AsInner, FromInner}; /// This enum can contain either an [`Ipv4Addr`] or an [`Ipv6Addr`], see their /// respective documentation for more details. /// +/// The size of an IpAddr instance may vary depending on the target operating +/// system, and may change between Rust releases. +/// /// [`Ipv4Addr`]: ../../std/net/struct.Ipv4Addr.html /// [`Ipv6Addr`]: ../../std/net/struct.Ipv6Addr.html /// @@ -61,6 +64,9 @@ pub enum IpAddr { /// /// See [`IpAddr`] for a type encompassing both IPv4 and IPv6 addresses. /// +/// The size of an Ipv4Addr struct may vary depending on the target operating +/// system, and may change between Rust releases. +/// /// [IETF RFC 791]: https://tools.ietf.org/html/rfc791 /// [`IpAddr`]: ../../std/net/enum.IpAddr.html /// @@ -93,6 +99,9 @@ pub struct Ipv4Addr { /// /// See [`IpAddr`] for a type encompassing both IPv4 and IPv6 addresses. /// +/// The size of an Ipv6Addr struct may vary depending on the target operating +/// system, and may change between Rust releases. +/// /// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291 /// [`IpAddr`]: ../../std/net/enum.IpAddr.html /// diff --git a/src/libstd/time.rs b/src/libstd/time.rs index 12f2a9bb85f83..054450a518629 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -49,6 +49,9 @@ pub use core::time::Duration; /// allows measuring the duration between two instants (or comparing two /// instants). /// +/// The size of an Instant struct may vary depending on the target operating +/// system, and may change between Rust releases. +/// /// Example: /// /// ```no_run @@ -88,6 +91,9 @@ pub struct Instant(time::Instant); /// fixed point in time, a `SystemTime` can be converted to a human-readable time, /// or perhaps some other string representation. /// +/// The size of a SystemTime struct may vary depending on the target operating +/// system, and may change between Rust releases. +/// /// [`Instant`]: ../../std/time/struct.Instant.html /// [`Result`]: ../../std/result/enum.Result.html /// [`Duration`]: ../../std/time/struct.Duration.html From e63b1a0e368e2f7d3bf5eadd1262dc530a38394b Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 11 Mar 2018 17:17:18 -0400 Subject: [PATCH 02/12] Remove "and may change between Rust releases" --- src/libstd/io/stdio.rs | 6 +++--- src/libstd/net/addr.rs | 6 +++--- src/libstd/net/ip.rs | 6 +++--- src/libstd/time.rs | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 4565b7fa0d6f2..9a4cde7e16286 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -32,7 +32,7 @@ thread_local! { /// the `std::io::stdio::stdin_raw` function. /// /// The size of a StdinRaw struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. struct StdinRaw(stdio::Stdin); /// A handle to a raw instance of the standard output stream of this process. @@ -41,7 +41,7 @@ struct StdinRaw(stdio::Stdin); /// the `std::io::stdio::stdout_raw` function. /// /// The size of a StdoutRaw struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. struct StdoutRaw(stdio::Stdout); /// A handle to a raw instance of the standard output stream of this process. @@ -50,7 +50,7 @@ struct StdoutRaw(stdio::Stdout); /// the `std::io::stdio::stderr_raw` function. /// /// The size of a StderrRaw struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. struct StderrRaw(stdio::Stderr); /// Constructs a new raw handle to the standard input of this process. diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs index 75b050638392e..f985c1f2bc8ce 100644 --- a/src/libstd/net/addr.rs +++ b/src/libstd/net/addr.rs @@ -29,7 +29,7 @@ use slice; /// [`SocketAddrV6`]'s respective documentation for more details. /// /// The size of a SocketAddr instance may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. /// /// [IP address]: ../../std/net/enum.IpAddr.html /// [`SocketAddrV4`]: ../../std/net/struct.SocketAddrV4.html @@ -65,7 +65,7 @@ pub enum SocketAddr { /// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. /// /// The size of a SocketAddrV4 struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. /// /// [IETF RFC 793]: https://tools.ietf.org/html/rfc793 /// [IPv4 address]: ../../std/net/struct.Ipv4Addr.html @@ -95,7 +95,7 @@ pub struct SocketAddrV4 { inner: c::sockaddr_in } /// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. /// /// The size of a SocketAddrV6 struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. /// /// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3 /// [IPv6 address]: ../../std/net/struct.Ipv6Addr.html diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index 36a34e147d558..67b9e7a2f9d6f 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -27,7 +27,7 @@ use sys_common::{AsInner, FromInner}; /// respective documentation for more details. /// /// The size of an IpAddr instance may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. /// /// [`Ipv4Addr`]: ../../std/net/struct.Ipv4Addr.html /// [`Ipv6Addr`]: ../../std/net/struct.Ipv6Addr.html @@ -65,7 +65,7 @@ pub enum IpAddr { /// See [`IpAddr`] for a type encompassing both IPv4 and IPv6 addresses. /// /// The size of an Ipv4Addr struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. /// /// [IETF RFC 791]: https://tools.ietf.org/html/rfc791 /// [`IpAddr`]: ../../std/net/enum.IpAddr.html @@ -100,7 +100,7 @@ pub struct Ipv4Addr { /// See [`IpAddr`] for a type encompassing both IPv4 and IPv6 addresses. /// /// The size of an Ipv6Addr struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. /// /// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291 /// [`IpAddr`]: ../../std/net/enum.IpAddr.html diff --git a/src/libstd/time.rs b/src/libstd/time.rs index 054450a518629..4e08301fe05b9 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -50,7 +50,7 @@ pub use core::time::Duration; /// instants). /// /// The size of an Instant struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. /// /// Example: /// @@ -92,7 +92,7 @@ pub struct Instant(time::Instant); /// or perhaps some other string representation. /// /// The size of a SystemTime struct may vary depending on the target operating -/// system, and may change between Rust releases. +/// system. /// /// [`Instant`]: ../../std/time/struct.Instant.html /// [`Result`]: ../../std/result/enum.Result.html From 68d6eddaf8e1d34c1fa44f60463b70c81b277665 Mon Sep 17 00:00:00 2001 From: Michal 'vorner' Vaner Date: Sun, 18 Feb 2018 18:01:33 +0100 Subject: [PATCH 03/12] Some comments and documentation for name resolution crate --- src/librustc_resolve/lib.rs | 45 ++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 317bd9217b591..cb2c206c69b16 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -162,6 +162,10 @@ enum ResolutionError<'a> { ForwardDeclaredTyParam, } +/// Combines an error with provided span and emits it +/// +/// This takes the error provided, combines it with the span and any additional spans inside the +/// error and emits it. fn resolve_error<'sess, 'a>(resolver: &'sess Resolver, span: Span, resolution_error: ResolutionError<'a>) { @@ -364,7 +368,7 @@ struct BindingInfo { binding_mode: BindingMode, } -// Map from the name in a pattern to its binding mode. +/// Map from the name in a pattern to its binding mode. type BindingMap = FxHashMap; #[derive(Copy, Clone, PartialEq, Eq, Debug)] @@ -559,6 +563,9 @@ impl<'a> PathSource<'a> { } } +/// Different kinds of symbols don't influence each other. +/// +/// Therefore, they have a separate universe (namespace). #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] pub enum Namespace { TypeNS, @@ -566,6 +573,7 @@ pub enum Namespace { MacroNS, } +/// Just a helper ‒ separate structure for each namespace. #[derive(Clone, Default, Debug)] pub struct PerNS { value_ns: T, @@ -662,6 +670,7 @@ impl<'tcx> Visitor<'tcx> for UsePlacementFinder { } } +/// This thing walks the whole crate in DFS manner, visiting each item, resolving names as it goes. impl<'a, 'tcx> Visitor<'tcx> for Resolver<'a> { fn visit_item(&mut self, item: &'tcx Item) { self.resolve_item(item); @@ -788,7 +797,9 @@ impl<'a, 'tcx> Visitor<'tcx> for Resolver<'a> { fn visit_generics(&mut self, generics: &'tcx Generics) { // For type parameter defaults, we have to ban access // to following type parameters, as the Substs can only - // provide previous type parameters as they're built. + // provide previous type parameters as they're built. We + // put all the parameters on the ban list and then remove + // them one by one as they are processed and become available. let mut default_ban_rib = Rib::new(ForwardTyParamBanRibKind); default_ban_rib.bindings.extend(generics.params.iter() .filter_map(|p| if let GenericParam::Type(ref tp) = *p { Some(tp) } else { None }) @@ -864,6 +875,16 @@ enum RibKind<'a> { } /// One local scope. +/// +/// A rib represents a scope names can live in. Note that these appear in many places, not just +/// around braces. At any place where the list of accessible names (of the given namespace) +/// changes, a new rib is put onto a stack. This may be, for example, a `let` statement (because it +/// introduces variables), a macro, etc. +/// +/// Different [rib kinds](enum.RibKind) are transparent for different names. +/// +/// The resolution keeps a separate stack of ribs as it traverses the AST for each namespace. When +/// resolving, the name is looked up from inside out. #[derive(Debug)] struct Rib<'a> { bindings: FxHashMap, @@ -879,6 +900,11 @@ impl<'a> Rib<'a> { } } +/// An intermediate resolution result. +/// +/// This refers to the thing referred by a name. The difference between `Def` and `Item` is that +/// items are visible in their whole block, while defs only from the place they are defined +/// forward. enum LexicalScopeBinding<'a> { Item(&'a NameBinding<'a>), Def(Def), @@ -909,7 +935,11 @@ enum PathResult<'a> { } enum ModuleKind { + /// Inline `mod something { ... }`. Block(NodeId), + /// Module from another file. + /// + /// Also called a normal module in the following code. Def(Def, Name), } @@ -1194,6 +1224,9 @@ impl<'a> NameBinding<'a> { } /// Interns the names of the primitive types. +/// +/// All other types are defined somewhere and possibly imported, but the primitive ones need +/// special handling, since they have no place of origin. struct PrimitiveTypeTable { primitive_types: FxHashMap, } @@ -1228,6 +1261,8 @@ impl PrimitiveTypeTable { } /// The main resolver class. +/// +/// This is the visitor that walks the whole crate. pub struct Resolver<'a> { session: &'a Session, cstore: &'a CrateStore, @@ -1359,6 +1394,7 @@ pub struct Resolver<'a> { injected_crate: Option>, } +/// Nothing really interesting here, it just provides memory for the rest of the crate. pub struct ResolverArenas<'a> { modules: arena::TypedArena>, local_modules: RefCell>>, @@ -1404,10 +1440,12 @@ impl<'a, 'b: 'a> ty::DefIdTree for &'a Resolver<'b> { match id.krate { LOCAL_CRATE => self.definitions.def_key(id.index).parent, _ => self.cstore.def_key(id).parent, - }.map(|index| DefId { index: index, ..id }) + }.map(|index| DefId { index, ..id }) } } +/// This is the interface through which the rest of the compiler asks about name resolution after +/// the whole AST has been indexed. impl<'a> hir::lowering::Resolver for Resolver<'a> { fn resolve_hir_path(&mut self, path: &mut hir::Path, is_value: bool) { self.resolve_hir_path_cb(path, is_value, @@ -1630,6 +1668,7 @@ impl<'a> Resolver<'a> { } } + /// Runs the function on each namespace. fn per_ns T>(&mut self, mut f: F) -> PerNS { PerNS { type_ns: f(self, TypeNS), From 38cbdcd0b1791e68c9485d8db6e81cf2d6765572 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Sat, 17 Mar 2018 10:42:32 +0900 Subject: [PATCH 04/12] Use an uninitialized buffer in GenericRadix::fmt_int, like in Display::fmt for numeric types The code using a slice of that buffer is only ever going to use bytes that are subsequently initialized. --- src/libcore/fmt/num.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/fmt/num.rs b/src/libcore/fmt/num.rs index 2992e7cf8db34..c3843cae27af5 100644 --- a/src/libcore/fmt/num.rs +++ b/src/libcore/fmt/num.rs @@ -65,7 +65,7 @@ trait GenericRadix { // characters for a base 2 number. let zero = T::zero(); let is_nonnegative = x >= zero; - let mut buf = [0; 128]; + let mut buf: [u8; 128] = unsafe { mem::uninitialized() }; let mut curr = buf.len(); let base = T::from_u8(self.base()); if is_nonnegative { From deae8de673af638537421804b360443af76d55e4 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Mon, 19 Mar 2018 14:33:39 +0100 Subject: [PATCH 05/12] Clarify AcqRel's docs This implied things that are not true. Fixes #49127 --- src/libcore/sync/atomic.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index 25827edee7d93..fd6e5140a0997 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -205,8 +205,9 @@ pub enum Ordering { /// [`Release`]: http://llvm.org/docs/Atomics.html#release #[stable(feature = "rust1", since = "1.0.0")] Acquire, - /// When coupled with a load, uses [`Acquire`] ordering, and with a store - /// [`Release`] ordering. + /// Has the effects of both [`Acquire`] and [`Release`] together. + /// + /// If you only are concerned about a load or a store, consider using one of those instead. /// /// [`Acquire`]: http://llvm.org/docs/Atomics.html#acquire /// [`Release`]: http://llvm.org/docs/Atomics.html#release From 1af952cc490b62a1f43f48c9fd809cf99aff2630 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Tue, 20 Mar 2018 07:31:22 -0400 Subject: [PATCH 06/12] Remove StdioRaw doc additions, add backticks --- src/libstd/io/stdio.rs | 9 --------- src/libstd/net/addr.rs | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 9a4cde7e16286..1f73054e3beed 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -30,27 +30,18 @@ thread_local! { /// /// This handle is not synchronized or buffered in any fashion. Constructed via /// the `std::io::stdio::stdin_raw` function. -/// -/// The size of a StdinRaw struct may vary depending on the target operating -/// system. struct StdinRaw(stdio::Stdin); /// A handle to a raw instance of the standard output stream of this process. /// /// This handle is not synchronized or buffered in any fashion. Constructed via /// the `std::io::stdio::stdout_raw` function. -/// -/// The size of a StdoutRaw struct may vary depending on the target operating -/// system. struct StdoutRaw(stdio::Stdout); /// A handle to a raw instance of the standard output stream of this process. /// /// This handle is not synchronized or buffered in any fashion. Constructed via /// the `std::io::stdio::stderr_raw` function. -/// -/// The size of a StderrRaw struct may vary depending on the target operating -/// system. struct StderrRaw(stdio::Stderr); /// Constructs a new raw handle to the standard input of this process. diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs index f985c1f2bc8ce..57efc3095fc9e 100644 --- a/src/libstd/net/addr.rs +++ b/src/libstd/net/addr.rs @@ -28,7 +28,7 @@ use slice; /// as possibly some version-dependent additional information. See [`SocketAddrV4`]'s and /// [`SocketAddrV6`]'s respective documentation for more details. /// -/// The size of a SocketAddr instance may vary depending on the target operating +/// The size of a `SocketAddr` instance may vary depending on the target operating /// system. /// /// [IP address]: ../../std/net/enum.IpAddr.html From 433a03e6ff914bd367f129457a3d80822c9c6a42 Mon Sep 17 00:00:00 2001 From: Michal 'vorner' Vaner Date: Sat, 24 Mar 2018 17:07:58 +0100 Subject: [PATCH 07/12] fixup! Some comments and documentation for name resolution crate --- src/librustc_resolve/lib.rs | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index cb2c206c69b16..d3689f7b52773 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -878,8 +878,9 @@ enum RibKind<'a> { /// /// A rib represents a scope names can live in. Note that these appear in many places, not just /// around braces. At any place where the list of accessible names (of the given namespace) -/// changes, a new rib is put onto a stack. This may be, for example, a `let` statement (because it -/// introduces variables), a macro, etc. +/// changes or a new restrictions on the name accessibility are introduced, a new rib is put onto a +/// stack. This may be, for example, a `let` statement (because it introduces variables), a macro, +/// etc. /// /// Different [rib kinds](enum.RibKind) are transparent for different names. /// @@ -935,11 +936,26 @@ enum PathResult<'a> { } enum ModuleKind { - /// Inline `mod something { ... }`. + /// An anonymous module, eg. just a block. + /// + /// ``` + /// fn main() { + /// fn f() {} // (1) + /// { // This is an anonymous module + /// f(); // This resolves to (2) as we are inside the block. + /// fn f() {} // (2) + /// } + /// f(); // Resolves to (1) + /// } + /// ``` Block(NodeId), - /// Module from another file. + /// Any module with a name. + /// + /// This could be: /// - /// Also called a normal module in the following code. + /// * A normal module ‒ either `mod from_file;` or `mod from_block { }`. + /// * A trait or an enum (it implicitly contains associated types, methods and variant + /// constructors). Def(Def, Name), } @@ -1444,8 +1460,8 @@ impl<'a, 'b: 'a> ty::DefIdTree for &'a Resolver<'b> { } } -/// This is the interface through which the rest of the compiler asks about name resolution after -/// the whole AST has been indexed. +/// This interface is used through the AST→HIR step, to embed full paths into the HIR. After that +/// the resolver is no longer needed as all the relevant information is inline. impl<'a> hir::lowering::Resolver for Resolver<'a> { fn resolve_hir_path(&mut self, path: &mut hir::Path, is_value: bool) { self.resolve_hir_path_cb(path, is_value, From efd04423c3300d79d0430c78602545ddf5b7f415 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 24 Mar 2018 23:41:34 -0400 Subject: [PATCH 08/12] Add backticks --- src/libstd/net/addr.rs | 4 ++-- src/libstd/net/ip.rs | 6 +++--- src/libstd/time.rs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs index 57efc3095fc9e..bc2c9f522d3b0 100644 --- a/src/libstd/net/addr.rs +++ b/src/libstd/net/addr.rs @@ -64,7 +64,7 @@ pub enum SocketAddr { /// /// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. /// -/// The size of a SocketAddrV4 struct may vary depending on the target operating +/// The size of a `SocketAddrV4` struct may vary depending on the target operating /// system. /// /// [IETF RFC 793]: https://tools.ietf.org/html/rfc793 @@ -94,7 +94,7 @@ pub struct SocketAddrV4 { inner: c::sockaddr_in } /// /// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. /// -/// The size of a SocketAddrV6 struct may vary depending on the target operating +/// The size of a `SocketAddrV6` struct may vary depending on the target operating /// system. /// /// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3 diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index 67b9e7a2f9d6f..031fae6d59bf8 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -26,7 +26,7 @@ use sys_common::{AsInner, FromInner}; /// This enum can contain either an [`Ipv4Addr`] or an [`Ipv6Addr`], see their /// respective documentation for more details. /// -/// The size of an IpAddr instance may vary depending on the target operating +/// The size of an `IpAddr` instance may vary depending on the target operating /// system. /// /// [`Ipv4Addr`]: ../../std/net/struct.Ipv4Addr.html @@ -64,7 +64,7 @@ pub enum IpAddr { /// /// See [`IpAddr`] for a type encompassing both IPv4 and IPv6 addresses. /// -/// The size of an Ipv4Addr struct may vary depending on the target operating +/// The size of an `Ipv4Addr` struct may vary depending on the target operating /// system. /// /// [IETF RFC 791]: https://tools.ietf.org/html/rfc791 @@ -99,7 +99,7 @@ pub struct Ipv4Addr { /// /// See [`IpAddr`] for a type encompassing both IPv4 and IPv6 addresses. /// -/// The size of an Ipv6Addr struct may vary depending on the target operating +/// The size of an `Ipv6Addr` struct may vary depending on the target operating /// system. /// /// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291 diff --git a/src/libstd/time.rs b/src/libstd/time.rs index 4e08301fe05b9..7256ac43e27e4 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -49,7 +49,7 @@ pub use core::time::Duration; /// allows measuring the duration between two instants (or comparing two /// instants). /// -/// The size of an Instant struct may vary depending on the target operating +/// The size of an `Instant` struct may vary depending on the target operating /// system. /// /// Example: @@ -91,7 +91,7 @@ pub struct Instant(time::Instant); /// fixed point in time, a `SystemTime` can be converted to a human-readable time, /// or perhaps some other string representation. /// -/// The size of a SystemTime struct may vary depending on the target operating +/// The size of a `SystemTime` struct may vary depending on the target operating /// system. /// /// [`Instant`]: ../../std/time/struct.Instant.html From f198b0acf512458bdbe5079d12414ff94b03f7ac Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Sat, 24 Mar 2018 22:31:17 -0700 Subject: [PATCH 09/12] Fix confusing doc for `scan` The comment "the value passed on to the next iteration" confused me since it sounded more like what Haskell's [scanl](http://hackage.haskell.org/package/base-4.11.0.0/docs/Prelude.html#v:scanl) does where the closure's return value serves as both the "yielded value" *and* the new value of the "state". I tried changing the example to make it clear that the closure's return value is decoupled from the state argument. --- src/libcore/iter/iterator.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index 2cfbc09229342..31f77f92435d8 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -974,13 +974,13 @@ pub trait Iterator { /// // each iteration, we'll multiply the state by the element /// *state = *state * x; /// - /// // the value passed on to the next iteration - /// Some(*state) + /// // then, we'll yield the negation of the state + /// Some(-*state) /// }); /// - /// assert_eq!(iter.next(), Some(1)); - /// assert_eq!(iter.next(), Some(2)); - /// assert_eq!(iter.next(), Some(6)); + /// assert_eq!(iter.next(), Some(-1)); + /// assert_eq!(iter.next(), Some(-2)); + /// assert_eq!(iter.next(), Some(-6)); /// assert_eq!(iter.next(), None); /// ``` #[inline] From 23013c791c70a297b430e9d1c0408493705d36e0 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Sun, 25 Mar 2018 14:19:27 +0200 Subject: [PATCH 10/12] update wording as per feedback --- src/libcore/sync/atomic.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index fd6e5140a0997..c1f6c492e9838 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -207,7 +207,9 @@ pub enum Ordering { Acquire, /// Has the effects of both [`Acquire`] and [`Release`] together. /// - /// If you only are concerned about a load or a store, consider using one of those instead. + /// This ordering is only applicable for operations that combine both loads and stores. + /// + /// For loads it uses [`Acquire`] ordering. For stores it uses the [`Release`] ordering. /// /// [`Acquire`]: http://llvm.org/docs/Atomics.html#acquire /// [`Release`]: http://llvm.org/docs/Atomics.html#release From fbec3ec5a78747ee458518e4be7cfe1b5eac9e3b Mon Sep 17 00:00:00 2001 From: Diggory Blake Date: Mon, 25 Dec 2017 00:00:04 +0000 Subject: [PATCH 11/12] Implement get_key_value for HashMap, BTreeMap --- src/liballoc/btree/map.rs | 27 +++++++++++++++++++++++++++ src/libstd/collections/hash/map.rs | 28 ++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/src/liballoc/btree/map.rs b/src/liballoc/btree/map.rs index ed9c8c18f0d6d..cada190032aa0 100644 --- a/src/liballoc/btree/map.rs +++ b/src/liballoc/btree/map.rs @@ -576,6 +576,33 @@ impl BTreeMap { } } + /// Returns the key-value pair corresponding to the supplied key. + /// + /// The supplied key may be any borrowed form of the map's key type, but the ordering + /// on the borrowed form *must* match the ordering on the key type. + /// + /// # Examples + /// + /// ``` + /// #![feature(map_get_key_value)] + /// use std::collections::BTreeMap; + /// + /// let mut map = BTreeMap::new(); + /// map.insert(1, "a"); + /// assert_eq!(map.get_key_value(&1), Some((&1, &"a"))); + /// assert_eq!(map.get_key_value(&2), None); + /// ``` + #[unstable(feature = "map_get_key_value", issue = "49347")] + pub fn get_key_value(&self, k: &Q) -> Option<(&K, &V)> + where K: Borrow, + Q: Ord + { + match search::search_tree(self.root.as_ref(), k) { + Found(handle) => Some(handle.into_kv()), + GoDown(_) => None, + } + } + /// Returns `true` if the map contains a value for the specified key. /// /// The key may be any borrowed form of the map's key type, but the ordering diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index b18b38ec30246..f0bb781411fb4 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1184,6 +1184,34 @@ impl HashMap self.search(k).map(|bucket| bucket.into_refs().1) } + /// Returns the key-value pair corresponding to the supplied key. + /// + /// The supplied key may be any borrowed form of the map's key type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the key type. + /// + /// [`Eq`]: ../../std/cmp/trait.Eq.html + /// [`Hash`]: ../../std/hash/trait.Hash.html + /// + /// # Examples + /// + /// ``` + /// #![feature(map_get_key_value)] + /// use std::collections::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert(1, "a"); + /// assert_eq!(map.get_key_value(&1), Some((&1, &"a"))); + /// assert_eq!(map.get_key_value(&2), None); + /// ``` + #[unstable(feature = "map_get_key_value", issue = "49347")] + pub fn get_key_value(&self, k: &Q) -> Option<(&K, &V)> + where K: Borrow, + Q: Hash + Eq + { + self.search(k).map(|bucket| bucket.into_refs()) + } + /// Returns true if the map contains a value for the specified key. /// /// The key may be any borrowed form of the map's key type, but From bd286413443c31c99330358967fb0159de8a3589 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 19 Mar 2018 10:58:30 -0700 Subject: [PATCH 12/12] rustbuild: Disable docs on cross-compiled builds This commit disables building documentation on cross-compiled compilers, for example ARM/MIPS/PowerPC/etc. Currently I believe we're not getting much use out of these documentation artifacts and they often take 10-15 minutes total to build as it requires building rustdoc/rustbook and then also generating all the documentation, especially for the reference and the book itself. In an effort to cut down on the amount of work that we're doing on dist CI builders in light of recent timeouts this was some relatively low hanging fruit to cut which in theory won't have much impact on the ecosystem in the hopes that the documentation isn't used too heavily anyway. While initial analysis in #48827 showed only shaving 5 minutes off local builds the same 5 minute conclusion was drawn from #48826 which ended up having nearly a half-hour impact on the bots. In that sense I'm hoping that we can land this and test out what happens on CI to see how it affects timing. Note that all tier 1 platforms, Windows, Mac, and Linux, will continue to generate documentation. --- src/bootstrap/compile.rs | 11 +++++------ src/bootstrap/tool.rs | 4 ++++ src/ci/docker/dist-aarch64-linux/Dockerfile | 2 +- src/ci/docker/dist-android/Dockerfile | 3 ++- src/ci/docker/dist-arm-linux/Dockerfile | 2 +- src/ci/docker/dist-armhf-linux/Dockerfile | 2 +- src/ci/docker/dist-armv7-linux/Dockerfile | 2 +- src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile | 3 ++- src/ci/docker/dist-i686-freebsd/Dockerfile | 2 +- src/ci/docker/dist-mips-linux/Dockerfile | 2 +- src/ci/docker/dist-mips64-linux/Dockerfile | 2 +- src/ci/docker/dist-mips64el-linux/Dockerfile | 2 +- src/ci/docker/dist-mipsel-linux/Dockerfile | 2 +- src/ci/docker/dist-powerpc-linux/Dockerfile | 2 +- src/ci/docker/dist-powerpc64-linux/Dockerfile | 2 +- src/ci/docker/dist-powerpc64le-linux/Dockerfile | 2 +- src/ci/docker/dist-s390x-linux/Dockerfile | 2 +- src/ci/docker/dist-various-1/Dockerfile | 3 ++- src/ci/docker/dist-various-2/Dockerfile | 2 +- src/ci/docker/dist-x86_64-freebsd/Dockerfile | 2 +- src/ci/docker/dist-x86_64-musl/Dockerfile | 3 ++- src/ci/docker/dist-x86_64-netbsd/Dockerfile | 2 +- 22 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index fafa446338189..a1318086af7e9 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -98,7 +98,7 @@ impl Step for Std { copy_musl_third_party_objects(build, target, &libdir); } - let out_dir = build.stage_out(compiler, Mode::Libstd); + let out_dir = build.cargo_out(compiler, Mode::Libstd, target); build.clear_if_dirty(&out_dir, &builder.rustc(compiler)); let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "build"); std_cargo(builder, &compiler, target, &mut cargo); @@ -360,7 +360,7 @@ impl Step for Test { return; } - let out_dir = build.stage_out(compiler, Mode::Libtest); + let out_dir = build.cargo_out(compiler, Mode::Libtest, target); build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target)); let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "build"); test_cargo(build, &compiler, target, &mut cargo); @@ -482,10 +482,9 @@ impl Step for Rustc { compiler: builder.compiler(self.compiler.stage, build.build), target: build.build, }); - - let stage_out = builder.stage_out(compiler, Mode::Librustc); - build.clear_if_dirty(&stage_out, &libstd_stamp(build, compiler, target)); - build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target)); + let cargo_out = builder.cargo_out(compiler, Mode::Librustc, target); + build.clear_if_dirty(&cargo_out, &libstd_stamp(build, compiler, target)); + build.clear_if_dirty(&cargo_out, &libtest_stamp(build, compiler, target)); let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build"); rustc_cargo(build, &mut cargo); diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index d308cecb27521..669308c8dd0ef 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -338,6 +338,10 @@ impl Step for Rustdoc { }; builder.ensure(compile::Rustc { compiler: build_compiler, target }); + builder.ensure(compile::Rustc { + compiler: build_compiler, + target: builder.build.build, + }); let mut cargo = prepare_tool_cargo(builder, build_compiler, diff --git a/src/ci/docker/dist-aarch64-linux/Dockerfile b/src/ci/docker/dist-aarch64-linux/Dockerfile index dbc319312aa9f..cddfa557f6aed 100644 --- a/src/ci/docker/dist-aarch64-linux/Dockerfile +++ b/src/ci/docker/dist-aarch64-linux/Dockerfile @@ -32,5 +32,5 @@ ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \ ENV HOSTS=aarch64-unknown-linux-gnu -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-android/Dockerfile b/src/ci/docker/dist-android/Dockerfile index aa5da136758a0..e00c23dac89b0 100644 --- a/src/ci/docker/dist-android/Dockerfile +++ b/src/ci/docker/dist-android/Dockerfile @@ -26,7 +26,8 @@ ENV RUST_CONFIGURE_ARGS \ --armv7-linux-androideabi-ndk=/android/ndk/arm-14 \ --i686-linux-android-ndk=/android/ndk/x86-14 \ --aarch64-linux-android-ndk=/android/ndk/arm64-21 \ - --x86_64-linux-android-ndk=/android/ndk/x86_64-21 + --x86_64-linux-android-ndk=/android/ndk/x86_64-21 \ + --disable-docs ENV SCRIPT python2.7 ../x.py dist --target $TARGETS diff --git a/src/ci/docker/dist-arm-linux/Dockerfile b/src/ci/docker/dist-arm-linux/Dockerfile index 89f7f85cb3b17..6ddc5c1e04ae3 100644 --- a/src/ci/docker/dist-arm-linux/Dockerfile +++ b/src/ci/docker/dist-arm-linux/Dockerfile @@ -32,5 +32,5 @@ ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \ ENV HOSTS=arm-unknown-linux-gnueabi -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-armhf-linux/Dockerfile b/src/ci/docker/dist-armhf-linux/Dockerfile index e0c1b9a9e8589..e4d4b2feeec40 100644 --- a/src/ci/docker/dist-armhf-linux/Dockerfile +++ b/src/ci/docker/dist-armhf-linux/Dockerfile @@ -32,5 +32,5 @@ ENV CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \ ENV HOSTS=arm-unknown-linux-gnueabihf -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-armv7-linux/Dockerfile b/src/ci/docker/dist-armv7-linux/Dockerfile index e7d4f464ffcd2..99fe7bd7b8f78 100644 --- a/src/ci/docker/dist-armv7-linux/Dockerfile +++ b/src/ci/docker/dist-armv7-linux/Dockerfile @@ -32,5 +32,5 @@ ENV CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \ ENV HOSTS=armv7-unknown-linux-gnueabihf -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile index 7bcc649f4aa5c..e12bed3abc5ad 100644 --- a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile +++ b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile @@ -32,7 +32,8 @@ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS \ --musl-root-i586=/musl-i586 \ --musl-root-i686=/musl-i686 \ - --enable-extended + --enable-extended \ + --disable-docs # Newer binutils broke things on some vms/distros (i.e., linking against # unknown relocs disabled by the following flag), so we need to go out of our diff --git a/src/ci/docker/dist-i686-freebsd/Dockerfile b/src/ci/docker/dist-i686-freebsd/Dockerfile index 1f595ba7a290f..6f6a663a33093 100644 --- a/src/ci/docker/dist-i686-freebsd/Dockerfile +++ b/src/ci/docker/dist-i686-freebsd/Dockerfile @@ -29,5 +29,5 @@ ENV \ ENV HOSTS=i686-unknown-freebsd -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-mips-linux/Dockerfile b/src/ci/docker/dist-mips-linux/Dockerfile index 37ab5bdcce555..466def1f80fbf 100644 --- a/src/ci/docker/dist-mips-linux/Dockerfile +++ b/src/ci/docker/dist-mips-linux/Dockerfile @@ -22,5 +22,5 @@ RUN sh /scripts/sccache.sh ENV HOSTS=mips-unknown-linux-gnu -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-mips64-linux/Dockerfile b/src/ci/docker/dist-mips64-linux/Dockerfile index a5180780b2259..2205b733e99f1 100644 --- a/src/ci/docker/dist-mips64-linux/Dockerfile +++ b/src/ci/docker/dist-mips64-linux/Dockerfile @@ -21,5 +21,5 @@ RUN sh /scripts/sccache.sh ENV HOSTS=mips64-unknown-linux-gnuabi64 -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-mips64el-linux/Dockerfile b/src/ci/docker/dist-mips64el-linux/Dockerfile index d38ed24f6255f..f1d9dad46ea3f 100644 --- a/src/ci/docker/dist-mips64el-linux/Dockerfile +++ b/src/ci/docker/dist-mips64el-linux/Dockerfile @@ -22,5 +22,5 @@ RUN sh /scripts/sccache.sh ENV HOSTS=mips64el-unknown-linux-gnuabi64 -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-mipsel-linux/Dockerfile b/src/ci/docker/dist-mipsel-linux/Dockerfile index 491c57ba67737..ee73e29c76e35 100644 --- a/src/ci/docker/dist-mipsel-linux/Dockerfile +++ b/src/ci/docker/dist-mipsel-linux/Dockerfile @@ -21,5 +21,5 @@ RUN sh /scripts/sccache.sh ENV HOSTS=mipsel-unknown-linux-gnu -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-powerpc-linux/Dockerfile b/src/ci/docker/dist-powerpc-linux/Dockerfile index c503f2af9cdaa..f03aff060c103 100644 --- a/src/ci/docker/dist-powerpc-linux/Dockerfile +++ b/src/ci/docker/dist-powerpc-linux/Dockerfile @@ -34,7 +34,7 @@ ENV \ ENV HOSTS=powerpc-unknown-linux-gnu -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS # FIXME(#36150) this will fail the bootstrap. Probably means something bad is diff --git a/src/ci/docker/dist-powerpc64-linux/Dockerfile b/src/ci/docker/dist-powerpc64-linux/Dockerfile index 4a3691777360b..bb30210c0563a 100644 --- a/src/ci/docker/dist-powerpc64-linux/Dockerfile +++ b/src/ci/docker/dist-powerpc64-linux/Dockerfile @@ -35,5 +35,5 @@ ENV \ ENV HOSTS=powerpc64-unknown-linux-gnu -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-powerpc64le-linux/Dockerfile b/src/ci/docker/dist-powerpc64le-linux/Dockerfile index bf6c8b4b71211..ee9e455048352 100644 --- a/src/ci/docker/dist-powerpc64le-linux/Dockerfile +++ b/src/ci/docker/dist-powerpc64le-linux/Dockerfile @@ -32,5 +32,5 @@ ENV \ ENV HOSTS=powerpc64le-unknown-linux-gnu -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-s390x-linux/Dockerfile b/src/ci/docker/dist-s390x-linux/Dockerfile index a2ebf590bab74..7ba6fe643c2ae 100644 --- a/src/ci/docker/dist-s390x-linux/Dockerfile +++ b/src/ci/docker/dist-s390x-linux/Dockerfile @@ -34,5 +34,5 @@ ENV \ ENV HOSTS=s390x-unknown-linux-gnu -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile index a23153645cde2..b398e9a3c92ef 100644 --- a/src/ci/docker/dist-various-1/Dockerfile +++ b/src/ci/docker/dist-various-1/Dockerfile @@ -95,7 +95,8 @@ ENV RUST_CONFIGURE_ARGS \ --musl-root-aarch64=/musl-aarch64 \ --musl-root-mips=/musl-mips \ --musl-root-mipsel=/musl-mipsel \ - --enable-emscripten + --enable-emscripten \ + --disable-docs ENV SCRIPT python2.7 ../x.py dist --target $TARGETS diff --git a/src/ci/docker/dist-various-2/Dockerfile b/src/ci/docker/dist-various-2/Dockerfile index 4505a60e46396..e8d6c12de4474 100644 --- a/src/ci/docker/dist-various-2/Dockerfile +++ b/src/ci/docker/dist-various-2/Dockerfile @@ -55,5 +55,5 @@ ENV TARGETS=$TARGETS,x86_64-sun-solaris ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32 ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --target $TARGETS diff --git a/src/ci/docker/dist-x86_64-freebsd/Dockerfile b/src/ci/docker/dist-x86_64-freebsd/Dockerfile index dd595a192051f..698b81a92e935 100644 --- a/src/ci/docker/dist-x86_64-freebsd/Dockerfile +++ b/src/ci/docker/dist-x86_64-freebsd/Dockerfile @@ -29,5 +29,5 @@ ENV \ ENV HOSTS=x86_64-unknown-freebsd -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile index 3a9ad178c6390..06f8a2fbba836 100644 --- a/src/ci/docker/dist-x86_64-musl/Dockerfile +++ b/src/ci/docker/dist-x86_64-musl/Dockerfile @@ -31,7 +31,8 @@ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS \ --musl-root-x86_64=/musl-x86_64 \ - --enable-extended + --enable-extended \ + --disable-docs # Newer binutils broke things on some vms/distros (i.e., linking against # unknown relocs disabled by the following flag), so we need to go out of our diff --git a/src/ci/docker/dist-x86_64-netbsd/Dockerfile b/src/ci/docker/dist-x86_64-netbsd/Dockerfile index 06298a12fc70a..a17a7ebc03dd1 100644 --- a/src/ci/docker/dist-x86_64-netbsd/Dockerfile +++ b/src/ci/docker/dist-x86_64-netbsd/Dockerfile @@ -33,5 +33,5 @@ ENV \ ENV HOSTS=x86_64-unknown-netbsd -ENV RUST_CONFIGURE_ARGS --enable-extended +ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS