about summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2022-06-28Auto merge of #98222 - cjgillot:single-wf, r=michaelwoeristerbors-68/+10
Only keep a single query for well-formed checking There are currently 3 queries to perform wf checks on different item-likes. This complexity is not required. This PR replaces the query by: - one query per item; - one query to invoke it for a whole module. This allows to remove HIR `ParItemLikeVisitor`.
2022-06-26compiletest: add issue number param to `known-bug`David Knaack-1/+1
2022-06-25Rollup merge of #98298 - TaKO8Ki:point-to-type-param-definition, ↵Matthias Krüger-12/+14
r=compiler-errors Point to type parameter definition when not finding variant, method and associated item fixes #77391
2022-06-24Bless ui tests.Camille GILLOT-8/+5
2022-06-23Rollup merge of #98283 - TaKO8Ki:point-at-private-fields-in-struct-literal, ↵Michael Goulet-2/+4
r=compiler-errors Point at private fields in struct literal closes #95872
2022-06-22Uniform spans in dead code lint.Camille GILLOT-2/+2
2022-06-22add "was" to pluralize macro and use itTakayuki Maeda-1/+1
2022-06-22point to type param definition when not finding variant, method and assoc typeTakayuki Maeda-12/+14
use `def_ident_span` , `body_owner_def_id` instead of `in_progress_typeck_results`, `guess_head_span` use `body_id.owner` directly add description to label
2022-06-22stop pointing at definitions of missing fieldsTakayuki Maeda-5/+1
2022-06-22Auto merge of #97853 - TaKO8Ki:emit-only-one-note-per-unused-struct-field, ↵bors-2/+2
r=estebank Collapse multiple dead code warnings into a single diagnostic closes #97643
2022-06-22Rollup merge of #98199 - c410-f3r:z-errors, r=petrochenkovYuki Okushi-904/+0
Move some tests to more reasonable directories r? `@petrochenkov`
2022-06-21Perform wf checking per module.Camille GILLOT-3/+3
2022-06-21Only keep a single well-formed query.Camille GILLOT-65/+7
2022-06-21Move some tests to more reasonable directoriesCaio-904/+0
2022-06-21Avoid an ICE and instead let the compiler report a useful errorOli Scherer-0/+27
2022-06-20Auto merge of #98284 - JohnTitor:rollup-7lbs143, r=JohnTitorbors-4/+4
Rollup of 5 pull requests Successful merges: - #98183 (Fix pretty printing of empty bound lists in where-clause) - #98268 (Improve `lifetime arguments are not allowed on` error message) - #98273 (Fix minor documentation typo) - #98274 (Minor improvements on error for `Self` type in items that don't allow it) - #98281 (Fix typo in `HashMap::drain` docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-20point at private fields in struct literalTakayuki Maeda-2/+8
2022-06-19Be more specific for what lifetimes are not allowed onMichael Goulet-4/+4
2022-06-19Make missing argument placeholder more obvious that it's a placeholderMichael Goulet-3/+3
2022-06-19collapse dead code warnings into a single diagnosticTakayuki Maeda-2/+2
add comments in `store_dead_field_or_variant` support multiple log level add a item ident label fix ui tests fix a ui test fix a rustdoc ui test use let chain refactor: remove `store_dead_field_or_variant` fix a tiny bug
2022-06-17Auto merge of #97892 - klensy:fix-spaces, r=oli-obkbors-16/+16
diagnostics: remove trailing spaces Remove few occurrences of trailing spaces and drive by fix of needless alloc of const string.
2022-06-16--bless uiMaybe Waffle-4/+3
2022-06-16 fix one more case of trailing spaceklensy-11/+11
2022-06-16diagnostics: fix trailing spaceklensy-5/+5
2022-06-16Rollup merge of #98119 - EdwinRy:path-parenthesized-type-error, r=estebankYuki Okushi-4/+6
Refactor path segment parameter error This PR attempts to rewrite the error handling for an unexpected parenthesised type parameters to: - Use provided data instead of re-parsing the whole span - Add a multipart suggestion to reflect on the changes with an underline - Remove the unnecessary "if" nesting
2022-06-15Auto merge of #98123 - JohnTitor:rollup-rfg1a4s, r=JohnTitorbors-441/+0
Rollup of 7 pull requests Successful merges: - #97822 (Filter out intrinsics if we have other import candidates to suggest) - #98026 (Move some tests to more reasonable directories) - #98067 (compiler: remove unused deps) - #98078 (Use unchecked mul to compute slice sizes) - #98083 (Rename rustc_serialize::opaque::Encoder as MemEncoder.) - #98087 (Suggest adding a `#[macro_export]` to a private macro) - #98113 (Fix misspelling of "constraint" as "contraint") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-15Rollup merge of #98026 - c410-f3r:z-errors, r=petrochenkovYuki Okushi-441/+0
Move some tests to more reasonable directories r? ```@petrochenkov```
2022-06-15Auto merge of #97474 - compiler-errors:if-cond-and-block, r=oli-obkbors-3/+9
Improve parsing errors and suggestions for bad `if` statements 1. Parses `if {}` as `if <err> {}` (block-like conditions that are missing a "then" block), and `if true && {}` as `if true && <err> {}` (unfinished binary operation), which is a more faithful recovery and leads to better typeck errors later on. 1. Points out the span of the condition if we don't see a "then" block after it, to help the user understand what is being parsed as a condition (and by elimination, what isn't). 1. Allow `if cond token else { }` to be fixed properly to `if cond { token } else { }`. 1. Fudge with the error messages a bit. This is somewhat arbitrary and I can revert my rewordings if they're useless. ---- Also this PR addresses a strange parsing regression (1.20 -> 1.21) where we chose to reject this piece of code somewhat arbitrarily, even though we should parse it fine: ```rust fn main() { if { if true { return } else { return }; } {} } ``` For context, all of these other expressions parse correctly: ```rust fn main() { if { if true { return } else { return } } {} if { return; } {} if { return } {} if { return if true { } else { }; } {} } ``` The parser used a heuristic to determine if the "the parsed `if` condition makes sense as a condition" that did like a one-expr-deep reachability analysis. This should not be handled by the parser though.
2022-06-15Refactor path segment parameter errorEdwinRy-4/+6
2022-06-14address reviewb-naber-1/+1
2022-06-14implement valtrees as the type-system representation for constant valuesb-naber-73/+51
2022-06-13Improve parsing errors and suggestions for bad if statementsMichael Goulet-3/+9
2022-06-13Move testsCaio-441/+0
2022-06-12Rollup merge of #98012 - compiler-errors:poly-trait-refs-are-traits, r=cjgillotDylan DPC-4/+4
`ValuePairs::PolyTraitRefs` should be called "trait"s in type error diagnostics Pretty simple, we already do this for `ValuePairs::TraitRefs`...
2022-06-11Handle empty where-clause betterMichael Goulet-1/+1
2022-06-11ValuePairs::PolyTraitRefs should be called 'trait'Michael Goulet-4/+4
2022-06-03Fully stabilize NLLJack Huey-474/+33
2022-06-03Auto merge of #97694 - Dylan-DPC:rollup-2yxo7ce, r=Dylan-DPCbors-12/+20
Rollup of 3 pull requests Successful merges: - #97415 (Compute `is_late_bound_map` query separately from lifetime resolution) - #97471 (Provide more context when denying invalid type params ) - #97681 (Add more eslint checks) Failed merges: - #97446 (Make hir().get_generics and generics_of consistent.) r? `@ghost` `@rustbot` modify labels: rollup
2022-06-03Rollup merge of #97471 - estebank:prohibit-generics, r=cjgillotDylan DPC-12/+20
Provide more context when denying invalid type params
2022-06-03Auto merge of #89862 - lcnr:path-generics-diagnostics, r=estebankbors-105/+170
rewrite error handling for unresolved inference vars Pretty much completely rewrites `fn emit_inference_failure_err`. This new setup should hopefully be easier to extend and is already a lot better when looking for generic arguments. Because this is a rewrite there are still some parts which are lacking, these are tracked in #94483 and will be fixed in later PRs. r? `@estebank` `@petrochenkov`
2022-06-03Auto merge of #97497 - c410-f3r:z-errors, r=petrochenkovbors-425/+0
Move some tests to more reasonable places r? `@petrochenkov`
2022-06-02Rollup merge of #97023 - cjgillot:uniform-anon, r=estebankDylan DPC-3/+3
Diagnose anonymous lifetimes errors more uniformly between async and regular fns Async fns and regular fns are desugared differently. For the former, we create a generic parameter at HIR level. For the latter, we just create an anonymous region for typeck. I plan to migrate regular fns to the async fn desugaring. Before that, this PR attempts to merge the diagnostics for both cases. r? ```@estebank```
2022-06-02rebaselcnr-0/+1
2022-06-02add new `emit_inference_failure_err`lcnr-105/+169
2022-06-01Make output more specificEsteban Küber-12/+20
2022-06-01Mention filename in suggestion when it differs from primary spanEsteban Küber-0/+1
2022-05-29Make lifetime errors more precise in the presence of `Fresh` lifetimes.Camille GILLOT-3/+3
2022-05-28Move some tests to more reasonable placesCaio-425/+0
2022-05-28Improve error message for E0081Bryysen-23/+48
Previously whenever a duplicate discriminant was detected for an Enum, we would print the discriminant bits in the diagnostic without any casting. This caused us to display incorrect values for negative discriminants. After this PR we format the discriminant signedness correctly. Also reworded some of the original error messages.
2022-05-22Use revisions for NLL in issuesJack Huey-78/+159