]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/trait-privacy.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / trait-privacy.rs
CommitLineData
416331ca 1// build-pass (FIXME(62277): could be check-pass?)
54a0048b 2#![allow(dead_code)]
54a0048b
SL
3mod 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
13fn g() {
14 use foo::T;
15 ().f(); // Check that this does not trigger a privacy error
16}
17
18fn f() {
19 let error = ::std::thread::spawn(|| {}).join().unwrap_err();
9fa01778 20 error.type_id(); // Regression test for #21670
54a0048b
SL
21}
22
a1dfa0c6
XL
23
24fn main() {}