forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#127016 - bvanjoi:fix-126986, r=GuillaumeGom…
…ez,notriddle docs: check if the disambiguator matches its suffix Fixes rust-lang#126986 This PR makes it will not continue resolving when its disambiguator doesn't match the suffix format.
- Loading branch information
Showing
5 changed files
with
551 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
//@ check-pass | ||
|
||
//! [struct@m!()] //~ WARN: unmatched disambiguator `struct` and suffix `!()` | ||
//! [struct@m!{}] | ||
//! [struct@m![]] | ||
//! [struct@f()] //~ WARN: unmatched disambiguator `struct` and suffix `()` | ||
//! [struct@m!] //~ WARN: unmatched disambiguator `struct` and suffix `!` | ||
//! | ||
//! [enum@m!()] //~ WARN: unmatched disambiguator `enum` and suffix `!()` | ||
//! [enum@m!{}] | ||
//! [enum@m![]] | ||
//! [enum@f()] //~ WARN: unmatched disambiguator `enum` and suffix `()` | ||
//! [enum@m!] //~ WARN: unmatched disambiguator `enum` and suffix `!` | ||
//! | ||
//! [trait@m!()] //~ WARN: unmatched disambiguator `trait` and suffix `!()` | ||
//! [trait@m!{}] | ||
//! [trait@m![]] | ||
//! [trait@f()] //~ WARN: unmatched disambiguator `trait` and suffix `()` | ||
//! [trait@m!] //~ WARN: unmatched disambiguator `trait` and suffix `!` | ||
//! | ||
//! [module@m!()] //~ WARN: unmatched disambiguator `module` and suffix `!()` | ||
//! [module@m!{}] | ||
//! [module@m![]] | ||
//! [module@f()] //~ WARN: unmatched disambiguator `module` and suffix `()` | ||
//! [module@m!] //~ WARN: unmatched disambiguator `module` and suffix `!` | ||
//! | ||
//! [mod@m!()] //~ WARN: unmatched disambiguator `mod` and suffix `!()` | ||
//! [mod@m!{}] | ||
//! [mod@m![]] | ||
//! [mod@f()] //~ WARN: unmatched disambiguator `mod` and suffix `()` | ||
//! [mod@m!] //~ WARN: unmatched disambiguator `mod` and suffix `!` | ||
//! | ||
//! [const@m!()] //~ WARN: unmatched disambiguator `const` and suffix `!()` | ||
//! [const@m!{}] | ||
//! [const@m![]] | ||
//! [const@f()] //~ WARN: incompatible link kind for `f` | ||
//! [const@m!] //~ WARN: unmatched disambiguator `const` and suffix `!` | ||
//! | ||
//! [constant@m!()] //~ WARN: unmatched disambiguator `constant` and suffix `!()` | ||
//! [constant@m!{}] | ||
//! [constant@m![]] | ||
//! [constant@f()] //~ WARN: incompatible link kind for `f` | ||
//! [constant@m!] //~ WARN: unmatched disambiguator `constant` and suffix `!` | ||
//! | ||
//! [static@m!()] //~ WARN: unmatched disambiguator `static` and suffix `!()` | ||
//! [static@m!{}] | ||
//! [static@m![]] | ||
//! [static@f()] //~ WARN: incompatible link kind for `f` | ||
//! [static@m!] //~ WARN: unmatched disambiguator `static` and suffix `!` | ||
//! | ||
//! [function@m!()] //~ WARN: unmatched disambiguator `function` and suffix `!()` | ||
//! [function@m!{}] | ||
//! [function@m![]] | ||
//! [function@f()] | ||
//! [function@m!] //~ WARN: unmatched disambiguator `function` and suffix `!` | ||
//! | ||
//! [fn@m!()] //~ WARN: unmatched disambiguator `fn` and suffix `!()` | ||
//! [fn@m!{}] | ||
//! [fn@m![]] | ||
//! [fn@f()] | ||
//! [fn@m!] //~ WARN: unmatched disambiguator `fn` and suffix `!` | ||
//! | ||
//! [method@m!()] //~ WARN: unmatched disambiguator `method` and suffix `!()` | ||
//! [method@m!{}] | ||
//! [method@m![]] | ||
//! [method@f()] | ||
//! [method@m!] //~ WARN: unmatched disambiguator `method` and suffix `!` | ||
//! | ||
//! [derive@m!()] //~ WARN: incompatible link kind for `m` | ||
//! [derive@m!{}] //~ WARN: incompatible link kind for `m` | ||
//! [derive@m![]] | ||
//! [derive@f()] //~ WARN: unmatched disambiguator `derive` and suffix `()` | ||
//! [derive@m!] //~ WARN: incompatible link kind for `m` | ||
//! | ||
//! [type@m!()] //~ WARN: unmatched disambiguator `type` and suffix `!()` | ||
//! [type@m!{}] | ||
//! [type@m![]] | ||
//! [type@f()] //~ WARN: unmatched disambiguator `type` and suffix `()` | ||
//! [type@m!] //~ WARN: unmatched disambiguator `type` and suffix `!` | ||
//! | ||
//! [value@m!()] //~ WARN: unmatched disambiguator `value` and suffix `!()` | ||
//! [value@m!{}] | ||
//! [value@m![]] | ||
//! [value@f()] | ||
//! [value@m!] //~ WARN: unmatched disambiguator `value` and suffix `!` | ||
//! | ||
//! [macro@m!()] | ||
//! [macro@m!{}] | ||
//! [macro@m![]] | ||
//! [macro@f()] //~ WARN: unmatched disambiguator `macro` and suffix `()` | ||
//! [macro@m!] | ||
//! | ||
//! [prim@m!()] //~ WARN: unmatched disambiguator `prim` and suffix `!()` | ||
//! [prim@m!{}] | ||
//! [prim@m![]] | ||
//! [prim@f()] //~ WARN: unmatched disambiguator `prim` and suffix `()` | ||
//! [prim@m!] //~ WARN: unmatched disambiguator `prim` and suffix `!` | ||
//! | ||
//! [primitive@m!()] //~ WARN: unmatched disambiguator `primitive` and suffix `!()` | ||
//! [primitive@m!{}] | ||
//! [primitive@m![]] | ||
//! [primitive@f()] //~ WARN: unmatched disambiguator `primitive` and suffix `()` | ||
//! [primitive@m!] //~ WARN: unmatched disambiguator `primitive` and suffix `!` | ||
|
||
#[macro_export] | ||
macro_rules! m { | ||
() => {}; | ||
} | ||
|
||
pub fn f() {} |
Oops, something went wrong.