about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-12-13Mention implementations that satisfy the traitEsteban Küber-1/+21
2022-12-13Remove unnecessary code and account for turbofish suggestionEsteban Küber-8/+8
Remove previously existing fallback that tried to give a good turbofish suggestion, `need_type_info` is already good enough. Special case `::<Vec<_>` suggestion for `Iterator::collect`.
2022-12-13Suggest `collect`ing into `Vec<_>`Esteban Küber-23/+23
2022-12-13Account for dereference expressionsEsteban Küber-133/+186
2022-12-13Fix span for `&mut ` removal suggestionEsteban Küber-29/+29
2022-12-13Suggest `ref` for some patterns as a fallbackEsteban Küber-53/+460
2022-12-13Do not suggest borrowing binding in pattern in let elseEsteban Küber-13/+14
Fix #104838.
2022-12-13Change pattern borrowing suggestions to be verboseEsteban Küber-737/+1274
Synthesize a more accurate span and use verbose suggestion output to make the message clearer.
2022-12-13fix testsakida31-8/+0
2022-12-13Rename `assert_uninit_valid` intrinsicNilstrieb-3/+3
It's not about "uninit" anymore but about "filling with 0x01 bytes" so the name should at least try to reflect that.
2022-12-13reduce to single suggestion for all argumentsakida31-76/+42
2022-12-13change error messageakida31-20/+24
2022-12-13Remove `hint` from help messageakida31-20/+20
2022-12-13Fix stderr of tests which have improved diagnosticsakida31-0/+80
2022-12-13Remove invalid case for mutable borrow suggestionDeep Majumder-0/+26
If we have a call such as `foo(&mut buf)` and after reference collapsing the type is inferred as `&T` where-as the required type is `&mut T`, don't suggest `foo(&mut mut buf)`. This is wrong syntactically and the issue lies elsewhere, not in the borrow. Fixes #105645
2022-12-13Use a label instead of a note for the drop site to create denser diagnosticsOli Scherer-35/+15
2022-12-13Stop pointing to operators if their libcore method source is not availableOli Scherer-64/+15
2022-12-13Avoid rendering empty annotationsOli Scherer-158/+50
2022-12-13Don't emit empty notesOli Scherer-29/+1
2022-12-13Clarify what "this" meansOli Scherer-33/+33
2022-12-13Inform the user which trait is meant in the diagnostic itself instead of ↵Oli Scherer-22/+22
relying on the span making it obvious
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-1479/+384
available
2022-12-13Auto merge of #105350 - compiler-errors:faster-binder-relate, r=oli-obkbors-0/+38
Fast-path some binder relations A simpler approach than #104598 Fixes #104583 r? types
2022-12-12Refine when invalid prefix case error arisesCassaundra Smith-0/+84
Fix cases where the "invalid base prefix for number literal" error arises with suffixes that look erroneously capitalized but which are in fact invalid.
2022-12-13Fast path some binder relationsMichael Goulet-0/+38
2022-12-13Add tests (currently broken) for unsafe + inline const patGary Guo-0/+39
2022-12-13Add testsGary Guo-0/+80
2022-12-13Rollup merge of #105332 - estebank:iterator-chains, r=oli-obkMatthias Krüger-122/+319
Point out the type of associated types in every method call of iterator chains Partially address #105184 by pointing out the type of associated types in every method call of iterator chains: ``` note: the expression is of type `Map<std::slice::Iter<'_, {integer}>, [closure@src/test/ui/iterators/invalid-iterator-chain.rs:12:18: 12:21]>` --> src/test/ui/iterators/invalid-iterator-chain.rs:12:14 | 10 | vec![0, 1] | ---------- this expression has type `Vec<{integer}>` 11 | .iter() | ------ associated type `std::iter::Iterator::Item` is `&{integer}` here 12 | .map(|x| { x; }) | ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `()` here ``` We also reduce the number of impls we mention when any of the candidates is an "exact match". This benefits the output of cases with numerics greatly. Outstanding work would be to provide a structured suggestion for appropriate changes, like in this case detecting the spurious `;` in the closure.
2022-12-13Rollup merge of #104864 - chenyukang:yukang/fix-104700-binding, r=estebankMatthias Krüger-0/+32
Account for item-local in inner scope for E0425 Fixes #104700
2022-12-12Rollup merge of #105561 - TaKO8Ki:fix-105449, r=fee1-deadMatthias Krüger-0/+59
Normalize receiver substs and erase the regions Fixes #105449
2022-12-12Properly calculate best failure in macro matchingNilstrieb-0/+32
Previously, we used spans. This was not good. Sometimes, the span of the token that failed to match may come from a position later in the file which has been transcribed into a token stream way earlier in the file. If precisely this token fails to match, we think that it was the best match because its span is so high, even though other arms might have gotten further in the token stream. We now try to properly use the location in the token stream.
2022-12-12what is `unstable_features` lolBoxy-1/+1
2022-12-12fold instead of obliterating argsBoxy-0/+29
2022-12-12normalize receiver substs and erase the regionsTakayuki Maeda-0/+59
use a smaller example
2022-12-12Rollup merge of #104997 - c410-f3r:moar-errors, r=petrochenkovMatthias Krüger-18/+0
Move tests r? `@petrochenkov`
2022-12-11Point at method call when it is the source of the bound errorEsteban Küber-163/+81
2022-12-11Move testsCaio-18/+0
2022-12-11Rollup merge of #105369 - chenyukang:yukang/fix-105226, r=TaKO8KiMatthias Krüger-0/+53
Detect spurious ; before assoc fn body Fixes #105226 r? ``@TaKO8Ki``
2022-12-11Rollup merge of #105283 - compiler-errors:ty-var-in-hir-wfcheck, r=nagisaMatthias Krüger-0/+50
Don't call `diagnostic_hir_wf_check` query if we have infer variables Fixes #105260
2022-12-11Use `with_forced_trimmed_paths`Esteban Küber-36/+36
2022-12-11fix rebaseEsteban Küber-10/+29
2022-12-11Only point at methods that might be relevantEsteban Küber-17/+64
2022-12-11Add label to method chains where assoc type remains the sameEsteban Küber-5/+5
2022-12-11Remove mention of "assoc type" in label as it is already in the `note` messageEsteban Küber-16/+16
2022-12-11Account for method call chains split across multiple bindingsEsteban Küber-11/+57
2022-12-11Mention only assoc types changesEsteban Küber-25/+23
2022-12-11Expand iterator chain testEsteban Küber-7/+26
2022-12-11Provide associated type information in method chainsMichael Goulet-0/+150
When encountering an unmet obligation that affects a method chain, like in iterator chains where one of the links has the wrong associated type, we point at every method call and mention their evaluated associated type at that point to give context to the user of where expectations diverged from the code as written. ``` note: the expression is of type `Map<std::slice::Iter<'_, {integer}>, [closure@$DIR/invalid-iterator-chain.rs:12:18: 12:21]>` --> $DIR/invalid-iterator-chain.rs:12:14 | LL | vec![0, 1] | ---------- this expression has type `Vec<{integer}>` LL | .iter() | ------ associated type `std::iter::Iterator::Item` is `&{integer}` here LL | .map(|x| { x; }) | ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `()` here ```
2022-12-11Rollup merge of #105547 - JohnTitor:issue-104582, r=compiler-errorsMatthias Krüger-0/+30
Add regression test for #104582 Closes #104582 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-11Rollup merge of #105546 - JohnTitor:issue-44454, r=compiler-errorsMatthias Krüger-0/+115
Add some regression tests for #44454 Closes #44454 r? ``@compiler-errors`` Signed-off-by: Yuki Okushi <jtitor@2k36.org>