Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 12 pull requests #59478

Merged
merged 37 commits into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b524ade
Refactor generic parameter encoder functions
varkor Feb 19, 2019
7a23725
Rename encode_info_for_generic_param to encode_info_for_ty_in_generic…
varkor Feb 26, 2019
6217ee1
Add `EntryKind::TypeParam` and `EntryKind::ConstParam`
varkor Mar 14, 2019
6cd6759
Do not complain about unmentioned fields in recovered patterns
estebank Mar 15, 2019
727a15f
Fix aarch64 typo
Jan 20, 2019
8485f58
Fix AArch64 typo in comments
Jan 20, 2019
62c159e
Fix missing cfg for aarch64 + ios in ffi.rs
Feb 25, 2019
45e9acc
Include llvm-ar with llvm-tools component
phil-opp Mar 21, 2019
cf8347b
fs::copy() set file mode early
haraldh Feb 28, 2019
7dd8b77
hir: replace NodeId with HirId in ItemId
ljedrz Mar 11, 2019
cb4ac71
Allocate HIR id counters for use trees in MiscCollector
Zoxc Mar 16, 2019
f7c66fb
Allocate HIR id counters on demand
Zoxc Mar 25, 2019
2a42819
Remove the block on natvis for lld-link.
TheGoddessInari Mar 26, 2019
080a8e7
Prevent cache issues on version updates
GuillaumeGomez Mar 1, 2019
2d6745d
Add resource suffix for libtest and proc_macro as well
GuillaumeGomez Mar 12, 2019
50c50e3
Handle RUSTDOC_RESOURCE_SUFFIX env variable for rustdoc build
GuillaumeGomez Mar 25, 2019
d339b89
Use consistent phrasing for all macro summaries
benesch Mar 26, 2019
5652dd6
Fix error index CSS file name
GuillaumeGomez Mar 26, 2019
a68a0e3
Add documentation about `for` used as higher ranked trait bounds
czipperz Mar 27, 2019
65b5e57
Make into itemized list and fix some wording
czipperz Mar 27, 2019
3e0db7c
Clarify behavior of dbg macro
benesch Mar 27, 2019
f0a7610
Add higher-ranked trait bounds link
czipperz Mar 27, 2019
2545250
Move link to rust book to next line to pass 100 column limit
czipperz Mar 28, 2019
ffaa5c9
Document that `std::io::BufReader` discards contents on drop
czipperz Mar 28, 2019
e1e0e53
Fix link capitalization in documentation of std::io::BufWriter.
czipperz Mar 28, 2019
c313647
Rollup merge of #57987 - parched:va-args, r=joshtriplett
Centril Mar 28, 2019
5a90b66
Rollup merge of #58581 - varkor:const-generics-encoder-refactor, r=eddyb
Centril Mar 28, 2019
83d91d3
Rollup merge of #58803 - haraldh:fs_copy_fix, r=alexcrichton
Centril Mar 28, 2019
20f063a
Rollup merge of #58848 - GuillaumeGomez:fix-cache-issues, r=Mark-Simu…
Centril Mar 28, 2019
dcd531e
Rollup merge of #59198 - estebank:recovered-pattern, r=zackmdavis
Centril Mar 28, 2019
e04b7b8
Rollup merge of #59351 - phil-opp:llvm-ar, r=alexcrichton
Centril Mar 28, 2019
95ef5eb
Rollup merge of #59413 - Zoxc:hirid, r=oli-obk
Centril Mar 28, 2019
02c1e3d
Rollup merge of #59441 - TheGoddessInari:natvis, r=alexcrichton
Centril Mar 28, 2019
2ee038a
Rollup merge of #59448 - benesch:macro-doc, r=Centril
Centril Mar 28, 2019
d5b8048
Rollup merge of #59456 - czipperz:for-keyword-document-higher-ranked-…
Centril Mar 28, 2019
2d171d8
Rollup merge of #59472 - czipperz:bufreader-document-drop-discards, r…
Centril Mar 28, 2019
d403cd7
Rollup merge of #59474 - czipperz:bufwriter-fix-link-capitalization, …
Centril Mar 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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