rust/src/test/ui/on-unimplemented/on-impl.stderr
Esteban Küber 05d3526132 rustc_on_unimplemented supports referring to trait
Add support to `rustc_on_unimplemented` to reference the full path of
the annotated trait. For the following code:

```rust
pub mod Bar {
    #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}` in `{Foo}`"]
    pub trait Foo<Bar, Baz, Quux> {}
}
```

the error message will be:

```
test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo`
```
2017-07-05 16:46:59 -07:00

20 lines
706 B
Plaintext

error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
--> $DIR/on-impl.rs:32:5
|
32 | Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32);
| ^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice
|
= help: the trait `Index<u32>` is not implemented for `[i32]`
= note: required by `Index::index`
error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
--> $DIR/on-impl.rs:32:5
|
32 | Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice
|
= help: the trait `Index<u32>` is not implemented for `[i32]`
error: aborting due to 2 previous errors