-
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.
Rollup merge of #109110 - compiler-errors:impossible-impl-mono, r=jac…
…kh726 Don't codegen impossible to satisfy impls Fixes #109098
- Loading branch information
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> {} |