Files
rust/tests/ui/codegen/mono-item-collector-default-impl-58375.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
519 B
Rust
Raw Normal View History

2025-08-20 14:02:50 -04:00
// https://github.com/rust-lang/rust/issues/58375
// 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
2019-07-19 14:03:22 +03:00
//@ build-pass
//@ 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;
}
2019-07-19 14:03:22 +03:00
impl Arbitrary for DecodeUtf16<<u8 as A>::Item> {}