about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2016-12-04 18:10:59 -0800
committerEsteban Küber <esteban@kuber.com.ar>2017-01-12 14:54:05 -0800
commitf595ea25841eab1139ca10c5fe0349e51cc2b6c5 (patch)
tree4cdd38c7b1134c4b16774f0406c918627ca9d51d /src/rustllvm/RustWrapper.cpp
parent27b9e6d450590751fca863312a8cf10f289cf1f2 (diff)
downloadrust-f595ea25841eab1139ca10c5fe0349e51cc2b6c5.tar.gz
rust-f595ea25841eab1139ca10c5fe0349e51cc2b6c5.zip
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)
  |     ^^^
```
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions