os-rust/tests/ui/resolve
Trevor Gross ceae37188b
Rollup merge of #126575 - fmease:update-lint-type_alias_bounds, r=compiler-errors
Make it crystal clear what lint `type_alias_bounds` actually signifies

This is part of my work on https://github.com/rust-lang/rust/labels/F-lazy_type_alias ([tracking issue](#112792)).

---

To recap, the lint `type_alias_bounds` detects bounds on generic parameters and where clauses on (eager) type aliases. These bounds should've never been allowed because they are currently neither enforced[^1] at usage sites of type aliases nor thoroughly checked for correctness at definition sites due to the way type aliases are represented in the compiler. Allowing them was an oversight.

Explicitly label this as a known limitation of the type checker/system and establish the experimental feature `lazy_type_alias` as its eventual proper solution.

Where this becomes a bit tricky (for me as a rustc dev) are the "secondary effects" of these bounds whose existence I sadly can't deny. As a matter of fact, type alias bounds do play some small roles during type checking. However, after a lot of thinking over the last two weeks I've come to the conclusion (not without second-guessing myself though) that these use cases should not trump the fact that these bounds are currently *inherently broken*. Therefore the lint `type_alias_bounds` should and will continue to flag bounds that may have subordinate uses.

The two *known* secondary effects are:

1. They may enable the use of "shorthand" associated type paths `T::Assoc` (as opposed to fully qualified paths `<T as Trait>::Assoc`) where `T` is a type param bounded by some trait `Trait` which defines that assoc ty.
2. They may affect the default lifetime of trait object types passed as a type argument to the type alias. That concept is called (trait) object lifetime default.

The second one is negligible, no question asked. The first one however is actually "kinda nice" (for writability) and comes up in practice from time to time.

So why don't I just special-case trait bounds that "define" shorthand assoc type paths as originally planned in #125709?

1. Starting to permit even a tiny subset of bounds would already be enough to send a signal to users that bounds in type aliases have been legitimized and that they can expect to see type alias bounds in the wild from now on (proliferation). This would be actively misleading and dangerous because those bounds don't behave at all like one would expect, they are *not real*[^2]!
   1. Let's take `type A<T: Trait> = T::Proj;` for example. Everywhere else in the language `T: Trait` means `T: Trait + Sized`. For type aliases, that's not the case though: `T: Trait` and `T: Trait + ?Sized` for that matter do neither mean `T: Trait + Sized` nor `T: Trait + ?Sized` (for both!). Instead, whether `T` requires `Sized` or not entirely depends on the definition of `Trait`[^2]. Namely, whether or not it is bounded by `Sized`.
   2. Given `type A<T: Trait<AssocA = ()>> = T::AssocB;`, while `X: Trait` gets checked given `A<X>` (by virtue of projection wfchecking post alias expansion[^2]), the associated type constraint `AssocA = ()` gets dropped entirely! While we could choose to warn on such cases, it would inevitably lead to a huge pile of special cases.
   3. While it's common knowledge that the body / aliased type / RHS of an (eager) type alias does not get checked for well-formedness, I'm not sure if people would realize that that extends to bounds as well. Namely, `type A<T: Trait<[u8]>> = T::Proj;` compiles even if `Trait`'s generic parameter requires `Sized`. Of course, at usage sites `[u8]: Sized` would still end up getting checked[^2], so it's not a huge problem if you have full control over `A`. However, imagine that `A` was actually part of a public API and was never used inside the defining crate (not unreasonable). In such a scenario, downstream users would be presented with an impossible to use type alias! Remember, bounds may grow arbitrarily complex and nuanced in practice.
   4. Even if we allowed trait bounds that "define" shorthand assoc type paths, we would still need to continue to warn in cases where the assoc ty comes from a supertrait despite the fact that the shorthand syntax can be used: `type A<T: Sub> = T::Assoc;` does compile given `trait Sub: Super {}` and `trait Super { type Assoc; }`. However, `A<X>` does not enforce `X: Sub`, only `X: Super`[^2]. All that to say, type alias bounds are simply not real and we shouldn't pretend they are!
   5. Summarizing the points above, we would be legitimizing bounds that are completely broken!
2. It's infeasible to implement: Due to the lack of `TypeckResults` in `ItemCtxt` (and a way to propagate it to other parts of the compiler), the resolution of type-dependent paths in non-`Body` items (most notably type aliases) is not recoverable from the HIR alone which would be necessary because the information of whether an associated type path (projection) is a shorthand is only present pre&in-HIR and doesn't survive HIR ty lowering. Of course, I could rerun parts of HIR ty lowering inside the lint `type_alias_bounds` (namely, `probe_single_ty_param_bound_for_assoc_ty` which would need to be exposed or alternatively a stripped-down version of it). This likely has a performance impact and introduces complexity. In short, the "benefits" are not worth the costs.

---

* 3rd commit: Update a diagnostic to avoid suggesting type alias bounds
* 4th commit: Flag type alias bounds even if the RHS contains inherent associated types.
  * I started to allow them at some point in the past which was not correct (see commit for details)
* 5th commit: Allow type alias bounds if the RHS contains const projections and GCEs are enabled
  * (and add a `FIXME(generic_const_exprs)` to be revisited before (M)GCE's stabilization)
  * As a matter of fact type alias bounds are enforced in this case because the contained AnonConsts do get checked for well-formedness and crucially they inherit the generics and predicates of their parent item (here: the type alias)
* Remaining commits: Improve the lint `type_alias_bounds` itself

---

Fixes #125789 (sugg diag fix).
Fixes #125709 (wontfix, acknowledgement, sugg diag applic fix).
Fixes #104918 (sugg diag applic fix).
Fixes #100270 (wontfix, acknowledgement, sugg diag applic fix).
Fixes #94398 (true fix).

r? `@compiler-errors` `@oli-obk`

[^1]: From the perspective of the trait solver.
[^2]: Given `type A<T: Trait> = T::Proj;`, the reason why the trait bound "`T: Trait`" gets *seemingly* enforced at usage sites of the type alias `A` is simply because `A<X>` gets expanded to "`<X as Trait>::Proj`" very early on and it's the *expansion* that gets checked for well-formedness, not the type alias reference.
2024-07-26 02:20:28 -04:00
..
auxiliary Add known-bug tests for derive(PartialEq) mismatches with #[repr(packed)] attributes that are not visible before macro expansion 2024-03-07 21:40:11 +00:00
112590-2.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
112590-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
112590-2.stderr Add filter with next segment while lookup typo for path 2023-07-07 09:00:50 +08:00
associated-fn-called-as-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-fn-called-as-fn.stderr When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
bad-env-capture.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bad-env-capture.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-env-capture2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bad-env-capture2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-env-capture3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bad-env-capture3.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-expr-path.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-expr-path.stderr rustc_hir_analysis: add a helper to check function the signature mismatches 2023-09-19 18:15:23 +02:00
bad-expr-path2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-expr-path2.stderr rustc_hir_analysis: add a helper to check function the signature mismatches 2023-09-19 18:15:23 +02:00
bad-module.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-module.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-type-env-capture.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-type-env-capture.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
blind-item-local-shadow.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
blind-item-mixed-crate-use-item.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
blind-item-mixed-use-item.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
block-with-trait-parent.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
change-ty-to-const-param-sugg-0.rs Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
change-ty-to-const-param-sugg-0.stderr Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
change-ty-to-const-param-sugg-1.rs Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
change-ty-to-const-param-sugg-1.stderr Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
conflicting-primitive-names.rs Add UI tests related to feature-gated primitives 2024-03-14 13:32:54 -04:00
crate-called-as-function.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
crate-called-as-function.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
crate-in-paths.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
crate-in-paths.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
derive-macro-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-macro-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
disambiguate-identical-names.rs Move some UI tests into subdirectories 2023-04-02 19:42:30 -04:00
disambiguate-identical-names.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
editions-crate-root-2015.rs Do not use question as label 2024-07-24 21:03:27 +00:00
editions-crate-root-2015.stderr Do not use question as label 2024-07-24 21:03:27 +00:00
editions-crate-root-2018.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
editions-crate-root-2018.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
enums-are-namespaced-xc.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
enums-are-namespaced-xc.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
enums-pats-not-idents.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
enums-pats-not-idents.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
explicit-self-lowercase-param.rs Improve error for self: Box<self> 2023-05-11 13:21:10 +01:00
explicit-self-lowercase-param.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
export-fully-qualified-2018.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
export-fully-qualified-2018.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
export-fully-qualified.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
export-fully-qualified.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
extern-prelude-fail.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern-prelude-fail.stderr Do not use question as label 2024-07-24 21:03:27 +00:00
extern-prelude.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
field-and-method-in-self-not-available-in-assoc-fn.rs When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
field-and-method-in-self-not-available-in-assoc-fn.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
filter-intrinsics.rs Add size_of, size_of_val, align_of, and align_of_val to the prelude 2024-05-13 15:11:28 +02:00
filter-intrinsics.stderr Add size_of, size_of_val, align_of, and align_of_val to the prelude 2024-05-13 15:11:28 +02:00
generic-params-from-outer-item-in-const-item.default.stderr Add note to resolve error about generics from inside static/const 2024-01-14 12:31:28 +00:00
generic-params-from-outer-item-in-const-item.generic_const_items.stderr Add note to resolve error about generics from inside static/const 2024-01-14 12:31:28 +00:00
generic-params-from-outer-item-in-const-item.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
hidden_glob_reexports.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
hidden_glob_reexports.stderr Adjust span labels for HIDDEN_GLOB_REEXPORTS 2023-06-10 17:11:38 +08:00
impl-items-vis-unresolved.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-items-vis-unresolved.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
incorrect-self-res.rs Delay span bug when Self resolves to DefKind::{Mod,Trait} 2024-04-15 21:05:15 -04:00
incorrect-self-res.stderr Delay span bug when Self resolves to DefKind::{Mod,Trait} 2024-04-15 21:05:15 -04:00
issue-2330.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-2330.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-2356.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-2356.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
issue-3021-c.rs Generalize E0401 2023-09-10 23:06:14 +02:00
issue-3021-c.stderr Generalize E0401 2023-09-10 23:06:14 +02:00
issue-3021.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-3021.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3099-a.rs Move tests 2023-05-08 17:58:01 -03:00
issue-3099-a.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3099-b.rs Move tests 2023-05-08 17:58:01 -03:00
issue-3099-b.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3214.rs Move some tests 2024-04-21 15:43:43 -03:00
issue-3214.stderr Revert suggestion verbosity change 2024-07-22 22:51:53 +00:00
issue-3907-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-3907-2.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
issue-3907.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-3907.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-5035-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5035-2.stderr Track HirId instead of Span in ObligationCauseCode::SizedArgumentType 2024-01-03 18:59:42 +00:00
issue-5035.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5035.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5099.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5099.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5927.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5927.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-6642.rs Move tests 2023-08-28 17:47:37 -03:00
issue-6642.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-6702.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-6702.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-10200.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-10200.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-12796.rs Special case 'generic param from outer item' message for Self 2024-01-14 12:31:34 +00:00
issue-12796.stderr Special case 'generic param from outer item' message for Self 2024-01-14 12:31:34 +00:00
issue-14254.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-14254.stderr When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
issue-16058.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-16058.stderr Tweak output of import suggestions 2024-06-13 20:22:21 +00:00
issue-17518.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-17518.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-18252.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-18252.stderr More accurate suggestions when writing wrong style of enum variant literal 2024-07-18 18:20:35 +00:00
issue-19452.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-19452.stderr More accurate suggestions when writing wrong style of enum variant literal 2024-07-18 18:20:35 +00:00
issue-21221-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-21221-1.stderr Tweak output of import suggestions 2024-06-13 20:22:21 +00:00
issue-21221-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-21221-2.stderr Tweak output of import suggestions 2024-06-13 20:22:21 +00:00
issue-21221-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-21221-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-21221-4.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-21221-4.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-22692.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-22692.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23305.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23305.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-23716.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23716.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24968.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24968.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-26545.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-26545.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-30535.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-30535.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-31845.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-31845.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-33876.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-33876.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-35675.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-35675.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
issue-39226.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-39226.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-39559-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-39559-2.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-39559.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-39559.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
issue-42944.rs Suggest making private tuple struct field public 2023-01-11 21:35:42 +00:00
issue-42944.stderr Suggest making private tuple struct field public 2023-01-11 21:35:42 +00:00
issue-49074.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-49074.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-50599.rs Suppress "erroneous constant used" for constants tainted by errors 2023-05-15 00:00:00 +00:00
issue-50599.stderr Tweak output of import suggestions 2024-06-13 20:22:21 +00:00
issue-54379.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54379.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55673.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55673.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55673.stderr Inside eager ty aliases on unresolved assoc tys suggest fully qualifying instead of restricting their self ty 2024-07-23 01:26:24 +02:00
issue-57523.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-60057.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-60057.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
issue-65025-extern-static-parent-generics.rs Generalize E0401 2023-09-10 23:06:14 +02:00
issue-65025-extern-static-parent-generics.stderr Add note to resolve error about generics from inside static/const 2024-01-14 12:31:28 +00:00
issue-65035-static-with-parent-generics.rs Generalize E0401 2023-09-10 23:06:14 +02:00
issue-65035-static-with-parent-generics.stderr Add note to resolve error about generics from inside static/const 2024-01-14 12:31:28 +00:00
issue-69401-trait-fn-no-body-ty-local.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69401-trait-fn-no-body-ty-local.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-70736-async-fn-no-body-def-collector.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70736-async-fn-no-body-def-collector.stderr Stabilize AFIT and RPITIT 2023-10-13 21:01:36 +00:00
issue-73427.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-73427.stderr Tweak output of import suggestions 2024-06-13 20:22:21 +00:00
issue-80079.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80079.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-81508.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-81508.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-82156.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-82156.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-82865.rs Do not use question as label 2024-07-24 21:03:27 +00:00
issue-82865.stderr Do not use question as label 2024-07-24 21:03:27 +00:00
issue-85348.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85348.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85671.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-88472.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88472.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90113.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90113.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-100365.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100365.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-101749-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-101749-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-101749.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-101749.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-101749.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-102946.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102946.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
issue-103202.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103202.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-103474.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103474.stderr Tweak wording and logic 2023-09-23 01:54:05 +00:00
issue-104700-inner_scope.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-104700-inner_scope.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105069.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105069.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-107563-ambiguous-glob-reexports.rs Lint ambiguous glob re-exports 2023-03-20 03:22:31 +08:00
issue-107563-ambiguous-glob-reexports.stderr Lint ambiguous glob re-exports 2023-03-20 03:22:31 +08:00
issue-108529.rs diagnostics: avoid querying associated_item in the resolver 2023-02-27 09:22:51 -07:00
issue-108529.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-109153.rs fix(resolve): update shadowed_glob more precision 2023-06-14 01:38:35 +08:00
issue-109153.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-109250.rs refactor(resolve): clean up the early error return caused by non-call 2023-05-10 22:35:01 +08:00
issue-109250.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-111312.rs Don't cancel stashed TraitMissingMethod errors. 2024-02-29 11:05:40 +11:00
issue-111312.stderr Don't cancel stashed TraitMissingMethod errors. 2024-02-29 11:05:40 +11:00
issue-111727.rs Don't cancel stashed TraitMissingMethod errors. 2024-02-29 11:05:40 +11:00
issue-111727.stderr Don't cancel stashed TraitMissingMethod errors. 2024-02-29 11:05:40 +11:00
issue-112472-multi-generics-suggestion.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-112472-multi-generics-suggestion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-112472-multi-generics-suggestion.stderr Fix suggestion for E0404 not dealing with multiple generics 2023-06-15 18:19:09 +08:00
issue-113808-invalid-unused-qualifications-suggestion.fixed fixes #121331 2024-03-14 09:54:42 +08:00
issue-113808-invalid-unused-qualifications-suggestion.rs fixes #121331 2024-03-14 09:54:42 +08:00
issue-113808-invalid-unused-qualifications-suggestion.stderr fixes #121331 2024-03-14 09:54:42 +08:00
issue-114433-invalid-unused-qualifications-suggestion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-116164.rs resolve: skip underscore character during candidate lookup 2023-09-28 19:47:58 +08:00
issue-116164.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-117920.rs Use the glob binding in resolve_rustdoc_path process 2023-12-06 21:48:19 +08:00
issue-117920.stderr Use the glob binding in resolve_rustdoc_path process 2023-12-06 21:48:19 +08:00
issue-118295.rs tip for define macro name after macro_rules! 2023-12-06 23:19:39 +08:00
issue-118295.stderr tip for define macro name after macro_rules! 2023-12-06 23:19:39 +08:00
issue-120559.rs remove importing suggestions when there is a shadowed typo canddiate 2024-02-14 14:08:51 +08:00
issue-120559.stderr remove importing suggestions when there is a shadowed typo canddiate 2024-02-14 14:08:51 +08:00
levenshtein.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
levenshtein.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-determinacy-non-module.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing-in-namespace.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
missing-in-namespace.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
multiple_definitions_attribute_merging.rs Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
multiple_definitions_attribute_merging.stderr Update documentation 2024-03-20 09:49:57 +00:00
name-clash-nullary.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
name-clash-nullary.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
name-collision-in-trait-fn-sig.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-implicit-prelude-nested.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-implicit-prelude-nested.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
no-implicit-prelude.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-implicit-prelude.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
no-std-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-std-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-std-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
path-attr-in-const-block.rs collect attrs in const block expr 2024-06-20 19:59:27 +08:00
path-attr-in-const-block.stderr collect attrs in const block expr 2024-06-20 19:59:27 +08:00
pathless-extern-ok.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
point-at-type-parameter-shadowing-another-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
point-at-type-parameter-shadowing-another-type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
primitive-f16-f128-shadowed-mod.rs Update f16 and f128 tests to run on both 2015 and 2018 editions 2024-04-03 16:03:22 -04:00
primitive-f16-f128-shadowed.rs Update f16 and f128 tests to run on both 2015 and 2018 editions 2024-04-03 16:03:22 -04:00
primitive-usage.rs Add UI tests related to feature-gated primitives 2024-03-14 13:32:54 -04:00
privacy-enum-ctor.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
privacy-enum-ctor.stderr More accurate suggestions when writing wrong style of enum variant literal 2024-07-18 18:20:35 +00:00
privacy-struct-ctor.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
privacy-struct-ctor.stderr review comments: Tweak output 2023-01-11 21:36:02 +00:00
proc_macro_generated_packed.rs Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
proc_macro_generated_packed.stderr Update documentation 2024-03-20 09:49:57 +00:00
raw-ident-in-path.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
raw-ident-in-path.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
resolve-assoc-suggestions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-assoc-suggestions.stderr When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
resolve-bad-import-prefix.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-bad-import-prefix.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
resolve-bad-visibility.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-bad-visibility.stderr Do not use question as label 2024-07-24 21:03:27 +00:00
resolve-conflict-extern-crate-vs-extern-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-conflict-extern-crate-vs-extern-crate.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
resolve-conflict-import-vs-extern-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-conflict-import-vs-extern-crate.stderr Accurate use rename suggestion span 2024-07-18 00:00:04 +00:00
resolve-conflict-import-vs-import.fixed If suggestion would leave an empty line, delete it 2024-03-01 13:48:20 +00:00
resolve-conflict-import-vs-import.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-conflict-import-vs-import.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
resolve-conflict-item-vs-extern-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-conflict-item-vs-extern-crate.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
resolve-conflict-item-vs-import.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-conflict-item-vs-import.stderr Accurate use rename suggestion span 2024-07-18 00:00:04 +00:00
resolve-conflict-type-vs-import.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-conflict-type-vs-import.stderr Accurate use rename suggestion span 2024-07-18 00:00:04 +00:00
resolve-dont-hint-macro.rs Dont suggest ! for path in function call if it has generic args 2023-11-27 01:02:37 +00:00
resolve-dont-hint-macro.stderr Dont suggest ! for path in function call if it has generic args 2023-11-27 01:02:37 +00:00
resolve-hint-macro.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-hint-macro.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-hint-macro.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-inconsistent-binding-mode.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-inconsistent-binding-mode.stderr recurse into refs when comparing tys for diagnostics 2023-12-07 23:00:46 -05:00
resolve-inconsistent-names.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-inconsistent-names.stderr Replace HashMap with IndexMap in pattern binding resolve 2023-10-02 19:12:42 +02:00
resolve-issue-2428.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-label.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-label.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
resolve-primitive-fallback.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-primitive-fallback.stderr Use verbose style for argument removal suggestion 2024-07-05 19:40:09 +00:00
resolve-pseudo-shadowing.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-self-in-impl-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-self-in-impl-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-self-in-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-self-in-impl.stderr Merge collect_mod_item_types query into check_well_formed 2024-03-07 14:26:31 +00:00
resolve-speculative-adjustment.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-speculative-adjustment.stderr When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
resolve-type-param-in-item-in-trait.rs Generalize E0401 2023-09-10 23:06:14 +02:00
resolve-type-param-in-item-in-trait.stderr Generalize E0401 2023-09-10 23:06:14 +02:00
resolve-unknown-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-unknown-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-variant-assoc-item.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-variant-assoc-item.stderr refactor(resolve): clean up the early error return caused by non-call 2023-05-10 22:35:01 +08:00
shadow-const-param.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
shadow-const-param.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-builder-fn.rs Do not suggest unresolvable builder methods 2024-05-23 07:23:59 +05:30
suggest-builder-fn.stderr Do not suggest unresolvable builder methods 2024-05-23 07:23:59 +05:30
suggest-constructor-cycle-error.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-constructor-cycle-error.stderr fix cycle error for "use constructor" suggestion 2024-01-05 21:56:32 +01:00
suggest-import-without-clobbering-attrs.fixed compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
suggest-import-without-clobbering-attrs.rs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
suggest-import-without-clobbering-attrs.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
suggest-path-for-tuple-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-path-for-tuple-struct.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-path-instead-of-mod-dot-item.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-path-instead-of-mod-dot-item.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
token-error-correct-2.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
token-error-correct-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
token-error-correct-3.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
token-error-correct-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
token-error-correct-4.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
token-error-correct-4.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
token-error-correct.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
token-error-correct.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
tool-import.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
tool-import.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
tuple-struct-alias.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tuple-struct-alias.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typo-suggestion-for-variable-with-name-similar-to-struct-field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
typo-suggestion-mistyped-in-path.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typo-suggestion-mistyped-in-path.stderr Deduplicate some logic and reword output 2024-02-22 18:05:28 +00:00
typo-suggestion-named-underscore.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typo-suggestion-named-underscore.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-nonexistent-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-nonexistent-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unresolved-segments-visibility.rs Resolve visibility paths as modules not as types. 2023-08-02 15:30:24 +00:00
unresolved-segments-visibility.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unresolved_static_type_field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unresolved_static_type_field.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
unused-qualifications-suggestion.fixed fixes #121331 2024-03-14 09:54:42 +08:00
unused-qualifications-suggestion.rs fixes #121331 2024-03-14 09:54:42 +08:00
unused-qualifications-suggestion.stderr fixes #121331 2024-03-14 09:54:42 +08:00
use-self-in-inner-fn.rs Special case 'generic param from outer item' message for Self 2024-01-14 12:31:34 +00:00
use-self-in-inner-fn.stderr Special case 'generic param from outer item' message for Self 2024-01-14 12:31:34 +00:00
use_suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
use_suggestion.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
use_suggestion_placement.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
use_suggestion_placement.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
use_suggestion_placement.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
visibility-indeterminate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
visibility-indeterminate.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00