diff options
| author | Michael Goulet <michael@errs.io> | 2025-01-02 18:18:19 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-01-02 23:39:16 +0000 |
| commit | c529fe0475e7c8161e950c9dc2d1409073593750 (patch) | |
| tree | 16a1a548c9dd6529244e1e053dc9a48f89a16a14 /tests/ui/generic-const-items | |
| parent | c5d4996404fe7ed37a94d83d7b632ed6a566d2ac (diff) | |
| download | rust-c529fe0475e7c8161e950c9dc2d1409073593750.tar.gz rust-c529fe0475e7c8161e950c9dc2d1409073593750.zip | |
Remove diagnostic_only_typeck and fix placeholder suggestion for const/static
Diffstat (limited to 'tests/ui/generic-const-items')
| -rw-r--r-- | tests/ui/generic-const-items/assoc-const-missing-type.rs | 1 | ||||
| -rw-r--r-- | tests/ui/generic-const-items/assoc-const-missing-type.stderr | 18 |
2 files changed, 3 insertions, 16 deletions
diff --git a/tests/ui/generic-const-items/assoc-const-missing-type.rs b/tests/ui/generic-const-items/assoc-const-missing-type.rs index 93160f0b575..0c94a4262ef 100644 --- a/tests/ui/generic-const-items/assoc-const-missing-type.rs +++ b/tests/ui/generic-const-items/assoc-const-missing-type.rs @@ -12,7 +12,6 @@ impl Trait for () { const K<T> = (); //~^ ERROR missing type for `const` item //~| ERROR mismatched types - //~| ERROR mismatched types const Q = ""; //~^ ERROR missing type for `const` item //~| ERROR lifetime parameters or bounds on const `Q` do not match the trait declaration diff --git a/tests/ui/generic-const-items/assoc-const-missing-type.stderr b/tests/ui/generic-const-items/assoc-const-missing-type.stderr index 6f35c0958d4..5af119dffa7 100644 --- a/tests/ui/generic-const-items/assoc-const-missing-type.stderr +++ b/tests/ui/generic-const-items/assoc-const-missing-type.stderr @@ -16,7 +16,7 @@ LL | const K<T> = (); | ^ help: provide a type for the associated constant: `()` error[E0195]: lifetime parameters or bounds on const `Q` do not match the trait declaration - --> $DIR/assoc-const-missing-type.rs:16:12 + --> $DIR/assoc-const-missing-type.rs:15:12 | LL | const Q<'a>: &'a str; | ---- lifetimes in impl do not match this const in trait @@ -25,24 +25,12 @@ LL | const Q = ""; | ^ lifetimes do not match const in trait error: missing type for `const` item - --> $DIR/assoc-const-missing-type.rs:16:12 + --> $DIR/assoc-const-missing-type.rs:15:12 | LL | const Q = ""; | ^ help: provide a type for the associated constant: `: &str` -error[E0308]: mismatched types - --> $DIR/assoc-const-missing-type.rs:12:18 - | -LL | const K<T> = (); - | - ^^ expected type parameter `T`, found `()` - | | - | expected this type parameter - | - = note: expected type parameter `T` - found unit type `()` - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` - -error: aborting due to 5 previous errors +error: aborting due to 4 previous errors Some errors have detailed explanations: E0195, E0308. For more information about an error, try `rustc --explain E0195`. |
