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 16 pull requests #84975

Closed
wants to merge 45 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1f32d40
BufWriter: apply #[inline] / #[inline(never)] optimizations
tgnottingham Dec 11, 2020
b43e8e2
BufWriter: avoid using expensive Vec methods
tgnottingham Dec 11, 2020
5fd9372
BufWriter: optimize for write sizes less than buffer size
tgnottingham Dec 13, 2020
72aecbf
BufWriter: handle possibility of overflow
tgnottingham Dec 15, 2020
85bc88d
BufWriter: use #[cold] and less aggressive #[inline] hints
tgnottingham Jan 5, 2021
0f29dc4
BufWriter: simplify buffer draining
tgnottingham Apr 13, 2021
01e7018
BufWriter: improve safety comment
tgnottingham Apr 14, 2021
33cc3f5
Stablize {HashMap,BTreeMap}::into_{keys,values}
Folyd Apr 18, 2021
52fa9da
Rework `wasm::thread` to `thread_atomics`
CDirkx Apr 28, 2021
fab8410
Move `wasm` atomics code to `wasm/atomics`
CDirkx Apr 28, 2021
45bc193
Reuse `unsupported::args` on `wasm`
CDirkx Apr 28, 2021
cf79c06
Fix missing import in `unsupported::args`
CDirkx Apr 28, 2021
8a2e67e
Simplify chdir implementation and minimize unsafe block
joshtriplett Apr 29, 2021
4a63e1e
Allow using `core::` in intra-doc links within core itself
jyn514 Apr 30, 2021
367c1db
:arrow_up: rust-analyzer
lnicola May 3, 2021
6eb4735
Unify rustc and rustdoc parsing of `cfg()`
jyn514 Apr 22, 2021
6b64202
Handle incorrect placement of parentheses in trait bounds more gracef…
estebank May 4, 2021
0b94338
CTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs
RalfJung May 4, 2021
196899a
Update compiler-builtins to 0.1.42 to get fix for outlined atomics
joshtriplett Apr 30, 2021
4bd5505
Only compute Obligation `cache_key` once in `register_obligation_at`
estebank May 4, 2021
42405b4
Fix typo in `MaybeUninit::array_assume_init` safety comment
sdroege May 5, 2021
5b34bf4
Revert PR 83866
pietroalbini May 5, 2021
b6f3dbb
Bump map_into_keys_values stable version to 1.54.0.
m-ou-se May 5, 2021
3584c1d
Disallows `#![feature(no_coverage)]` on stable and beta
richkadel May 3, 2021
4617b03
E0583: Include secondary path in error message
fee1-dead May 5, 2021
568d9c5
compiletest: Add --target-panic, needs-unwind
tmandry Apr 29, 2021
e1a8ecf
Add needs-unwind to tests
tmandry Apr 29, 2021
1993e1a
Support multi target-rustcflags for -Zpanic-abort-tests
tmandry Apr 30, 2021
947ad58
Fix up/ignore failing ui tests on fuchsia
tmandry Apr 30, 2021
b02d15d
Rollup merge of #79930 - tgnottingham:bufwriter_performance, r=m-ou-se
Dylan-DPC May 6, 2021
81dfbfb
Rollup merge of #84328 - Folyd:stablize_map_into_keys_values, r=m-ou-se
Dylan-DPC May 6, 2021
e1873b2
Rollup merge of #84442 - jyn514:doc-cfg, r=petrochenkov
Dylan-DPC May 6, 2021
d2532c1
Rollup merge of #84655 - CDirkx:wasm, r=m-ou-se
Dylan-DPC May 6, 2021
2c98926
Rollup merge of #84712 - joshtriplett:simplify-chdir, r=yaahc
Dylan-DPC May 6, 2021
f74ad9e
Rollup merge of #84734 - tmandry:compiletest-needs-unwind, r=Mark-Sim…
Dylan-DPC May 6, 2021
f5ed444
Rollup merge of #84755 - jyn514:core-links, r=kennytm
Dylan-DPC May 6, 2021
3a09e05
Rollup merge of #84764 - joshtriplett:update-compiler-builtins, r=Ama…
Dylan-DPC May 6, 2021
8ebb164
Rollup merge of #84851 - lnicola:rust-analyzer-2021-05-03, r=jonas-sc…
Dylan-DPC May 6, 2021
c6556ea
Rollup merge of #84871 - richkadel:no-coverage-unstable-only, r=nagisa
Dylan-DPC May 6, 2021
4956b12
Rollup merge of #84896 - estebank:issue-84772, r=jackh726
Dylan-DPC May 6, 2021
372dfe4
Rollup merge of #84905 - RalfJung:copy, r=oli-obk
Dylan-DPC May 6, 2021
796b745
Rollup merge of #84923 - estebank:as_cache_key-once, r=petrochenkov
Dylan-DPC May 6, 2021
b39024d
Rollup merge of #84945 - fee1-dead:E0583-better-message, r=petrochenkov
Dylan-DPC May 6, 2021
0c94c4b
Rollup merge of #84949 - sdroege:maybe-unint-typo, r=m-ou-se
Dylan-DPC May 6, 2021
ab65989
Rollup merge of #84950 - pietroalbini:revert-3478f83c0, r=Mark-Simula…
Dylan-DPC May 6, 2021
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
Prev Previous commit
Next Next commit
Revert PR 83866
That PR caused multiple test failures when Rust's channel is changed
from nightly to anything else. The commit will have to be landed again
after the test suite is fixed.
pietroalbini committed May 5, 2021
commit 5b34bf460c68aea356633fd17760a99cc0794f4f
7 changes: 3 additions & 4 deletions src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
@@ -517,10 +517,9 @@ impl Item {
Some(ExternalLocation::Remote(ref s)) => {
format!("{}/std/", s.trim_end_matches('/'))
}
Some(ExternalLocation::Unknown) | None => format!(
"https://doc.rust-lang.org/{}/std/",
crate::doc_rust_lang_org_channel(),
),
Some(ExternalLocation::Unknown) | None => {
"https://doc.rust-lang.org/nightly/std/".to_string()
}
};
// This is a primitive so the url is done "by hand".
let tail = fragment.find('#').unwrap_or_else(|| fragment.len());
11 changes: 0 additions & 11 deletions src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
@@ -542,14 +542,3 @@ crate fn has_doc_flag(attrs: ty::Attributes<'_>, flag: Symbol) -> bool {
&& attr.meta_item_list().map_or(false, |l| rustc_attr::list_contains_name(&l, flag))
})
}

/// Return a channel suitable for using in a `doc.rust-lang.org/{channel}` format string.
crate fn doc_rust_lang_org_channel() -> &'static str {
match env!("CFG_RELEASE_CHANNEL") {
"stable" => env!("CFG_RELEASE_NUM"),
"beta" => "beta",
"nightly" | "dev" => "nightly",
// custom build of rustdoc maybe? link to the stable docs just in case
_ => "",
}
}
9 changes: 3 additions & 6 deletions src/librustdoc/core.rs
Original file line number Diff line number Diff line change
@@ -406,18 +406,15 @@ crate fn run_global_ctxt(
let mut krate = tcx.sess.time("clean_crate", || clean::krate(&mut ctxt));

if krate.module.doc_value().map(|d| d.is_empty()).unwrap_or(true) {
let help = format!(
"The following guide may be of use:\n\
https://doc.rust-lang.org/{}/rustdoc/how-to-write-documentation.html",
crate::doc_rust_lang_org_channel(),
);
let help = "The following guide may be of use:\n\
https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation.html";
tcx.struct_lint_node(
crate::lint::MISSING_CRATE_LEVEL_DOCS,
DocContext::as_local_hir_id(tcx, krate.module.def_id).unwrap(),
|lint| {
let mut diag =
lint.build("no documentation found for this crate's top-level module");
diag.help(&help);
diag.help(help);
diag.emit();
},
);
7 changes: 1 addition & 6 deletions src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
@@ -82,8 +82,6 @@ use rustc_session::config::{make_crate_type_option, ErrorOutputType, RustcOptGro
use rustc_session::getopts;
use rustc_session::{early_error, early_warn};

use crate::clean::utils::doc_rust_lang_org_channel;

/// A macro to create a FxHashMap.
///
/// Example:
@@ -606,10 +604,7 @@ fn usage(argv0: &str) {
}
println!("{}", options.usage(&format!("{} [options] <input>", argv0)));
println!(" @path Read newline separated options from `path`\n");
println!(
"More information available at https://doc.rust-lang.org/{}/rustdoc/what-is-rustdoc.html",
doc_rust_lang_org_channel()
);
println!("More information available at https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html")
}

/// A result type used by several functions under `main()`.
9 changes: 1 addition & 8 deletions src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
@@ -2017,14 +2017,7 @@ fn disambiguator_error(
msg: &str,
) {
diag_info.link_range = disambiguator_range;
report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, msg, &diag_info, |diag, _sp| {
let msg = format!(
"see https://doc.rust-lang.org/{}/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators \
for more info about disambiguators",
crate::doc_rust_lang_org_channel(),
);
diag.note(&msg);
});
report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, msg, &diag_info, |_diag, _sp| {});
}

/// Report an ambiguity error, where there were multiple possible resolutions.
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ note: the lint level is defined here
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]`
= note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators

error: aborting due to previous error

11 changes: 0 additions & 11 deletions src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr
Original file line number Diff line number Diff line change
@@ -10,47 +10,36 @@ note: the lint level is defined here
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]`
= note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators

error: unknown disambiguator `bar`
--> $DIR/unknown-disambiguator.rs:3:35
|
LL | //! Linking to [foo@banana] and [`bar@banana!()`].
| ^^^
|
= note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators

error: unknown disambiguator `foo`
--> $DIR/unknown-disambiguator.rs:9:34
|
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
| ^^^
|
= note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators

error: unknown disambiguator `foo`
--> $DIR/unknown-disambiguator.rs:9:48
|
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
| ^^^
|
= note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators

error: unknown disambiguator ``
--> $DIR/unknown-disambiguator.rs:6:31
|
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
| ^
|
= note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators

error: unknown disambiguator ``
--> $DIR/unknown-disambiguator.rs:6:57
|
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
| ^
|
= note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators

error: aborting due to 6 previous errors