From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/issues/issue-69306.stderr | 138 +++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 tests/ui/issues/issue-69306.stderr (limited to 'tests/ui/issues/issue-69306.stderr') diff --git a/tests/ui/issues/issue-69306.stderr b/tests/ui/issues/issue-69306.stderr new file mode 100644 index 000000000..61ec5d318 --- /dev/null +++ b/tests/ui/issues/issue-69306.stderr @@ -0,0 +1,138 @@ +error[E0308]: mismatched types + --> $DIR/issue-69306.rs:5:28 + | +LL | impl S0 { + | - this type parameter +LL | const C: S0 = Self(0); + | ---- ^ expected type parameter `T`, found integer + | | + | arguments to this function are incorrect + | + = note: expected type parameter `T` + found type `{integer}` +note: tuple struct defined here + --> $DIR/issue-69306.rs:3:8 + | +LL | struct S0(T); + | ^^ + +error[E0308]: mismatched types + --> $DIR/issue-69306.rs:5:23 + | +LL | impl S0 { + | - this type parameter +LL | const C: S0 = Self(0); + | ^^^^^^^ expected `u8`, found type parameter `T` + | + = note: expected struct `S0` + found struct `S0` + +error[E0308]: mismatched types + --> $DIR/issue-69306.rs:10:14 + | +LL | impl S0 { + | - this type parameter +... +LL | Self(0); + | ---- ^ expected type parameter `T`, found integer + | | + | arguments to this function are incorrect + | + = note: expected type parameter `T` + found type `{integer}` +note: tuple struct defined here + --> $DIR/issue-69306.rs:3:8 + | +LL | struct S0(T); + | ^^ + +error[E0308]: mismatched types + --> $DIR/issue-69306.rs:27:14 + | +LL | impl Foo for as Fun>::Out { + | - this type parameter +LL | fn foo() { +LL | Self(0); + | ---- ^ expected type parameter `T`, found integer + | | + | arguments to this function are incorrect + | + = note: expected type parameter `T` + found type `{integer}` +note: tuple struct defined here + --> $DIR/issue-69306.rs:3:8 + | +LL | struct S0(T); + | ^^ + +error[E0308]: mismatched types + --> $DIR/issue-69306.rs:33:32 + | +LL | impl S1 { + | - this type parameter +LL | const C: S1 = Self(0, 1); + | ---- ^ expected type parameter `T`, found integer + | | + | arguments to this function are incorrect + | + = note: expected type parameter `T` + found type `{integer}` +note: tuple struct defined here + --> $DIR/issue-69306.rs:31:8 + | +LL | struct S1(T, U); + | ^^ + +error[E0308]: mismatched types + --> $DIR/issue-69306.rs:33:27 + | +LL | impl S1 { + | - this type parameter +LL | const C: S1 = Self(0, 1); + | ^^^^^^^^^^ expected `u8`, found type parameter `T` + | + = note: expected struct `S1` + found struct `S1` + +error[E0308]: mismatched types + --> $DIR/issue-69306.rs:41:14 + | +LL | impl S2 { + | - expected type parameter +LL | fn map(x: U) -> S2 { + | - found type parameter +LL | Self(x) + | ---- ^ expected type parameter `T`, found type parameter `U` + | | + | arguments to this function are incorrect + | + = note: expected type parameter `T` + found type parameter `U` + = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound + = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters +note: tuple struct defined here + --> $DIR/issue-69306.rs:38:8 + | +LL | struct S2(T); + | ^^ + +error[E0308]: mismatched types + --> $DIR/issue-69306.rs:41:9 + | +LL | impl S2 { + | - found type parameter +LL | fn map(x: U) -> S2 { + | - ----- expected `S2` because of return type + | | + | expected type parameter +LL | Self(x) + | ^^^^^^^ expected type parameter `U`, found type parameter `T` + | + = note: expected struct `S2` + found struct `S2` + = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound + = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters + +error: aborting due to 8 previous errors + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3