-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize type parameters in create_mono_items_for_default_impls.
- Loading branch information
1 parent
83e4eed
commit a907b7c
Showing
2 changed files
with
29 additions
and
1 deletion.
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
23 changes: 23 additions & 0 deletions
23
src/test/run-pass/issue-58375-monomorphize-default-impls.rs
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,23 @@ | ||
// Make sure that the mono-item collector does not crash when trying to | ||
// instantiate a default impl for DecodeUtf16<<u8 as A>::Item> | ||
// See https://github.com/rust-lang/rust/issues/58375 | ||
// compile-flags:-C link-dead-code | ||
|
||
#![crate_type = "rlib"] | ||
|
||
pub struct DecodeUtf16<I>(I); | ||
|
||
pub trait Arbitrary { | ||
fn arbitrary() {} | ||
} | ||
|
||
pub trait A { | ||
type Item; | ||
} | ||
|
||
impl A for u8 { | ||
type Item = char; | ||
} | ||
|
||
impl Arbitrary for DecodeUtf16<<u8 as A>::Item> { | ||
} |