]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/trait-privacy.rs
New upstream version 1.34.2+dfsg1
[rustc.git] / src / test / ui / traits / trait-privacy.rs
1 // compile-pass
2 #![allow(dead_code)]
3 mod foo {
4 pub use self::bar::T;
5 mod bar {
6 pub trait T {
7 fn f(&self) {}
8 }
9 impl T for () {}
10 }
11 }
12
13 fn g() {
14 use foo::T;
15 ().f(); // Check that this does not trigger a privacy error
16 }
17
18 fn f() {
19 let error = ::std::thread::spawn(|| {}).join().unwrap_err();
20 error.type_id(); // Regression test for #21670
21 }
22
23
24 fn main() {}