-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't codegen impossible to satisfy impls
- Loading branch information
1 parent
f1b1ed7
commit b36bbb0
Showing
2 changed files
with
28 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// compile-flags: -Clink-dead-code=on --crate-type=lib | ||
// build-pass | ||
|
||
// Make sure that we don't monomorphize the impossible method `<() as Visit>::visit`, | ||
// which does not hold under a reveal-all param env. | ||
|
||
pub trait Visit { | ||
fn visit() {} | ||
} | ||
|
||
pub trait Array<'a> {} | ||
|
||
impl Visit for () where (): for<'a> Array<'a> {} |