about summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-57358/+0
2023-01-09Auto merge of #106582 - compiler-errors:better-spans-on-bad-tys, r=lcnrbors-29/+15
Improve spans of non-WF implied bound types Fixes #60980
2023-01-08Rollup merge of #106600 - compiler-errors:no-private-field-ty-err, r=estebankMichael Goulet-8/+1
Suppress type errors that come from private fields Fixes #57320 There was some discussion here (https://github.com/rust-lang/rust/issues/57320#issuecomment-451308420), but I honestly think the second error is worth suppressing regardless. I would be open to feedback though -- perhaps we can suppress the `.len()` suggestion if there's type error (since we have access to [`Expectation`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir_typeck/enum.Expectation.html), we can determine that). r? ``@estebank``
2023-01-08Suppress type errors that come from private fieldsMichael Goulet-8/+1
2023-01-08Don't store spans in assumed_wf_types actuallyMichael Goulet-1/+12
2023-01-08Normalize assumed_wf_types after wfchecking is complete, for better spansMichael Goulet-2/+2
2023-01-08Improve spans of non-WF implied bound typesMichael Goulet-37/+12
2023-01-08Mention signature rather than fn pointers when comparing impl/trait methodsMichael Goulet-18/+18
2023-01-06use smaller spans for missing lifetime/generic argsTakayuki Maeda-3/+3
fix rustdoc ui test
2023-01-05Auto merge of #106482 - compiler-errors:rollup-g7n1p39, r=compiler-errorsbors-4/+4
Rollup of 6 pull requests Successful merges: - #105846 (Account for return-position `impl Trait` in trait in `opt_suggest_box_span`) - #106385 (Split `-Zchalk` flag into `-Ztrait-solver=(classic|chalk|next)` flag) - #106403 (Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent`) - #106462 (rustdoc: remove unnecessary wrapper around sidebar and mobile logos) - #106464 (Update Fuchsia walkthrough with new configs) - #106478 (Tweak wording of fn call with wrong number of args) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-04Rollup merge of #106478 - estebank:tweak-fn-mismatch, r=compiler-errorsMichael Goulet-4/+4
Tweak wording of fn call with wrong number of args
2023-01-05Auto merge of #105409 - compiler-errors:closure-infer-cycle, r=jackh726bors-1/+6
Don't deduce a signature that makes a closure cyclic Sometimes when elaborating supertrait bounds for closure signature inference, we end up deducing a closure signature that is cyclical because either a parameter or the return type references a projection mentioning `Self` that also has escaping bound vars, which means that it's not eagerly replaced with an inference variable. Interestingly, this is not *just* related to my PR that elaborates supertrait bounds for closure signature deduction. The committed test `supertrait-hint-cycle-3.rs` shows **stable** code that is fixed by this PR: ```rust trait Foo<'a> { type Input; } impl<F: Fn(u32)> Foo<'_> for F { type Input = u32; } fn needs_super<F: for<'a> Fn(<F as Foo<'a>>::Input) + for<'a> Foo<'a>>(_: F) {} fn main() { needs_super(|_: u32| {}); } ``` Fixes #105401 Fixes #105396 r? types
2023-01-05Tweak wording of fn call with wrong number of argsEsteban Küber-4/+4
2023-01-04Move testsCaio-597/+0
2023-01-03Rollup merge of #106005 - LeSeulArtichaut:if-let-guard-borrowck-test, ↵Matthias Krüger-2/+26
r=Nilstrieb Test the borrowck behavior of if-let guards Add some tests to make sure that if-let guards behave the same as if guards with respect to borrow-checking. Most of them are a naive adaptation, replacing an `if` guard with `if let Some(())`. This includes regression tests for notable issues that arose for if guards (#24535, #27282, #29723, #31287) as suggested in https://github.com/rust-lang/rust/issues/51114#issuecomment-900470419. cc `@pnkfelix` are there any other tests that you would want to see? cc tracking issue #51114
2023-01-02Auto merge of #106284 - estebank:merge-mut-errors, r=jyn514bors-2/+5
Merge multiple mutable borrows of immutable binding errors Fix #53466.
2023-01-01Verbose suggestionsEsteban Küber-2/+5
2023-01-01Implement fix for #67535Troy Neubauer-0/+61
2022-12-31Auto merge of #106245 - estebank:mutability-suggestions, r=jyn514bors-5/+10
Use verbose suggestions for mutability errors
2022-12-29Rollup merge of #106202 - estebank:trim-paths, r=NilstriebMatthias Krüger-1/+1
Trim more paths in obligation types
2022-12-29Account for multiple multiline spans with empty paddingEsteban Küber-4/+1
Instead of ``` LL | fn oom( | __^ | | _| | || LL | || ) { | ||_- LL | | } | |__^ ``` emit ``` LL | // fn oom( LL | || ) { | ||_- LL | | } | |__^ ```
2022-12-28Use verbose suggestions for mutability errorsEsteban Küber-5/+10
2022-12-27Trim more paths in obligation typesEsteban Küber-1/+1
2022-12-27Restore cyclic closure messageMichael Goulet-8/+8
2022-12-27Don't deduce a signature that makes a closure cyclicMichael Goulet-8/+13
2022-12-23Move testsCaio-330/+0
2022-12-21Test the borrowck behavior of if-let guardsLéo Lanteri Thauvin-2/+26
2022-12-18Rollup merge of #105842 - compiler-errors:arg-name-sugg, r=petrochenkovMatthias Krüger-1/+1
print argument name in arg mismatch if possible A bit more contextual than just `/* value */`, at least when the argument is named something related to its context. The UI test cases are... not super convincing, but also they're minimized tests.
2022-12-17print argument name in arg mismatch if possibleMichael Goulet-1/+1
2022-12-15Rollup merge of #105727 - estebank:use-impl-trait, r=oli-obkMatthias Krüger-4/+8
Tweak output for bare `dyn Trait` in arguments Fix #35825.
2022-12-15Trim paths in E0599Esteban Küber-4/+4
2022-12-15Shorten trimmed display of closuresEsteban Küber-1/+1
When `with_forced_trimmed_paths` is used, only print filename and start of the closure's span, to reduce their verbosity.
2022-12-15Use `with_forced_trimmed_paths` moreEsteban Küber-7/+7
2022-12-15Point at method chains on `E0271` errorsEsteban Küber-0/+19
2022-12-15Auto merge of #105746 - matthiaskrgr:rollup-sz3grbv, r=matthiaskrgrbors-3/+7
Rollup of 11 pull requests Successful merges: - #104592 (Ensure async trait impls are async (or otherwise return an opaque type)) - #105623 (Fix `-Z print-type-sizes` for generators with discriminant field ordered first) - #105627 (Auto traits in `dyn Trait + Auto` are suggestable) - #105633 (Make `report_projection_error` more `Term` agnostic) - #105683 (Various cleanups to dest prop) - #105692 (Add regression test for #104678) - #105707 (rustdoc: remove unnecessary CSS `kbd { cursor: default }`) - #105715 (Do not mention long types in E0599 label) - #105722 (more clippy::complexity fixes) - #105724 (rustdoc: remove no-op CSS `.scrape-example .src-line-numbers { margin: 0 }`) - #105730 (rustdoc: remove no-op CSS `.item-info:before { color }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-15Rollup merge of #105715 - estebank:unsatisfied-bounds-label, r=compiler-errorsMatthias Krüger-1/+1
Do not mention long types in E0599 label The type is already mentioned in the main message and the list of unmet bounds.
2022-12-14Tweak output for bare `dyn Trait` in argumentsEsteban Küber-4/+8
Fix #35825.
2022-12-14Do not mention long types in E0599 labelEsteban Küber-1/+1
The type is already mentioned in the main message and the list of unmet bounds.
2022-12-14Highlight conflicting param-env candidates, againMichael Goulet-2/+12
2022-12-14Make report_projection_error more term agnosticMichael Goulet-2/+6
2022-12-14Rollup merge of #105523 - estebank:suggest-collect-vec, r=compiler-errorsMatthias Krüger-6/+6
Suggest `collect`ing into `Vec<_>` Fix #105510.
2022-12-13review commentsEsteban Küber-9/+9
2022-12-13Rollup merge of #105500 - oli-obk:unhide_unknown_spans, r=estebankMatthias Krüger-111/+21
Make some diagnostics not depend on the source of what they reference being available r? `@estebank` follow up to https://github.com/rust-lang/rust/pull/104449
2022-12-13Suggest `: Type` instead of `: _`Esteban Küber-9/+9
2022-12-13Suggest `collect`ing into `Vec<_>`Esteban Küber-3/+3
2022-12-13Suggest `ref` for some patterns as a fallbackEsteban Küber-0/+16
2022-12-13Change pattern borrowing suggestions to be verboseEsteban Küber-5/+11
Synthesize a more accurate span and use verbose suggestion output to make the message clearer.
2022-12-13Avoid rendering empty annotationsOli Scherer-17/+0
2022-12-13Clarify what "this" meansOli Scherer-4/+4
2022-12-13Inform the user which trait is meant in the diagnostic itself instead of ↵Oli Scherer-1/+1
relying on the span making it obvious