]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-58375-monomorphize-default-impls.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-58375-monomorphize-default-impls.rs
1 // Make sure that the mono-item collector does not crash when trying to
2 // instantiate a default impl for DecodeUtf16<<u8 as A>::Item>
3 // See https://github.com/rust-lang/rust/issues/58375
4
5 // build-pass
6 // compile-flags:-C link-dead-code
7
8 #![crate_type = "rlib"]
9
10 pub struct DecodeUtf16<I>(I);
11
12 pub trait Arbitrary {
13     fn arbitrary() {}
14 }
15
16 pub trait A {
17     type Item;
18 }
19
20 impl A for u8 {
21     type Item = char;
22 }
23
24 impl Arbitrary for DecodeUtf16<<u8 as A>::Item> {}