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/traits/issue-35869.stderr | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 tests/ui/traits/issue-35869.stderr (limited to 'tests/ui/traits/issue-35869.stderr') diff --git a/tests/ui/traits/issue-35869.stderr b/tests/ui/traits/issue-35869.stderr new file mode 100644 index 000000000..6d985bdea --- /dev/null +++ b/tests/ui/traits/issue-35869.stderr @@ -0,0 +1,71 @@ +error[E0053]: method `foo` has an incompatible type for trait + --> $DIR/issue-35869.rs:11:15 + | +LL | fn foo(_: fn(u16) -> ()) {} + | ^^^^^^^^^^^^^ + | | + | expected `u8`, found `u16` + | help: change the parameter type to match the trait: `fn(u8)` + | +note: type in trait + --> $DIR/issue-35869.rs:2:15 + | +LL | fn foo(_: fn(u8) -> ()); + | ^^^^^^^^^^^^ + = note: expected signature `fn(fn(u8))` + found signature `fn(fn(u16))` + +error[E0053]: method `bar` has an incompatible type for trait + --> $DIR/issue-35869.rs:13:15 + | +LL | fn bar(_: Option) {} + | ^^^^^^^^^^^ + | | + | expected `u8`, found `u16` + | help: change the parameter type to match the trait: `Option` + | +note: type in trait + --> $DIR/issue-35869.rs:3:15 + | +LL | fn bar(_: Option); + | ^^^^^^^^^^ + = note: expected signature `fn(Option)` + found signature `fn(Option)` + +error[E0053]: method `baz` has an incompatible type for trait + --> $DIR/issue-35869.rs:15:15 + | +LL | fn baz(_: (u16, u16)) {} + | ^^^^^^^^^^ + | | + | expected `u8`, found `u16` + | help: change the parameter type to match the trait: `(u8, u16)` + | +note: type in trait + --> $DIR/issue-35869.rs:4:15 + | +LL | fn baz(_: (u8, u16)); + | ^^^^^^^^^ + = note: expected signature `fn((u8, _))` + found signature `fn((u16, _))` + +error[E0053]: method `qux` has an incompatible type for trait + --> $DIR/issue-35869.rs:17:17 + | +LL | fn qux() -> u16 { 5u16 } + | ^^^ + | | + | expected `u8`, found `u16` + | help: change the output type to match the trait: `u8` + | +note: type in trait + --> $DIR/issue-35869.rs:5:17 + | +LL | fn qux() -> u8; + | ^^ + = note: expected signature `fn() -> u8` + found signature `fn() -> u16` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0053`. -- cgit v1.2.3