Rollup merge of #74370 - Manishearth:re-spotlight, r=GuillaumeGomez
Reintroduce spotlight / "important traits" feature (Reopened version of https://github.com/rust-lang/rust/pull/74111 because Github is broken, see discussion there) Fixes https://github.com/rust-lang/rust/issues/73785 This PR reintroduces the "spotlight" ("important traits") feature. A couple changes have been made: As there were concerns about its visibility, it has been moved to be next to the return type, as opposed to being on the side. It also no longer produces a modal, it shows the traits on hover, and it can be clicked on to pin the hover bubble.   It also works fine on mobile: 
This commit is contained in:
commit
fc098170ce
23 changed files with 284 additions and 15 deletions
4
src/test/ui/feature-gates/feature-gate-doc_spotlight.rs
Normal file
4
src/test/ui/feature-gates/feature-gate-doc_spotlight.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#[doc(spotlight)] //~ ERROR: `#[doc(spotlight)]` is experimental
|
||||
trait SomeTrait {}
|
||||
|
||||
fn main() {}
|
||||
12
src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr
Normal file
12
src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
error[E0658]: `#[doc(spotlight)]` is experimental
|
||||
--> $DIR/feature-gate-doc_spotlight.rs:1:1
|
||||
|
|
||||
LL | #[doc(spotlight)]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #45040 <https://github.com/rust-lang/rust/issues/45040> for more information
|
||||
= help: add `#![feature(doc_spotlight)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue