From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../method-not-found-generic-arg-elision.stderr | 104 +++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 tests/ui/methods/method-not-found-generic-arg-elision.stderr (limited to 'tests/ui/methods/method-not-found-generic-arg-elision.stderr') diff --git a/tests/ui/methods/method-not-found-generic-arg-elision.stderr b/tests/ui/methods/method-not-found-generic-arg-elision.stderr new file mode 100644 index 000000000..f3db56d1d --- /dev/null +++ b/tests/ui/methods/method-not-found-generic-arg-elision.stderr @@ -0,0 +1,104 @@ +error[E0599]: no method named `distance` found for struct `Point` in the current scope + --> $DIR/method-not-found-generic-arg-elision.rs:82:23 + | +LL | struct Point { + | --------------- method `distance` not found for this struct +... +LL | let d = point_i32.distance(); + | ^^^^^^^^ method not found in `Point` + | + = note: the method was found for + - `Point` + +error[E0599]: no method named `other` found for struct `Point` in the current scope + --> $DIR/method-not-found-generic-arg-elision.rs:84:23 + | +LL | struct Point { + | --------------- method `other` not found for this struct +... +LL | let d = point_i32.other(); + | ^^^^^ method not found in `Point` + +error[E0599]: no method named `extend` found for struct `Map` in the current scope + --> $DIR/method-not-found-generic-arg-elision.rs:87:29 + | +LL | v.iter().map(|x| x * x).extend(std::iter::once(100)); + | ^^^^^^ method not found in `Map, [closure@method-not-found-generic-arg-elision.rs:87:18]>` + +error[E0599]: no method named `method` found for struct `Wrapper` in the current scope + --> $DIR/method-not-found-generic-arg-elision.rs:90:13 + | +LL | struct Wrapper(T); + | ----------------- method `method` not found for this struct +... +LL | wrapper.method(); + | ^^^^^^ method not found in `Wrapper` + | + = note: the method was found for + - `Wrapper` + - `Wrapper` + - `Wrapper` + - `Wrapper` + and 2 more types + +error[E0599]: no method named `other` found for struct `Wrapper` in the current scope + --> $DIR/method-not-found-generic-arg-elision.rs:92:13 + | +LL | struct Wrapper(T); + | ----------------- method `other` not found for this struct +... +LL | wrapper.other(); + | ^^^^^ method not found in `Wrapper` + +error[E0599]: no method named `method` found for struct `Wrapper2<'_, bool, 3>` in the current scope + --> $DIR/method-not-found-generic-arg-elision.rs:96:13 + | +LL | struct Wrapper2<'a, T, const C: usize> { + | -------------------------------------- method `method` not found for this struct +... +LL | wrapper.method(); + | ^^^^^^ method not found in `Wrapper2<'_, bool, 3>` + | + = note: the method was found for + - `Wrapper2<'a, i8, C>` + - `Wrapper2<'a, i16, C>` + - `Wrapper2<'a, i32, C>` + +error[E0599]: no method named `other` found for struct `Wrapper2` in the current scope + --> $DIR/method-not-found-generic-arg-elision.rs:98:13 + | +LL | struct Wrapper2<'a, T, const C: usize> { + | -------------------------------------- method `other` not found for this struct +... +LL | wrapper.other(); + | ^^^^^ method not found in `Wrapper2<'_, bool, 3>` + +error[E0599]: no method named `not_found` found for struct `Vec<{integer}>` in the current scope + --> $DIR/method-not-found-generic-arg-elision.rs:101:7 + | +LL | a.not_found(); + | ^^^^^^^^^ method not found in `Vec<{integer}>` + +error[E0599]: the method `method` exists for struct `Struct`, but its trait bounds were not satisfied + --> $DIR/method-not-found-generic-arg-elision.rs:104:7 + | +LL | struct Struct { + | ---------------- method `method` not found for this struct +... +LL | s.method(); + | ^^^^^^ method cannot be called on `Struct` due to unsatisfied trait bounds + | +note: the following trait bounds were not satisfied: + `f64: Eq` + `f64: Ord` + --> $DIR/method-not-found-generic-arg-elision.rs:74:36 + | +LL | impl Struct { + | ^^ ^^^ --------- + | | | + | | unsatisfied trait bound introduced here + | unsatisfied trait bound introduced here + +error: aborting due to 9 previous errors + +For more information about this error, try `rustc --explain E0599`. -- cgit v1.2.3