about summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2022-07-19Add E0790 as more specific variant of E0283aticu-18/+19
2022-07-19Mention first and last macro in backtraceMichael Goulet-4/+4
2022-07-18Add `PhantomData` marker for dropck to `BTreeMap`Frank Steffahn-3/+21
closes #99408
2022-07-18Auto merge of #99137 - jackh726:wf-no-infcx, r=estebankbors-3/+8
Don't pass InferCtxt to WfPredicates Simple cleanup. Infer vars will get passed up as obligations and shallowed resolved later. This actually improves one test output.
2022-07-18Rollup merge of #99350 - compiler-errors:issue-99240, r=fee1-deadYuki Okushi-6/+18
Be more precise when suggesting removal of parens on unit ctor * Fixes #99240 by only suggesting to remove parens on path exprs, not arbitrary expressions with enum type * Generalizes by suggesting removal of parens on unit struct, too, because why not?
2022-07-16Be more precise when suggesting removal of parens on unit adt ctorMichael Goulet-6/+18
2022-07-16Rollup merge of #99290 - compiler-errors:revert-98794, r=lcnrMatthias Krüger-12/+2
Revert "Highlight conflicting param-env candidates" This reverts #98794, commit 08135254dcf22be0d5661ea8f75e703b29a83514. Seems to have caused an incremental compilation bug. The root cause of the incr comp bug is somewhat unrelated but is triggered by this PR, so I don't feel comfortable with having this PR in the codebase until it can be investigated further. Fixes #99233.
2022-07-16Rollup merge of #99258 - estebank:suggest-let, r=wesleywiserMatthias Krüger-53/+0
Provide structured suggestion for dropped temp value
2022-07-15Move tests to fit in limitEsteban Küber-89/+0
2022-07-15Provide structured suggestion for dropped temp valueEsteban Küber-8/+44
2022-07-15Revert "Highlight conflicting param-env candidates"Michael Goulet-12/+2
This reverts commit 08135254dcf22be0d5661ea8f75e703b29a83514.
2022-07-15passes: migrate half of `check_attr`David Wood-10/+10
Migrate half of the `rustc_passes::check_attr` diagnostics to using diagnostic derives and being translatable.
2022-07-15Rollup merge of #98869 - compiler-errors:stop_guessing_head_span, r=cjgillotDylan DPC-40/+26
Remove some usages of `guess_head_span` No need to pass things through `guess_head_span` if they already point to the head span. Only major change is that we point to the head span of `enum`s on some errors now, which I prefer. r? `@cjgillot`
2022-07-15Rollup merge of #99131 - compiler-errors:label-fn, r=cjgillotDylan DPC-4/+4
Add label for generic arg (+ APIT) and RPIT callables in `label_fn_like` Fixes #98308
2022-07-15Remove some usages of guess_head_span from typeckMichael Goulet-1/+1
2022-07-15Make item spans more consistentMichael Goulet-39/+25
2022-07-15Auto merge of #98203 - kckeiks:gather-body-owners-in-hir-item-queries, ↵bors-6/+6
r=cjgillot gather body owners Issue #96341
2022-07-14Add support for APIT and RPIT callables in label_fn_likeMichael Goulet-4/+4
2022-07-13use gathered body_owners in par_body_ownersMiguel Guarniz-6/+6
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-13Always use CreateParameter mode for function definitions.Camille GILLOT-1/+1
2022-07-11Do not suggest same trait over againMichael Goulet-5/+0
2022-07-10Don't try to resolve inference variables in WF computation, just registerJack Huey-3/+8
2022-07-09Do not call `check_expr` in `check_compatible`, since it has side-effects ↵Michael Goulet-18/+5
and we've already checked all args
2022-07-08distinguish the method and associated function diagnostic informationYiming Lei-2/+2
Methods are defined within the context of a struct and their first parameter is always self Associated functions don’t take self as a parameter modified: compiler/rustc_typeck/src/check/method/suggest.rs modified: src/test/ui/auto-ref-slice-plus-ref.stderr modified: src/test/ui/block-result/issue-3563.stderr modified: src/test/ui/issues/issue-28344.stderr modified: src/test/ui/suggestions/dont-suggest-pin-array-dot-set.stderr modified: src/test/ui/suggestions/suggest-methods.stderr modified: src/test/ui/traits/trait-upcasting/subtrait-method.stderr
2022-07-08Auto merge of #98816 - estebank:implicit-sized, r=oli-obkbors-12/+12
Track implicit `Sized` obligations in type params When we evaluate `ty::GenericPredicates` we introduce the implicit `Sized` predicate of type params, but we do so with only the `Predicate` its `Span` as context, we don't have an `Obligation` or `ObligationCauseCode` we could influence. To try and carry this information through, we add a new field to `ty::GenericPredicates` that tracks both which predicates come from a type param and whether that param has any bounds already (to use in suggestions). We also suggest adding a `?Sized` bound if appropriate on E0599. Address part of #98539.
2022-07-08Rollup merge of #98794 - compiler-errors:conflicting-param-env, ↵Dylan DPC-2/+12
r=michaelwoerister Highlight conflicting param-env candidates This could probably be further improved by noting _why_ equivalent param-env candidates (modulo regions) leads to ambiguity. Fixes #98786
2022-07-08Highlight conflicting param-env candidatesMichael Goulet-2/+12
2022-07-07Track implicit `Sized` obligations in type paramsEsteban Küber-12/+12
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting the HIR Generics. (Fix #98539)
2022-07-07Fix borrowck closure span.Camille GILLOT-3/+6
2022-07-07Shorten span for closures.Camille GILLOT-36/+31
2022-07-06replace `guess_head_span` with `def_span`Takayuki Maeda-9/+4
2022-07-04`InferSource::GenericArg`, check for containslcnr-4/+14
2022-07-04update infer cost computation for typeslcnr-9/+9
2022-07-02Auto merge of #91743 - cjgillot:enable_mir_inlining_inline_all, r=oli-obkbors-2/+3
Enable MIR inlining Continuation of https://github.com/rust-lang/rust/pull/82280 by `@wesleywiser.` #82280 has shown nice compile time wins could be obtained by enabling MIR inlining. Most of the issues in https://github.com/rust-lang/rust/issues/81567 are now fixed, except the interaction with polymorphization which is worked around specifically. I believe we can proceed with enabling MIR inlining in the near future (preferably just after beta branching, in case we discover new issues). Steps before merging: - [x] figure out the interaction with polymorphization; - [x] figure out how miri should deal with extern types; - [x] silence the extra arithmetic overflow warnings; - [x] remove the codegen fulfilment ICE; - [x] remove the type normalization ICEs while compiling nalgebra; - [ ] tweak the inlining threshold.
2022-07-01Auto merge of #98781 - GuillaumeGomez:rollup-798kb8u, r=GuillaumeGomezbors-21/+37
Rollup of 5 pull requests Successful merges: - #97249 (`<details>`/`<summary>` UI fixes) - #98418 (Allow macOS to build LLVM as shared library) - #98460 (Use CSS variables to handle theming) - #98497 (Improve some inference diagnostics) - #98708 (rustdoc: fix 98690 Panic if invalid path for -Z persist-doctests) Failed merges: - #98761 (more `need_type_info` improvements) r? `@ghost` `@rustbot` modify labels: rollup
2022-07-01Auto merge of #93967 - cjgillot:short-struct-span, r=petrochenkovbors-66/+44
Shorten def_span for more items. The `def_span` query only returns the signature span for functions. Struct/enum/union definitions can also have a very long body. This PR shortens the associated span.
2022-07-01Don't point at Self type if we can't find an infer variable in ambiguous ↵Michael Goulet-11/+31
trait predicate
2022-07-01Show source of ambiguity in a few more placesMichael Goulet-2/+4
2022-07-01Only label place where type is needed if span is meaningfulMichael Goulet-8/+2
2022-07-01Shorten def_span for more items.Camille GILLOT-66/+44
2022-07-01Auto merge of #98402 - cjgillot:undead, r=michaelwoeristerbors-2/+2
Rewrite dead-code pass to avoid fetching HIR. This allows to get a more uniform handling of spans, and to simplify the grouping of diagnostics for variants and fields.
2022-06-30Specialize a few tests depending on opt-level.Camille GILLOT-1/+20
2022-06-30Allow inlining `#[inline]` functions.Camille GILLOT-19/+1
2022-06-29Rollup merge of #98603 - compiler-errors:minor-borrowck-diagnostic-fixes, ↵Dylan DPC-5/+2
r=davidtwco Some borrowck diagnostic fixes 1. Remove some redundant `.as_ref` suggestion logic from borrowck, this has the consequence of also not suggesting `.as_ref` after `Option` methods, but (correctly) before. 2. Fix a bug where we were replacing a binding's name with a type. Instead, make it a note. This is somewhat incomplete. See `src/test/ui/borrowck/suggest-as-ref-on-mut-closure.rs` for more improvements.
2022-06-29Rollup merge of #98277 - compiler-errors:issue-93596, r=estebankDylan DPC-4/+4
Fix trait object reborrow suggestion Fixes #93596 Slightly generalizes the logic we use to suggest fix first implemented in #95609, specifically when we have a `Sized` obligation that comes from a struct's unsized tail.
2022-06-29Rollup merge of #97542 - compiler-errors:arg-mismatch, r=jackh726Dylan DPC-3/+3
Use typed indices in argument mismatch algorithm I kinda went overboard with the renames, but in general, "arg" is renamed to "expected", and "input" is renamed to "provided", and we use new typed indices to make sure we're indexing into the right sized array. Other drive-by changes: 1. Factor this logic into a new function, so we don't need to `break 'label` to escape it. 1. Factored out dependence on `final_arg_types`, which is never populated for arguments greater than the number of expected args. Instead, we just grab the final coerced expression type from `in_progress_typeck_results`. 1. Adjust the criteria we use to print (provided) type names, before we didn't suggest anything that had infer vars, but now we suggest thing that have infer vars but aren't `_`. ~Also, sorry in advance, I kinda want to backport this but I know I have folded in a lot of unnecessary drive-by changes that might discourage that. I would be open to brainstorming how to get some of these changes on beta at least.~ edit: Minimized the ICE-fixing changes to #97557 cc `@jackh726` as author of #92364, and `@estebank` as reviewer of the PR. fixes #97484
2022-06-28Do not use a suggestion to change a binding's name to a typeMichael Goulet-5/+2
2022-06-28Note concrete type being coerced into objectMichael Goulet-4/+4
2022-06-28Auto merge of #98396 - cjgillot:iwfchir, r=petrochenkovbors-8/+5
Do not access HIR to check impl wf. r? `@ghost`
2022-06-27Use typed indices in argument mismatch algorithmMichael Goulet-3/+3