summary refs log tree commit diff
path: root/tests/ui/impl-trait/issues
AgeCommit message (Collapse)AuthorLines
2024-01-15Rollup merge of #119818 - oli-obk:even_more_follow_up_errors3, r=compiler-errorsMatthias Krüger-15/+2
Silence some follow-up errors [3/x] this is one piece of the requested cleanups from https://github.com/rust-lang/rust/pull/117449 Keep error types around, even in obligations. These help silence follow-up errors, as we now figure out that some types (most notably inference variables) are equal to an error type. But it also allows figuring out more types in the presence of errors, possibly causing more errors.
2024-01-13Bless testsGeorge-lewis-0/+2
Update tests
2024-01-11Keep error types around, even in obligations.Oli Scherer-15/+2
These help silence follow up errors
2024-01-11Use the right level with `-Ztreat-err-as-bug`.Nicholas Nethercote-1/+1
Errors in `DiagCtxtInner::emit_diagnostic` are never set to `Level::Bug`, because the condition never succeeds, because `self.treat_err_as_bug()` is called *before* the error counts are incremented. This commit switches to `self.treat_next_err_as_bug()`, fixing the problem. This changes the error message output to actually say "internal compiler error".
2024-01-09Avoid silencing relevant follow-up errorsOli Scherer-6/+99
2024-01-07Split note, fix const/static impl trait errorMichael Goulet-24/+48
2024-01-02Reorder `check_item_type` diagnostics so they occur next to the ↵Oli Scherer-13/+22
corresponding `check_well_formed` diagnostics
2023-11-24Show number in error message even for one errorNilstrieb-21/+21
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-20s/generator/coroutine/Oli Scherer-1/+1
2023-10-20s/Generator/Coroutine/Oli Scherer-4/+4
2023-10-06Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiserbors-1/+1
Show more information when multiple `impl`s apply - When there are `impl`s without type params, show only those (to avoid showing overly generic `impl`s). ``` error[E0283]: type annotations needed --> $DIR/multiple-impl-apply.rs:34:9 | LL | let y = x.into(); | ^ ---- type must be known at this point | note: multiple `impl`s satisfying `_: From<Baz>` found --> $DIR/multiple-impl-apply.rs:14:1 | LL | impl From<Baz> for Bar { | ^^^^^^^^^^^^^^^^^^^^^^ ... LL | impl From<Baz> for Foo { | ^^^^^^^^^^^^^^^^^^^^^^ = note: required for `Baz` to implement `Into<_>` help: consider giving `y` an explicit type | LL | let y: /* Type */ = x.into(); | ++++++++++++ ``` - Lower the importance of `T: Sized`, `T: WellFormed` and coercion errors, to prioritize more relevant errors. The pre-existing deduplication logic deals with hiding redundant errors better that way, and we show errors with more metadata that is useful to the user. - Show `<SelfTy as Trait>::assoc_fn` suggestion in more cases. ``` error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type --> $DIR/cross-return-site-inference.rs:38:16 | LL | return Err(From::from("foo")); | ^^^^^^^^^^ cannot call associated function of trait | help: use a fully-qualified path to a specific available implementation | LL | return Err(</* self type */ as From>::from("foo")); | +++++++++++++++++++ + ``` Fix #88284.
2023-10-04Tweak wording of E0562Esteban Küber-24/+24
Fix #80476.
2023-10-04Reorder fullfillment errors to keep more interesting ones firstEsteban Küber-1/+1
In `report_fullfillment_errors` push back `T: Sized`, `T: WellFormed` and coercion errors to the end of the list. The pre-existing deduplication logic eliminates redundant errors better that way, keeping the resulting output with fewer errors than before, while also having more detail.
2023-10-02Point out the actual mismatch errorMichael Goulet-0/+1
2023-10-02For a single impl candidate, try to unify it with error trait refMichael Goulet-2/+2
2023-09-21adjust how closure/generator types and rvalues are printedRalf Jung-3/+3
2023-08-27More precisely detect cycle errors from type_of on opaqueMichael Goulet-2/+2
2023-07-29Change default panic handler message format.Mara Bos-1/+1
2023-07-07Require TAITs to be mentioned in the signatures of functions that register ↵Oli Scherer-19/+81
hidden types for them
2023-07-03Remove compare modeMichael Goulet-1/+0
2023-05-05Don't print backtrace on ICEs in `issue-86800.rs`.Nicholas Nethercote-19/+5
Because it then just has to be filtered out. This change makes this test more like these other tests: - tests/ui/treat-err-as-bug/err.rs - tests/ui/treat-err-as-bug/delay_span_bug.rs - tests/ui/mir/validate/storage-live.rs - tests/ui/associated-inherent-types/bugs/ice-substitution.rs - tests/ui/layout/valid_range_oob.rs
2023-04-12Split out a separate feature gate for impl trait in associated typesOli Scherer-12/+14
2023-03-08Remove `identity_future` indirectionArpad Borsos-12/+2
This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm. Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]` annotation.
2023-02-22pluralize stuffMichael Goulet-12/+12
2023-02-14Better label for illegal impl trait typesMichael Goulet-4/+4
2023-02-07Tweak ICE messageEsteban Küber-3/+1
Modify main message to be more conversational and emit one fewer note.
2023-01-30Modify primary span label for E0308Esteban Küber-2/+2
The previous output was unintuitive to users.
2023-01-27Bless tests.Camille GILLOT-2/+2
2023-01-18Auto merge of #106503 - cjgillot:remap-nofilter, r=oli-obkbors-0/+39
Do not filter substs in `remap_generic_params_to_declaration_params`. The relevant filtering should have been performed by borrowck. Fixes https://github.com/rust-lang/rust/issues/105826 r? types
2023-01-11Conserve cause of `ImplDerivedObligation` in E0599Esteban Küber-2/+7
CC #86377.
2023-01-11Do not filter substs in `remap_generic_params_to_declaration_params`.Camille GILLOT-0/+39
The relevant filtering should have been performed by borrowck.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+1449