rust/src/librustc_typeck
bors c8af93f090 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.
2017-01-18 04:45:25 +00:00
..
check Auto merge of #38168 - estebank:help-E0034, r=nrc 2017-01-18 04:45:25 +00:00
coherence rustc: keep track of tables everywhere as if they were per-body. 2017-01-06 22:23:29 +02:00
variance rustc: separate TraitItem from their parent Item, just like ImplItem. 2016-12-28 11:21:45 +02:00
astconv.rs Rename ObjectSum into TraitObject in AST/HIR 2017-01-17 10:41:44 +03:00
Cargo.toml move the impl-params-constrained check out of collect 2016-11-16 13:57:46 -05:00
check_unused.rs rustc: separate TraitItem from their parent Item, just like ImplItem. 2016-12-28 11:21:45 +02:00
collect.rs rustc: keep track of tables everywhere as if they were per-body. 2017-01-06 22:23:29 +02:00
constrained_type_params.rs move the impl-params-constrained check out of collect 2016-11-16 13:57:46 -05:00
diagnostics.rs AST/HIR: Merge ObjectSum and PolyTraitRef 2017-01-17 01:52:47 +03:00
impl_wf_check.rs rustc: separate TraitItem from their parent Item, just like ImplItem. 2016-12-28 11:21:45 +02:00
lib.rs Auto merge of #38813 - eddyb:lazy-11, r=nikomatsakis 2017-01-08 11:36:52 +00:00
rscope.rs rustc: move function arguments into hir::Body. 2016-12-28 11:29:19 +02:00