diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/ui/const-generics/generic_arg_infer | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/const-generics/generic_arg_infer')
-rw-r--r-- | tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs | 2 | ||||
-rw-r--r-- | tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr | 19 |
2 files changed, 18 insertions, 3 deletions
diff --git a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs index 29aa0f59d..c254b4ee0 100644 --- a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs +++ b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs @@ -15,7 +15,7 @@ fn bad_infer_fn<_>() {} fn main() { - let a: All<_, _, _>; + let a: All<_, _, _>; //~ ERROR struct takes 2 generic arguments but 3 all_fn(); let v: [u8; _]; let v: [u8; 10] = [0; _]; diff --git a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr index e6d0c743d..a6b736261 100644 --- a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr +++ b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr @@ -19,6 +19,21 @@ LL | struct BadInfer<_>; = help: consider removing `_`, referring to it in a field, or using a marker such as `PhantomData` = help: if you intended `_` to be a const parameter, use `const _: usize` instead -error: aborting due to 3 previous errors +error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supplied + --> $DIR/infer-arg-test.rs:18:10 + | +LL | let a: All<_, _, _>; + | ^^^ - help: remove this generic argument + | | + | expected 2 generic arguments + | +note: struct defined here, with 2 generic parameters: `T`, `N` + --> $DIR/infer-arg-test.rs:3:8 + | +LL | struct All<'a, T, const N: usize> { + | ^^^ - -------------- + +error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0392`. +Some errors have detailed explanations: E0107, E0392. +For more information about an error, try `rustc --explain E0107`. |