1
Fork 0

allow referencing impl substs from rustc_on_unimplemented

This commit is contained in:
Michael Goulet 2022-03-06 19:51:30 -08:00
parent e9ddb8f8fb
commit b726bfb569
5 changed files with 59 additions and 28 deletions

View file

@ -0,0 +1,15 @@
#![feature(rustc_attrs)]
trait Foo<A> {
fn foo(self);
}
#[rustc_on_unimplemented = "an impl did not match: {A} {B} {C}"]
impl<A, B, C> Foo<A> for (A, B, C) {
fn foo(self) {}
}
fn main() {
Foo::<usize>::foo((1i32, 1i32, 1i32));
//~^ ERROR the trait bound `(i32, i32, i32): Foo<usize>` is not satisfied
}