diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/suggestions/unnamable-types.stderr | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/suggestions/unnamable-types.stderr')
-rw-r--r-- | tests/ui/suggestions/unnamable-types.stderr | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/ui/suggestions/unnamable-types.stderr b/tests/ui/suggestions/unnamable-types.stderr new file mode 100644 index 000000000..24bedb529 --- /dev/null +++ b/tests/ui/suggestions/unnamable-types.stderr @@ -0,0 +1,66 @@ +error: missing type for `const` item + --> $DIR/unnamable-types.rs:6:8 + | +LL | const A = 5; + | ^ help: provide a type for the constant: `: i32` + +error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/unnamable-types.rs:10:11 + | +LL | static B: _ = "abc"; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `&str` + +error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/unnamable-types.rs:17:10 + | +LL | const C: _ = || 42; + | ^ not allowed in type signatures + | +note: however, the inferred type `[closure@unnamable-types.rs:17:14]` cannot be named + --> $DIR/unnamable-types.rs:17:14 + | +LL | const C: _ = || 42; + | ^^^^^ + +error: missing type for `const` item + --> $DIR/unnamable-types.rs:23:8 + | +LL | const D = S { t: { let i = 0; move || -> i32 { i } } }; + | ^ + | +note: however, the inferred type `S<[closure@unnamable-types.rs:23:31]>` cannot be named + --> $DIR/unnamable-types.rs:23:11 + | +LL | const D = S { t: { let i = 0; move || -> i32 { i } } }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: missing type for `const` item + --> $DIR/unnamable-types.rs:29:8 + | +LL | const E = foo; + | ^ help: provide a type for the constant: `: fn() -> i32` + +error: missing type for `const` item + --> $DIR/unnamable-types.rs:32:8 + | +LL | const F = S { t: foo }; + | ^ help: provide a type for the constant: `: S<fn() -> i32>` + +error: missing type for `const` item + --> $DIR/unnamable-types.rs:37:8 + | +LL | const G = || -> i32 { yield 0; return 1; }; + | ^ + | +note: however, the inferred type `[generator@$DIR/unnamable-types.rs:37:11: 37:20]` cannot be named + --> $DIR/unnamable-types.rs:37:11 + | +LL | const G = || -> i32 { yield 0; return 1; }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0121`. |