blob: 778ddf0f81763e02f4270a3736c4475727e919b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// provide custom privacy error for sealed traits
pub mod a {
pub trait Sealed: self::b::Hidden {
fn foo() {}
}
struct X;
impl Sealed for X {}
impl self::b::Hidden for X {}
mod b {
pub trait Hidden {}
}
}
struct S;
impl a::Sealed for S {} //~ ERROR the trait bound `S: Hidden` is not satisfied
fn main() {}
|