about summary refs log tree commit diff
path: root/tests/ui/methods/issues
AgeCommit message (Collapse)AuthorLines
2024-05-20Note for E0599 if shadowed bindings has the method.surechen-0/+24
implement #123558
2024-03-03Be more lax in `.into_iter()` suggestion when encountering `Iterator` ↵Esteban Küber-10/+18
methods on non-`Iterator` ``` error[E0599]: no method named `map` found for struct `Vec<bool>` in the current scope --> $DIR/vec-on-unimplemented.rs:3:23 | LL | vec![true, false].map(|v| !v).collect::<Vec<_>>(); | ^^^ `Vec<bool>` is not an iterator | help: call `.into_iter()` first | LL | vec![true, false].into_iter().map(|v| !v).collect::<Vec<_>>(); | ++++++++++++ ``` We used to provide some help through `rustc_on_unimplemented` on non-`impl Trait` and non-type-params, but this lets us get rid of some otherwise unnecessary conditions in the annotation on `Iterator`.
2024-02-22Deduplicate some logic and reword outputEsteban Küber-1/+1
2024-02-22Make confusable suggestions `verbose`Esteban Küber-1/+6
2024-02-01review comment: change wordingEsteban Küber-1/+1
2024-02-01On E0277 be clearer about implicit `Sized` bounds on type params and assoc typesEsteban Küber-2/+2
``` error[E0277]: the size for values of type `[i32]` cannot be known at compilation time --> f100.rs:2:33 | 2 | let _ = std::mem::size_of::<[i32]>(); | ^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[i32]` note: required by an implicit `Sized` bound in `std::mem::size_of` --> /home/gh-estebank/rust/library/core/src/mem/mod.rs:312:22 | 312 | pub const fn size_of<T>() -> usize { | ^ required by the implicit `Sized` requirement on this bound in `size_of` ``` Fix #120178.
2024-01-24On E0308 involving `dyn Trait`, mention trait objectsEsteban Küber-0/+1
When encountering a type mismatch error involving `dyn Trait`, mention the existence of boxed trait objects if the other type involved implements `Trait`. Partially addresses #102629.
2023-11-24Show number in error message even for one errorNilstrieb-2/+2
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-08-26More accurately point at argumentsEsteban Küber-2/+2
2023-02-25Complete migrating `ast_passes` to derive diagnosticsclubby789-1/+1
2023-02-22diagnostics: update test cases to refer to assoc fn with `self` as methodMichael Howell-1/+1
2023-01-30Modify primary span label for E0308Esteban Küber-6/+6
The previous output was unintuitive to users.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+395