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 --- ...sing-associated-type-restriction-fixable.stderr | 143 +++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr (limited to 'src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr') diff --git a/src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr b/src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr new file mode 100644 index 000000000..ac839ff7e --- /dev/null +++ b/src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr @@ -0,0 +1,143 @@ +error[E0308]: mismatched types + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:13:13 + | +LL | qux(x.func()) + | --- ^^^^^^^^ expected `usize`, found associated type + | | + | arguments to this function are incorrect + | + = note: expected type `usize` + found associated type `::A` +note: function defined here + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 + | +LL | fn qux(_: usize) {} + | ^^^ -------- +help: consider constraining the associated type `::A` to `usize` + | +LL | fn foo<'a, T: Trait + 'a>(&self, _: impl Trait, x: impl Trait, _: T) { + | +++++++++++ + +error[E0308]: mismatched types + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:17:13 + | +LL | qux(x.func()) + | --- ^^^^^^^^ expected `usize`, found associated type + | | + | arguments to this function are incorrect + | + = note: expected type `usize` + found associated type `::A` +note: function defined here + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 + | +LL | fn qux(_: usize) {} + | ^^^ -------- +help: consider constraining the associated type `::A` to `usize` + | +LL | fn ban(x: T) where T: Trait { + | +++++++++++ + +error[E0308]: mismatched types + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:22:9 + | +LL | qux(x.func()) + | --- ^^^^^^^^ expected `usize`, found associated type + | | + | arguments to this function are incorrect + | + = note: expected type `usize` + found associated type `::A` +note: function defined here + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 + | +LL | fn qux(_: usize) {} + | ^^^ -------- +help: consider constraining the associated type `::A` to `usize` + | +LL | fn foo<'a, T: Trait + 'a>(_: impl Trait, x: impl Trait, _: T) { + | +++++++++++ + +error[E0308]: mismatched types + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:26:9 + | +LL | qux(x.func()) + | --- ^^^^^^^^ expected `usize`, found associated type + | | + | arguments to this function are incorrect + | + = note: expected type `usize` + found associated type `::A` +note: function defined here + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 + | +LL | fn qux(_: usize) {} + | ^^^ -------- +help: consider constraining the associated type `::A` to `usize` + | +LL | fn bar>(x: T) { + | +++++++++++ + +error[E0308]: mismatched types + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:30:9 + | +LL | qux(x.func()) + | --- ^^^^^^^^ expected `usize`, found associated type + | | + | arguments to this function are incorrect + | + = note: expected type `usize` + found associated type ` as Trait>::A` +note: function defined here + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 + | +LL | fn qux(_: usize) {} + | ^^^ -------- +help: consider constraining the associated type ` as Trait>::A` to `usize` + | +LL | fn foo2(x: impl Trait) { + | +++++++++++ + +error[E0308]: mismatched types + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:34:9 + | +LL | qux(x.func()) + | --- ^^^^^^^^ expected `usize`, found associated type + | | + | arguments to this function are incorrect + | + = note: expected type `usize` + found associated type `>::A` +note: function defined here + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 + | +LL | fn qux(_: usize) {} + | ^^^ -------- +help: consider constraining the associated type `>::A` to `usize` + | +LL | fn bar2>(x: T) { + | +++++++++++ + +error[E0308]: mismatched types + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:38:9 + | +LL | qux(x.func()) + | --- ^^^^^^^^ expected `usize`, found associated type + | | + | arguments to this function are incorrect + | + = note: expected type `usize` + found associated type `::A` +note: function defined here + --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 + | +LL | fn qux(_: usize) {} + | ^^^ -------- +help: consider constraining the associated type `::A` to `usize` + | +LL | fn ban(x: T) where T: Trait { + | +++++++++++ + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3