-
Notifications
You must be signed in to change notification settings - Fork 14.1k
rustc_on_unimplemented supports referring to trait
#43000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
|
Originally found that this would be a nice addition when working on #43001, to make sure that the path of the trait is always correct on the error message. |
|
1eb6669 to
a43654c
Compare
|
@estebank looks like the tidy failure is still waiting on you? Might be worth getting it fixed before review in case it reveals any other test failures. |
|
Oh wait, you just pushed a change :) |
|
Some other test failures have been revealed |
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`
```
a43654c to
05d3526
Compare
|
r? @aturon |
|
r? @arielb1 I'll try to review this later today. |
|
I don't think |
|
LGTM @bors r+ |
|
📌 Commit 05d3526 has been approved by |
|
@bors rollup |
…rielb1
`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`
```
Add support to
rustc_on_unimplementedto reference the full path ofthe annotated trait. For the following code:
the error message will be: