diff options
| author | bors <bors@rust-lang.org> | 2017-01-18 04:45:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-18 04:45:25 +0000 |
| commit | c8af93f0901c336e873ce18274026d0fd9bc7c1f (patch) | |
| tree | f2a4fd67379bc004f4b2bcbf78d33f68b96d836a /src/test/run-pass/thinlto | |
| parent | be1daa4a18b6685f42194ea1407f8d5def10b342 (diff) | |
| parent | f595ea25841eab1139ca10c5fe0349e51cc2b6c5 (diff) | |
| download | rust-c8af93f0901c336e873ce18274026d0fd9bc7c1f.tar.gz rust-c8af93f0901c336e873ce18274026d0fd9bc7c1f.zip | |
Auto merge of #38168 - estebank:help-E0034, r=nrc
E0034: provide disambiguated syntax for candidates
For a given file
```rust
trait A { fn foo(&self) {} }
trait B : A { fn foo(&self) {} }
fn bar<T: B>(a: &T) {
a.foo()
}
```
provide the following output
```
error[E0034]: multiple applicable items in scope
--> file.rs:6:5
|
6 | a.foo(1)
| ^^^ multiple `foo` found
|
note: candidate #1 is defined in the trait `A`
--> file.rs:2:11
|
2 | trait A { fn foo(&self, a: usize) {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: to use it here write `A::foo(&a, 1)` instead
--> file.rs:6:5
|
6 | a.foo(1)
| ^^^
note: candidate #2 is defined in the trait `B`
--> file.rs:3:15
|
3 | trait B : A { fn foo(&self, a: usize) {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: to use it here write `B::foo(&a, 1)` instead
--> file.rs:6:5
|
6 | a.foo(1)
| ^^^
```
Fix #37767.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions
