diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-12-21 13:18:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-21 13:18:20 +0100 |
| commit | 2770fdfaaaabcd4939899cc53d37d6b568b88995 (patch) | |
| tree | 28210e145d41aa5343e2253f17b732ea36a265bd /src/test/ui/span | |
| parent | 365f7574b23cbfa3a6918840fd40c0d534465850 (diff) | |
| parent | e70d888103eddbcecc03e2f04b3008ac68c67c71 (diff) | |
| download | rust-2770fdfaaaabcd4939899cc53d37d6b568b88995.tar.gz rust-2770fdfaaaabcd4939899cc53d37d6b568b88995.zip | |
Rollup merge of #46860 - estebank:candidate-def-sp, r=petrochenkov
Use def span for associated function suggestions
Diffstat (limited to 'src/test/ui/span')
| -rw-r--r-- | src/test/ui/span/issue-37767.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/span/issue-7575.stderr | 12 |
2 files changed, 10 insertions, 14 deletions
diff --git a/src/test/ui/span/issue-37767.stderr b/src/test/ui/span/issue-37767.stderr index 8babcc74ed5..e9a1fe82f14 100644 --- a/src/test/ui/span/issue-37767.stderr +++ b/src/test/ui/span/issue-37767.stderr @@ -8,13 +8,13 @@ note: candidate #1 is defined in the trait `A` --> $DIR/issue-37767.rs:12:5 | 12 | fn foo(&mut self) {} - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `A::foo(&a)` instead note: candidate #2 is defined in the trait `B` --> $DIR/issue-37767.rs:16:5 | 16 | fn foo(&mut self) {} - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `B::foo(&a)` instead error[E0034]: multiple applicable items in scope @@ -27,13 +27,13 @@ note: candidate #1 is defined in the trait `C` --> $DIR/issue-37767.rs:24:5 | 24 | fn foo(&self) {} - | ^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^ = help: to disambiguate the method call, write `C::foo(&a)` instead note: candidate #2 is defined in the trait `D` --> $DIR/issue-37767.rs:28:5 | 28 | fn foo(&self) {} - | ^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^ = help: to disambiguate the method call, write `D::foo(&a)` instead error[E0034]: multiple applicable items in scope @@ -46,13 +46,13 @@ note: candidate #1 is defined in the trait `E` --> $DIR/issue-37767.rs:36:5 | 36 | fn foo(self) {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ = help: to disambiguate the method call, write `E::foo(a)` instead note: candidate #2 is defined in the trait `F` --> $DIR/issue-37767.rs:40:5 | 40 | fn foo(self) {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ = help: to disambiguate the method call, write `F::foo(a)` instead error: aborting due to 3 previous errors diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index 57c4d25b7d0..aeb98e4cabc 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -44,10 +44,8 @@ error[E0599]: no method named `fff` found for type `Myisize` in the current scop note: candidate #1 is defined in an impl for the type `Myisize` --> $DIR/issue-7575.rs:51:5 | -51 | / fn fff(i: isize) -> isize { -52 | | i -53 | | } - | |_____^ +51 | fn fff(i: isize) -> isize { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0599]: no method named `is_str` found for type `T` in the current scope --> $DIR/issue-7575.rs:82:7 @@ -60,10 +58,8 @@ error[E0599]: no method named `is_str` found for type `T` in the current scope note: candidate #1 is defined in the trait `ManyImplTrait` --> $DIR/issue-7575.rs:57:5 | -57 | / fn is_str() -> bool { -58 | | false -59 | | } - | |_____^ +57 | fn is_str() -> bool { + | ^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `ManyImplTrait::is_str(t)` instead = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `is_str`, perhaps you need to implement it: |
