From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../invalid-const-arg-for-type-param.stderr | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr (limited to 'src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr') diff --git a/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr b/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr new file mode 100644 index 000000000..b1b359619 --- /dev/null +++ b/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr @@ -0,0 +1,41 @@ +error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied + --> $DIR/invalid-const-arg-for-type-param.rs:6:23 + | +LL | let _: u32 = 5i32.try_into::<32>().unwrap(); + | ^^^^^^^^------ help: remove these generics + | | + | expected 0 generic arguments + | +note: associated function defined here, with 0 generic parameters + --> $SRC_DIR/core/src/convert/mod.rs:LL:COL + | +LL | fn try_into(self) -> Result; + | ^^^^^^^^ + +error[E0599]: no method named `f` found for struct `S` in the current scope + --> $DIR/invalid-const-arg-for-type-param.rs:9:7 + | +LL | struct S; + | -------- method `f` not found for this struct +... +LL | S.f::<0>(); + | ^ method not found in `S` + +error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied + --> $DIR/invalid-const-arg-for-type-param.rs:12:5 + | +LL | S::<0>; + | ^----- help: remove these generics + | | + | expected 0 generic arguments + | +note: struct defined here, with 0 generic parameters + --> $DIR/invalid-const-arg-for-type-param.rs:3:8 + | +LL | struct S; + | ^ + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0107, E0599. +For more information about an error, try `rustc --explain E0107`. -- cgit v1.2.3