diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/parser/const-param-decl-on-type-instead-of-impl.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/parser/const-param-decl-on-type-instead-of-impl.stderr')
-rw-r--r-- | src/test/ui/parser/const-param-decl-on-type-instead-of-impl.stderr | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/test/ui/parser/const-param-decl-on-type-instead-of-impl.stderr b/src/test/ui/parser/const-param-decl-on-type-instead-of-impl.stderr new file mode 100644 index 000000000..96885d11e --- /dev/null +++ b/src/test/ui/parser/const-param-decl-on-type-instead-of-impl.stderr @@ -0,0 +1,47 @@ +error: unexpected `const` parameter declaration + --> $DIR/const-param-decl-on-type-instead-of-impl.rs:2:12 + | +LL | impl NInts<const N: usize> {} + | ^^^^^^^^^^^^^^ expected a `const` expression, not a parameter declaration + | +help: `const` parameters must be declared for the `impl` + | +LL | impl<const N: usize> NInts<N> {} + | ++++++++++++++++ ~ + +error: unexpected `const` parameter declaration + --> $DIR/const-param-decl-on-type-instead-of-impl.rs:8:17 + | +LL | fn banana(a: <T<const N: usize>>::BAR) {} + | ^^^^^^^^^^^^^^ expected a `const` expression, not a parameter declaration + +error: unexpected `const` parameter declaration + --> $DIR/const-param-decl-on-type-instead-of-impl.rs:12:26 + | +LL | path::path::Struct::<const N: usize>() + | ^^^^^^^^^^^^^^ expected a `const` expression, not a parameter declaration + +error[E0433]: failed to resolve: use of undeclared crate or module `path` + --> $DIR/const-param-decl-on-type-instead-of-impl.rs:12:5 + | +LL | path::path::Struct::<const N: usize>() + | ^^^^ use of undeclared crate or module `path` + +error[E0412]: cannot find type `T` in this scope + --> $DIR/const-param-decl-on-type-instead-of-impl.rs:8:15 + | +LL | fn banana(a: <T<const N: usize>>::BAR) {} + | ^ not found in this scope + +error[E0308]: mismatched types + --> $DIR/const-param-decl-on-type-instead-of-impl.rs:5:17 + | +LL | let _: () = 42; + | -- ^^ expected `()`, found integer + | | + | expected due to this + +error: aborting due to 6 previous errors + +Some errors have detailed explanations: E0308, E0412, E0433. +For more information about an error, try `rustc --explain E0308`. |