diff options
| author | bors <bors@rust-lang.org> | 2021-06-05 18:41:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-05 18:41:36 +0000 |
| commit | ac3e680193a3e11e60b07840ffb1db12793de110 (patch) | |
| tree | d50ebabb06116361fe20d5ba83ce5cf4a135559f /src | |
| parent | 9104c898eb323f9edd205acf87c2b2d6badeddd7 (diff) | |
| parent | 16504f6253e6a49b3896449a5e2e0f48cb1ab3a2 (diff) | |
| download | rust-ac3e680193a3e11e60b07840ffb1db12793de110.tar.gz rust-ac3e680193a3e11e60b07840ffb1db12793de110.zip | |
Auto merge of #86032 - GuillaumeGomez:rollup-y3ij27b, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #83646 (Add a map method to Bound) - #85501 (Fix `deny(invalid_doc_attributes)`) - #85503 (rustdoc: add tooltips to some buttons) - #85710 (Document `From` impls in path.rs) - #85760 (Possible errors when accessing file metadata are platform specific) - #85974 (td align attribute) - #86014 (msp430 linker does not accept -znoexecstack. Set linker_is_gnu to fal…) Failed merges: - #85972 (Rustdoc html fixes) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/core.rs | 3 | ||||
| -rw-r--r-- | src/librustdoc/html/layout.rs | 6 | ||||
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/doc-spotlight.fixed | 5 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/doc-spotlight.rs | 5 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/doc-spotlight.stderr | 13 | ||||
| -rw-r--r-- | src/test/ui/rustdoc/deny-invalid-doc-attrs.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/rustdoc/deny-invalid-doc-attrs.stderr | 16 |
8 files changed, 42 insertions, 15 deletions
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 52cae5631c8..c3d9c4ea7f2 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -217,8 +217,9 @@ crate fn create_config( // By default, rustdoc ignores all lints. // Specifically unblock lints relevant to documentation or the lint machinery itself. let mut lints_to_show = vec![ - // it's unclear whether this should be part of rustdoc directly (#77364) + // it's unclear whether these should be part of rustdoc directly (#77364) rustc_lint::builtin::MISSING_DOCS.name.to_string(), + rustc_lint::builtin::INVALID_DOC_ATTRIBUTES.name.to_string(), // these are definitely not part of rustdoc, but we want to warn on them anyway. rustc_lint::builtin::RENAMED_AND_REMOVED_LINTS.name.to_string(), rustc_lint::builtin::UNKNOWN_LINTS.name.to_string(), diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 429863f3635..7309a1da230 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -87,7 +87,7 @@ crate fn render<T: Print, S: Print>( {sidebar}\ </nav>\ <div class=\"theme-picker\">\ - <button id=\"theme-picker\" aria-label=\"Pick another theme!\" aria-haspopup=\"menu\">\ + <button id=\"theme-picker\" aria-label=\"Pick another theme!\" aria-haspopup=\"menu\" title=\"themes\">\ <img src=\"{static_root_path}brush{suffix}.svg\" \ width=\"18\" height=\"18\" \ alt=\"Pick another theme!\">\ @@ -105,8 +105,8 @@ crate fn render<T: Print, S: Print>( placeholder=\"Click or press ‘S’ to search, ‘?’ for more options…\" \ type=\"search\">\ </div>\ - <button type=\"button\" id=\"help-button\">?</button> - <a id=\"settings-menu\" href=\"{root_path}settings.html\">\ + <button type=\"button\" id=\"help-button\" title=\"help\">?</button> + <a id=\"settings-menu\" href=\"{root_path}settings.html\" title=\"settings\">\ <img src=\"{static_root_path}wheel{suffix}.svg\" \ width=\"18\" height=\"18\" \ alt=\"Change settings\">\ diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 1c5d9a26441..04464b622d7 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -78,7 +78,7 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer, write!(buf, "<a class=\"{}\" href=\"#\">{}</a>", item.type_(), item.name.as_ref().unwrap()); write!( buf, - "<button id=\"copy-path\" onclick=\"copy_path(this)\">\ + "<button id=\"copy-path\" onclick=\"copy_path(this)\" title=\"copy path\">\ <img src=\"{static_root_path}clipboard{suffix}.svg\" \ width=\"19\" height=\"18\" \ alt=\"Copy item import\" \ diff --git a/src/test/rustdoc-ui/doc-spotlight.fixed b/src/test/rustdoc-ui/doc-spotlight.fixed index 94b69a99879..4b58778eacd 100644 --- a/src/test/rustdoc-ui/doc-spotlight.fixed +++ b/src/test/rustdoc-ui/doc-spotlight.fixed @@ -1,9 +1,8 @@ -// check-pass // run-rustfix - +#![deny(warnings)] #![feature(doc_notable_trait)] #[doc(notable_trait)] -//~^ WARN unknown `doc` attribute `spotlight` +//~^ ERROR unknown `doc` attribute `spotlight` //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! trait MyTrait {} diff --git a/src/test/rustdoc-ui/doc-spotlight.rs b/src/test/rustdoc-ui/doc-spotlight.rs index cc5f159a809..16e38724580 100644 --- a/src/test/rustdoc-ui/doc-spotlight.rs +++ b/src/test/rustdoc-ui/doc-spotlight.rs @@ -1,9 +1,8 @@ -// check-pass // run-rustfix - +#![deny(warnings)] #![feature(doc_notable_trait)] #[doc(spotlight)] -//~^ WARN unknown `doc` attribute `spotlight` +//~^ ERROR unknown `doc` attribute `spotlight` //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! trait MyTrait {} diff --git a/src/test/rustdoc-ui/doc-spotlight.stderr b/src/test/rustdoc-ui/doc-spotlight.stderr index e5fa6293f3d..8e7831139a8 100644 --- a/src/test/rustdoc-ui/doc-spotlight.stderr +++ b/src/test/rustdoc-ui/doc-spotlight.stderr @@ -1,14 +1,19 @@ -warning: unknown `doc` attribute `spotlight` - --> $DIR/doc-spotlight.rs:6:7 +error: unknown `doc` attribute `spotlight` + --> $DIR/doc-spotlight.rs:5:7 | LL | #[doc(spotlight)] | ^^^^^^^^^ help: use `notable_trait` instead | - = note: `#[warn(invalid_doc_attributes)]` on by default +note: the lint level is defined here + --> $DIR/doc-spotlight.rs:2:9 + | +LL | #![deny(warnings)] + | ^^^^^^^^ + = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730> = note: `doc(spotlight)` was renamed to `doc(notable_trait)` = note: `doc(spotlight)` is now a no-op -warning: 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/rustdoc/deny-invalid-doc-attrs.rs b/src/test/ui/rustdoc/deny-invalid-doc-attrs.rs new file mode 100644 index 00000000000..02e9c67915f --- /dev/null +++ b/src/test/ui/rustdoc/deny-invalid-doc-attrs.rs @@ -0,0 +1,7 @@ +#![deny(invalid_doc_attributes)] +//~^ NOTE defined here +#![doc(x)] +//~^ ERROR unknown `doc` attribute `x` +//~| WARNING will become a hard error +//~| NOTE see issue #82730 +fn main() {} diff --git a/src/test/ui/rustdoc/deny-invalid-doc-attrs.stderr b/src/test/ui/rustdoc/deny-invalid-doc-attrs.stderr new file mode 100644 index 00000000000..a14ab8fe4bc --- /dev/null +++ b/src/test/ui/rustdoc/deny-invalid-doc-attrs.stderr @@ -0,0 +1,16 @@ +error: unknown `doc` attribute `x` + --> $DIR/deny-invalid-doc-attrs.rs:3:8 + | +LL | #![doc(x)] + | ^ + | +note: the lint level is defined here + --> $DIR/deny-invalid-doc-attrs.rs:1:9 + | +LL | #![deny(invalid_doc_attributes)] + | ^^^^^^^^^^^^^^^^^^^^^^ + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730> + +error: aborting due to previous error + |
