about summary refs log tree commit diff
path: root/tests/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2023-01-19Rollup merge of #106931 - Ezrashaw:docs-e0208, r=compiler-errorsGuillaume Gomez-0/+16
document + UI test `E0208` and make its output more user-friendly Cleans up `E0208`'s output a lot. It could actually be useful for someone learning about variance now. I also added a UI test for it in `tests/ui/error-codes/` and wrote some docs for it. r? `@GuillaumeGomez` another error code, can't be bothered to find the issue :P. Obviously there's some compiler stuff, so you'll have to hand it off. Part of https://github.com/rust-lang/rust/issues/61137.
2023-01-18remove error code from `#[rustc_variance]` and document its remainsEzra Shaw-0/+16
2023-01-18special case removing `&` suggestionEzra Shaw-6/+19
2023-01-16make `CastError::NeedsDeref` create a `MachineApplicable` suggestion + other ↵Ezra Shaw-4/+6
misc fixes
2023-01-15Tweak E0597Esteban Küber-3/+10
CC #99430
2023-01-13Rollup merge of #106585 - estebank:issue-46585, r=compiler-errorsMatthias Krüger-2/+6
When suggesting writing a fully qualified path probe for appropriate types Address the more common part of #46585.
2023-01-12Point at impl self type for impl wf obligationsMichael Goulet-2/+2
2023-01-12Auto merge of #106760 - compiler-errors:rollup-0bogyco, r=compiler-errorsbors-17/+3
Rollup of 8 pull requests Successful merges: - #103236 (doc: rewrite doc for signed int::{carrying_add,borrowing_sub}) - #103800 (Stabilize `::{core,std}::pin::pin!`) - #106097 (Migrate mir_build diagnostics 2 of 3) - #106170 (Move autoderef to `rustc_hir_analysis`) - #106323 (Stabilize f16c_target_feature) - #106360 (Tweak E0277 `&`-removal suggestions) - #106524 (Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch) - #106739 (Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-11Rollup merge of #106097 - mejrs:mir_build2, r=oli-obkMichael Goulet-17/+3
Migrate mir_build diagnostics 2 of 3 The first three commits are fairly boring, however I've made some changes to the output of the match checking diagnostics.
2023-01-12Rollup merge of #106167 - yanchen4791:issue-105544-fix, r=oli-obkMatthias Krüger-5/+22
Fix invalid syntax and incomplete suggestion in impl Trait parameter type suggestions for E0311 Fixes #105544 The problems: The suggestion given for E0311 has invalid syntax when the synthetic type parameter is used for Trait type in function declaration: ```rust fn foo(d: impl Sized) -> impl Sized ``` instead of explicitly specified like the following: ```rust fn foo<T: Sized>(d: T) -> impl Sized ``` In addition to the syntax error, the suggestions given for E0311 are not complete when multiple elided lifetimes are involved in lifetime bounds, not all involved parameters are given the named lifetime in the suggestions. For the following test case: ``` fn foo(d: impl Sized, p: &mut ()) -> impl Sized + '_ { (d, p) } ``` a good suggestion should add the lifetime 'a to both d and p, instead of d only: ``` fn foo<'a>(d: impl Sized + 'a, p: &'a mut ()) -> impl Sized + '_ { (d, p) } ``` The Solution: Fix the syntax problem in the suggestions when synthetic type parameter is used, and also add lifetimes for all involved parameters.
2023-01-11Fix invalid syntax in impl Trait parameter type suggestions for E0311yanchen4791-5/+22
2023-01-11Don't recommend `if let` if `let else` worksmejrs-5/+1
2023-01-11Migrate pattern matchingmejrs-13/+3
2023-01-11When suggesting writing a fully qualified path probe for appropriate typesEsteban Küber-2/+6
Fix #46585.
2023-01-11Note predicate span on ImplDerivedObligationMichael Goulet-1/+1
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-2/+2
2023-01-11Move /src/test to /testsAlbert Larsan-0/+7197