blob: 1739ab0063fa9dfa386f1048b8c17315fb572892 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#![feature(type_alias_impl_trait)]
// This test ensures that unnameable types stay unnameable
// https://github.com/rust-lang/rust/issues/63063#issuecomment-1360053614
// library
mod private {
pub struct Private;
pub trait Trait {
fn dont_define_this(_private: Private) {}
}
}
use private::Trait;
// downstream
type MyPrivate = impl Sized;
//~^ ERROR: unconstrained opaque type
impl Trait for u32 {
fn dont_define_this(_private: MyPrivate) {}
//~^ ERROR: incompatible type for trait
}
fn main() {}
|