1
Fork 0

Add infrastructure #[rustc_confusables] attribute to allow targeted

"no method" errors on standard library types

The standard library developer can annotate methods on e.g.
`BTreeSet::push` with `#[rustc_confusables("insert")]`. When the user
mistypes `btreeset.push()`, `BTreeSet::insert` will be suggested if
there are no other candidates to suggest.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2023-07-16 18:18:38 +08:00
parent 00a39cc785
commit 08c77a6eb4
No known key found for this signature in database
GPG key ID: 94F68FD0E4899BB0
12 changed files with 259 additions and 4 deletions

View file

@ -1265,6 +1265,7 @@ symbols! {
rustc_clean,
rustc_coherence_is_core,
rustc_coinductive,
rustc_confusables,
rustc_const_stable,
rustc_const_unstable,
rustc_conversion_suggestion,