about summary refs log tree commit diff
path: root/tests/ui/attributes/rustc_confusables.rs
AgeCommit message (Collapse)AuthorLines
2025-08-19Update uitestsJonathan Brouwer-0/+1
2025-08-14Update uitestsJonathan Brouwer-1/+2
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-17use consistent attr errors in all attribute parsersJana Dönszelmann-2/+2
2024-02-22Deduplicate some logic and reword outputEsteban Küber-1/+1
2024-02-22Add `rustc_confusables` annotations to some stdlib APIsEsteban Küber-1/+1
Help with common API confusion, like asking for `push` when the data structure really has `append`. ``` error[E0599]: no method named `size` found for struct `Vec<{integer}>` in the current scope --> $DIR/rustc_confusables_std_cases.rs:17:7 | LL | x.size(); | ^^^^ | help: you might have meant to use `len` | LL | x.len(); | ~~~ help: there is a method with a similar name | LL | x.resize(); | ~~~~~~ ``` #59450
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-1/+1
2023-07-16Add infrastructure `#[rustc_confusables]` attribute to allow targeted许杰友 Jieyou Xu (Joe)-0/+47
"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.