-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow referencing impl substs from rustc_on_unimplemented
- Loading branch information
1 parent
e9ddb8f
commit b726bfb
Showing
5 changed files
with
59 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error[E0277]: the trait bound `(i32, i32, i32): Foo<usize>` is not satisfied | ||
--> $DIR/impl-substs.rs:13:23 | ||
| | ||
LL | Foo::<usize>::foo((1i32, 1i32, 1i32)); | ||
| ----------------- ^^^^^^^^^^^^^^^^^^ an impl did not match: usize _ _ | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
= help: the trait `Foo<usize>` is not implemented for `(i32, i32, i32)` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |