Skip to content

Commit

Permalink
Add an example for E0034
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 25, 2016
1 parent dcfb8d7 commit 311ee01
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/librustc_typeck/diagnostics.rs
Expand Up @@ -327,6 +327,30 @@ fn main() {
<Test as Trait1>::foo()
}
```
One last example:
```
trait F {
fn m(&self);
}
trait G {
fn m(&self);
}
struct X;
impl F for X { fn m(&self) { println!("I am F"); } }
impl G for X { fn m(&self) { println!("I am G"); } }
fn main() {
let f = X;
F::m(&f); // it displays "I am F"
G::m(&f); // it displays "I am G"
}
```
"##,

E0035: r##"
Expand Down

0 comments on commit 311ee01

Please sign in to comment.