about summary refs log tree commit diff
path: root/tests/ui/traits/negative-bounds
AgeCommit message (Collapse)AuthorLines
2025-08-22On E0277, point at type that doesn't implement boundEsteban Küber-3/+19
When encountering an unmet trait bound, point at local type that doesn't implement the trait: ``` error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied --> $DIR/issue-64855.rs:9:19 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | help: the trait `Foo` is not implemented for `Bar<T>` --> $DIR/issue-64855.rs:9:1 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^ ```
2025-08-17Do not consider a `T: !Sized` candidate to satisfy a `T: !MetaSized` obligation.Zachary S-0/+99
2025-07-02Consider polarity in sizedness fast pathMichael Goulet-0/+23
2025-06-09Apply nested goals certainty to InspectGoals for normalizes-toMichael Goulet-15/+14
2025-02-03Check Sizedness of return type in WFMichael Goulet-15/+26
2024-11-26do not constrain infer vars in `find_best_leaf_obligation`lcnr-60/+4
2024-11-18Add reference annotations for diagnostic attributesEric Huss-1/+3
This adds reference annotations for `diagnostic::on_unimplmented` and the `diagnostic` namespace in general.
2024-11-02Account for negative bounds in E0277 note and suggestionEsteban Küber-18/+0
Do not suggest `#[derive(Copy)]` when we wanted a `!Copy` type. Do not say "`Copy` is not implemented for `T` but `Copy` is". Do not talk about `Trait` having no implementations when `!Trait` was desired.
2024-11-02Add trait diff highlighting logic and use it in E0277Esteban Küber-1/+2
When a trait is not implemented for a type, but there *is* an `impl` for another type or different trait params, we format the output to use highlighting in the same way that E0308 does for types. The logic accounts for 3 cases: - When both the type and trait in the expected predicate and the candidate are different - When only the types are different - When only the trait generic params are different For each case, we use slightly different formatting and wording.
2024-10-15Bless testsMichael Goulet-60/+36
2024-10-15Register a dummy candidate for failed structural normalization during ↵Michael Goulet-48/+8
candiate assembly
2024-10-15Be better at reporting alias errorsMichael Goulet-41/+74
2024-10-15Make sure the alias is actually rigidMichael Goulet-7/+83
2024-10-14Don't report on_unimplemented for negative traitsMichael Goulet-0/+30
2024-06-12Walk into alias-eq nested goals even if normalization failsMichael Goulet-1/+11
2024-03-08Stabilize associated type boundsMichael Goulet-1/+1
2024-03-02Rollup merge of #121875 - estebank:e0277-drive-by, r=compiler-errorsMatthias Krüger-4/+4
Account for unmet T: !Copy in E0277 message ``` error[E0277]: the trait bound `T: !Copy` is not satisfied --> $DIR/simple.rs:10:16 | LL | not_copy::<T>(); | ^ the trait bound `T: !Copy` is not satisfied ``` instead of the current ``` error[E0277]: the trait bound `T: !Copy` is not satisfied --> $DIR/simple.rs:10:16 | LL | not_copy::<T>(); | ^ the trait `!Copy` is not implemented for `T` ```
2024-03-02Account for unmet `T: !Copy` in E0277 messageEsteban Küber-4/+4
2024-03-01Get rid of some sub_exp and eq_expMichael Goulet-8/+8
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-3/+3
2024-01-11Remove special-casing around aliaskind in new solverMichael Goulet-59/+10
2023-12-28rustc_middle: Pretty-print negative bounds correctlyLeón Orell Valerian Liehr-0/+122
2023-12-28Deny parenthetical notation for negative boundsLeón Orell Valerian Liehr-1/+11
2023-12-28Make feature `negative_bounds` internalLeón Orell Valerian Liehr-44/+14
2023-05-04Don't compute trait super bounds unless they're positiveMichael Goulet-0/+19
2023-05-02Make negative trait bounds work with the old trait solverMichael Goulet-14/+2
2023-05-02Disallow associated type constraints on negative boundsMichael Goulet-0/+54
2023-05-02Implement negative boundsMichael Goulet-0/+124