diff options
| author | AliƩnore Bouttefeux <alienore.bouttefeux@gmail.com> | 2021-05-21 14:01:38 +0200 |
|---|---|---|
| committer | AliƩnore Bouttefeux <alienore.bouttefeux@gmail.com> | 2021-05-21 14:31:06 +0200 |
| commit | 6efa14b3add08188c5322db8694a8cbbea7851e5 (patch) | |
| tree | 1dcefab63646617647bf8b939e172f35a4709f13 /src/test/ui/methods | |
| parent | c64a2ed191f2a9137227b71d7005d0d93c376976 (diff) | |
| download | rust-6efa14b3add08188c5322db8694a8cbbea7851e5.tar.gz rust-6efa14b3add08188c5322db8694a8cbbea7851e5.zip | |
remove generic argument insead of displaying "_"
Diffstat (limited to 'src/test/ui/methods')
| -rw-r--r-- | src/test/ui/methods/method-not-found-generic-arg-elision.rs | 10 | ||||
| -rw-r--r-- | src/test/ui/methods/method-not-found-generic-arg-elision.stderr | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/test/ui/methods/method-not-found-generic-arg-elision.rs b/src/test/ui/methods/method-not-found-generic-arg-elision.rs index 85ccb0bd0de..23f01fb861f 100644 --- a/src/test/ui/methods/method-not-found-generic-arg-elision.rs +++ b/src/test/ui/methods/method-not-found-generic-arg-elision.rs @@ -69,22 +69,22 @@ fn main() { let d = point_i32.distance(); //~^ ERROR no method named `distance` found for struct `Point<i32> let d = point_i32.other(); - //~^ ERROR no method named `other` found for struct `Point<_> + //~^ ERROR no method named `other` found for struct `Point let v = vec![1_i32, 2, 3]; v.iter().map(|x| x * x).extend(std::iter::once(100)); - //~^ ERROR no method named `extend` found for struct `Map<_, _> + //~^ ERROR no method named `extend` found for struct `Map let wrapper = Wrapper(true); wrapper.method(); //~^ ERROR no method named `method` found for struct `Wrapper<bool> wrapper.other(); - //~^ ERROR no method named `other` found for struct `Wrapper<_> + //~^ ERROR no method named `other` found for struct `Wrapper let boolean = true; let wrapper = Wrapper2::<'_, _, 3> {x: &boolean}; wrapper.method(); //~^ ERROR no method named `method` found for struct `Wrapper2<'_, bool, 3_usize> wrapper.other(); - //~^ ERROR no method named `other` found for struct `Wrapper2<'_, _, _> + //~^ ERROR no method named `other` found for struct `Wrapper2 let a = vec![1, 2, 3]; a.not_found(); - //~^ ERROR no method named `not_found` found for struct `Vec<_, _> + //~^ ERROR no method named `not_found` found for struct `Vec } diff --git a/src/test/ui/methods/method-not-found-generic-arg-elision.stderr b/src/test/ui/methods/method-not-found-generic-arg-elision.stderr index 80e111390c6..65dbabbc143 100644 --- a/src/test/ui/methods/method-not-found-generic-arg-elision.stderr +++ b/src/test/ui/methods/method-not-found-generic-arg-elision.stderr @@ -9,7 +9,7 @@ LL | let d = point_i32.distance(); | = note: The method was found for Point<f64>. -error[E0599]: no method named `other` found for struct `Point<_>` in the current scope +error[E0599]: no method named `other` found for struct `Point` in the current scope --> $DIR/method-not-found-generic-arg-elision.rs:71:23 | LL | struct Point<T> { @@ -18,7 +18,7 @@ LL | struct Point<T> { LL | let d = point_i32.other(); | ^^^^^ method not found in `Point<i32>` -error[E0599]: no method named `extend` found for struct `Map<_, _>` in the current scope +error[E0599]: no method named `extend` found for struct `Map` in the current scope --> $DIR/method-not-found-generic-arg-elision.rs:74:29 | LL | v.iter().map(|x| x * x).extend(std::iter::once(100)); @@ -35,7 +35,7 @@ LL | wrapper.method(); | = note: The method was found for Wrapper<i8>, Wrapper<u16>, Wrapper<u16> and 3 more. -error[E0599]: no method named `other` found for struct `Wrapper<_>` in the current scope +error[E0599]: no method named `other` found for struct `Wrapper` in the current scope --> $DIR/method-not-found-generic-arg-elision.rs:79:13 | LL | struct Wrapper<T>(T); @@ -55,7 +55,7 @@ LL | wrapper.method(); | = note: The method was found for Wrapper2<'a, i8, C>, Wrapper2<'a, i32, C> and Wrapper2<'a, i32, C>. -error[E0599]: no method named `other` found for struct `Wrapper2<'_, _, _>` in the current scope +error[E0599]: no method named `other` found for struct `Wrapper2` in the current scope --> $DIR/method-not-found-generic-arg-elision.rs:85:13 | LL | struct Wrapper2<'a, T, const C: usize> { @@ -64,7 +64,7 @@ LL | struct Wrapper2<'a, T, const C: usize> { LL | wrapper.other(); | ^^^^^ method not found in `Wrapper2<'_, bool, 3_usize>` -error[E0599]: no method named `not_found` found for struct `Vec<_, _>` in the current scope +error[E0599]: no method named `not_found` found for struct `Vec` in the current scope --> $DIR/method-not-found-generic-arg-elision.rs:88:7 | LL | a.not_found(); |
