Skip to content

Commit

Permalink
Auto merge of #59478 - Centril:rollup, r=Centril
Browse files Browse the repository at this point in the history
Rollup of 12 pull requests

Successful merges:

 - #57987 (Fix some AArch64 typos)
 - #58581 (Refactor generic parameter encoder functions)
 - #58803 (fs::copy() unix: set file mode early)
 - #58848 (Prevent cache issues on version updates)
 - #59198 (Do not complain about unmentioned fields in recovered patterns)
 - #59351 (Include llvm-ar with llvm-tools component)
 - #59413 (HirIdify hir::ItemId)
 - #59441 (Remove the block on natvis for lld-link.)
 - #59448 (Use consistent phrasing for all macro summaries)
 - #59456 (Add documentation about `for` used as higher ranked trait bounds)
 - #59472 (Document that `std::io::BufReader` discards contents on drop)
 - #59474 (Fix link capitalization in documentation of std::io::BufWriter.)

Failed merges:

r? @ghost
  • Loading branch information
bors committed Mar 28, 2019
2 parents 6bfe4b7 + d403cd7 commit 237bf32
Show file tree
Hide file tree
Showing 35 changed files with 341 additions and 298 deletions.
11 changes: 11 additions & 0 deletions src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ fn main() {
.arg("unstable-options");
}
cmd.arg("--generate-redirect-pages");
has_unstable = true;
}

// Needed to be able to run all rustdoc tests.
if let Some(ref x) = env::var_os("RUSTDOC_RESOURCE_SUFFIX") {
// This "unstable-options" can be removed when `--resource-suffix` is stabilized
if !has_unstable {
cmd.arg("-Z")
.arg("unstable-options");
}
cmd.arg("--resource-suffix").arg(x);
}

if verbose > 1 {
Expand Down
16 changes: 8 additions & 8 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,9 @@ fn invoke_rustdoc(
.arg("--html-before-content").arg(&version_info)
.arg("--html-in-header").arg(&header)
.arg("--markdown-no-toc")
.arg("--markdown-playground-url")
.arg("https://play.rust-lang.org/")
.arg("-o").arg(&out)
.arg(&path)
.arg("--markdown-css")
.arg("../rust.css");
.arg("--markdown-playground-url").arg("https://play.rust-lang.org/")
.arg("-o").arg(&out).arg(&path)
.arg("--markdown-css").arg("../rust.css");

builder.run(&mut cmd);
}
Expand Down Expand Up @@ -431,8 +428,7 @@ impl Step for Standalone {
.arg("--html-in-header").arg(&favicon)
.arg("--markdown-no-toc")
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"))
.arg("--markdown-playground-url")
.arg("https://play.rust-lang.org/")
.arg("--markdown-playground-url").arg("https://play.rust-lang.org/")
.arg("-o").arg(&out)
.arg(&path);

Expand Down Expand Up @@ -523,6 +519,7 @@ impl Step for Std {
.arg("--markdown-css").arg("rust.css")
.arg("--markdown-no-toc")
.arg("--generate-redirect-pages")
.arg("--resource-suffix").arg(crate::channel::CFG_RELEASE_NUM)
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"));

builder.run(&mut cargo);
Expand Down Expand Up @@ -589,6 +586,7 @@ impl Step for Test {

cargo.arg("--no-deps")
.arg("-p").arg("test")
.env("RUSTDOC_RESOURCE_SUFFIX", crate::channel::CFG_RELEASE_NUM)
.env("RUSTDOC_GENERATE_REDIRECT_PAGES", "1");

builder.run(&mut cargo);
Expand Down Expand Up @@ -660,6 +658,7 @@ impl Step for WhitelistedRustc {
// for which docs must be built.
for krate in &["proc_macro"] {
cargo.arg("-p").arg(krate)
.env("RUSTDOC_RESOURCE_SUFFIX", crate::channel::CFG_RELEASE_NUM)
.env("RUSTDOC_GENERATE_REDIRECT_PAGES", "1");
}

Expand Down Expand Up @@ -890,6 +889,7 @@ impl Step for ErrorIndex {
);
index.arg("html");
index.arg(out.join("error-index.html"));
index.arg(crate::channel::CFG_RELEASE_NUM);

// FIXME: shouldn't have to pass this env var
index.env("CFG_BUILD", &builder.config.build)
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const LLVM_TOOLS: &[&str] = &[
"llvm-readobj", // used to get information from ELFs/objects that the other tools don't provide
"llvm-size", // used to prints the size of the linker sections of a program
"llvm-strip", // used to discard symbols from binary files to reduce their size
"llvm-ar" // used for creating and modifying archive files
];

/// A structure representing a Rust compiler.
Expand Down
16 changes: 9 additions & 7 deletions src/libcore/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl fmt::Debug for c_void {
/// Basic implementation of a `va_list`.
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
not(target_arch = "x86_64")),
all(target_arch = "aarch4", target_os = "ios"),
all(target_arch = "aarch64", target_os = "ios"),
windows))]
#[unstable(feature = "c_variadic",
reason = "the `c_variadic` feature has not been properly tested on \
Expand All @@ -59,6 +59,7 @@ extern {

#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
not(target_arch = "x86_64")),
all(target_arch = "aarch64", target_os = "ios"),
windows))]
impl fmt::Debug for VaListImpl {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand All @@ -67,11 +68,11 @@ impl fmt::Debug for VaListImpl {
}

/// AArch64 ABI implementation of a `va_list`. See the
/// [Aarch64 Procedure Call Standard] for more details.
/// [AArch64 Procedure Call Standard] for more details.
///
/// [AArch64 Procedure Call Standard]:
/// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf
#[cfg(all(target_arch = "aarch64", not(windows)))]
#[cfg(all(target_arch = "aarch64", not(target_os = "ios"), not(windows)))]
#[repr(C)]
#[derive(Debug)]
#[unstable(feature = "c_variadic",
Expand Down Expand Up @@ -193,14 +194,14 @@ impl<'a> VaList<'a> {
where F: for<'copy> FnOnce(VaList<'copy>) -> R {
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
not(target_arch = "x86_64")),
all(target_arch = "aarch4", target_os = "ios"),
all(target_arch = "aarch64", target_os = "ios"),
windows))]
let mut ap = va_copy(self);
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"),
not(windows)))]
not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))]
let mut ap_inner = va_copy(self);
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"),
not(windows)))]
not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))]
let mut ap = VaList(&mut ap_inner);
let ret = f(VaList(ap.0));
va_end(&mut ap);
Expand All @@ -216,10 +217,11 @@ extern "rust-intrinsic" {
/// Copies the current location of arglist `src` to the arglist `dst`.
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
not(target_arch = "x86_64")),
all(target_arch = "aarch64", target_os = "ios"),
windows))]
fn va_copy<'a>(src: &VaList<'a>) -> VaList<'a>;
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"),
not(windows)))]
not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))]
fn va_copy(src: &VaList) -> VaListImpl;

/// Loads an argument of type `T` from the `va_list` `ap` and increment the
Expand Down
45 changes: 23 additions & 22 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/// Entry point of thread panic. For details, see `std::macros`.
/// Panics the current thread.
///
/// For details, see `std::macros`.
#[macro_export]
#[allow_internal_unstable(core_panic, __rust_unstable_column)]
#[stable(feature = "core", since = "1.6.0")]
Expand Down Expand Up @@ -132,7 +134,7 @@ macro_rules! assert_ne {
});
}

/// Ensure that a boolean expression is `true` at runtime.
/// Asserts that a boolean expression is `true` at runtime.
///
/// This will invoke the [`panic!`] macro if the provided expression cannot be
/// evaluated to `true` at runtime.
Expand Down Expand Up @@ -236,8 +238,7 @@ macro_rules! debug_assert_ne {
($($arg:tt)*) => (if cfg!(debug_assertions) { assert_ne!($($arg)*); })
}

/// Helper macro for reducing boilerplate code for matching `Result` together
/// with converting downstream errors.
/// Unwraps a result or propagates its error.
///
/// The `?` operator was added to replace `try!` and should be used instead.
/// Furthermore, `try` is a reserved word in Rust 2018, so if you must use
Expand Down Expand Up @@ -312,7 +313,7 @@ macro_rules! r#try {
($expr:expr,) => (r#try!($expr));
}

/// Write formatted data into a buffer.
/// Writes formatted data into a buffer.
///
/// This macro accepts a format string, a list of arguments, and a 'writer'. Arguments will be
/// formatted according to the specified format string and the result will be passed to the writer.
Expand Down Expand Up @@ -434,7 +435,7 @@ macro_rules! writeln {
);
}

/// A utility macro for indicating unreachable code.
/// Indicates unreachable code.
///
/// This is useful any time that the compiler can't determine that some code is unreachable. For
/// example:
Expand Down Expand Up @@ -502,7 +503,7 @@ macro_rules! unreachable {
});
}

/// A standardized placeholder for marking unfinished code.
/// Indicates unfinished code.
///
/// This can be useful if you are prototyping and are just looking to have your
/// code type-check, or if you're implementing a trait that requires multiple
Expand Down Expand Up @@ -559,10 +560,10 @@ macro_rules! unimplemented {
($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)*)));
}

/// A standardized placeholder for marking unfinished code.
/// Indicates unfinished code.
///
/// This can be useful if you are prototyping and are just looking to have your
/// code typecheck. `todo!` works exactly like `unimplemented!`, there only
/// code typecheck. `todo!` works exactly like `unimplemented!`. The only
/// difference between the two macros is the name.
///
/// # Panics
Expand Down Expand Up @@ -618,7 +619,7 @@ macro_rules! todo {
($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)*)));
}

/// A macro to create an array of [`MaybeUninit`]
/// Creates an array of [`MaybeUninit`].
///
/// This macro constructs an uninitialized array of the type `[MaybeUninit<K>; N]`.
///
Expand All @@ -645,7 +646,7 @@ macro_rules! uninitialized_array {
#[cfg(rustdoc)]
mod builtin {

/// Unconditionally causes compilation to fail with the given error message when encountered.
/// Causes compilation to fail with the given error message when encountered.
///
/// For more information, see the documentation for [`std::compile_error!`].
///
Expand All @@ -657,7 +658,7 @@ mod builtin {
($msg:expr,) => ({ /* compiler built-in */ });
}

/// The core macro for formatted string creation & output.
/// Constructs parameters for the other string-formatting macros.
///
/// For more information, see the documentation for [`std::format_args!`].
///
Expand All @@ -669,7 +670,7 @@ mod builtin {
($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ });
}

/// Inspect an environment variable at compile time.
/// Inspects an environment variable at compile time.
///
/// For more information, see the documentation for [`std::env!`].
///
Expand All @@ -681,7 +682,7 @@ mod builtin {
($name:expr,) => ({ /* compiler built-in */ });
}

/// Optionally inspect an environment variable at compile time.
/// Optionally inspects an environment variable at compile time.
///
/// For more information, see the documentation for [`std::option_env!`].
///
Expand All @@ -693,7 +694,7 @@ mod builtin {
($name:expr,) => ({ /* compiler built-in */ });
}

/// Concatenate identifiers into one identifier.
/// Concatenates identifiers into one identifier.
///
/// For more information, see the documentation for [`std::concat_idents!`].
///
Expand All @@ -717,7 +718,7 @@ mod builtin {
($($e:expr,)*) => ({ /* compiler built-in */ });
}

/// A macro which expands to the line number on which it was invoked.
/// Expands to the line number on which it was invoked.
///
/// For more information, see the documentation for [`std::line!`].
///
Expand All @@ -726,7 +727,7 @@ mod builtin {
#[rustc_doc_only_macro]
macro_rules! line { () => ({ /* compiler built-in */ }) }

/// A macro which expands to the column number on which it was invoked.
/// Expands to the column number on which it was invoked.
///
/// For more information, see the documentation for [`std::column!`].
///
Expand All @@ -735,7 +736,7 @@ mod builtin {
#[rustc_doc_only_macro]
macro_rules! column { () => ({ /* compiler built-in */ }) }

/// A macro which expands to the file name from which it was invoked.
/// Expands to the file name from which it was invoked.
///
/// For more information, see the documentation for [`std::file!`].
///
Expand All @@ -744,7 +745,7 @@ mod builtin {
#[rustc_doc_only_macro]
macro_rules! file { () => ({ /* compiler built-in */ }) }

/// A macro which stringifies its arguments.
/// Stringifies its arguments.
///
/// For more information, see the documentation for [`std::stringify!`].
///
Expand Down Expand Up @@ -786,7 +787,7 @@ mod builtin {
#[rustc_doc_only_macro]
macro_rules! module_path { () => ({ /* compiler built-in */ }) }

/// Boolean evaluation of configuration flags, at compile-time.
/// Evaluates boolean combinations of configuration flags, at compile-time.
///
/// For more information, see the documentation for [`std::cfg!`].
///
Expand All @@ -795,7 +796,7 @@ mod builtin {
#[rustc_doc_only_macro]
macro_rules! cfg { ($($cfg:tt)*) => ({ /* compiler built-in */ }) }

/// Parse a file as an expression or an item according to the context.
/// Parses a file as an expression or an item according to the context.
///
/// For more information, see the documentation for [`std::include!`].
///
Expand All @@ -807,7 +808,7 @@ mod builtin {
($file:expr,) => ({ /* compiler built-in */ });
}

/// Ensure that a boolean expression is `true` at runtime.
/// Asserts that a boolean expression is `true` at runtime.
///
/// For more information, see the documentation for [`std::assert!`].
///
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub trait Visitor<'v> : Sized {
/// but cannot supply a `Map`; see `nested_visit_map` for advice.
#[allow(unused_variables)]
fn visit_nested_item(&mut self, id: ItemId) {
let opt_item = self.nested_visit_map().inter().map(|map| map.expect_item(id.id));
let opt_item = self.nested_visit_map().inter().map(|map| map.expect_item_by_hir_id(id.id));
if let Some(item) = opt_item {
self.visit_item(item);
}
Expand Down
Loading

0 comments on commit 237bf32

Please sign in to comment.