]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/privacy.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / traits / privacy.rs
1 // build-pass (FIXME(62277): could be check-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() {}