diff options
| author | bors <bors@rust-lang.org> | 2016-03-09 07:14:05 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-03-09 07:14:05 -0800 |
| commit | ef3d0516303f82ebfbcc4c250ebfc783aaadad72 (patch) | |
| tree | 876c8b3173020b881509d514d2d70ff2fb0ef434 /src/test | |
| parent | cbbd3d9b927e4dc73b071e7bce70e1a3fc119946 (diff) | |
| parent | b06a1cc760cfb09e4eeae6d40244be9fcf048d8a (diff) | |
| download | rust-ef3d0516303f82ebfbcc4c250ebfc783aaadad72.tar.gz rust-ef3d0516303f82ebfbcc4c250ebfc783aaadad72.zip | |
Auto merge of #32073 - jseyfried:fix_another_trait_privacy_error, r=nikomatsakis
Fix incorrect trait privacy error This PR fixes #21670 by using the crate metadata instead of `ExternalExports` to determine if an external item is public. r? @nikomatsakis
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/trait-privacy.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/compile-fail/trait-privacy.rs b/src/test/compile-fail/trait-privacy.rs index a0d0014a064..5f9e8ba6c0a 100644 --- a/src/test/compile-fail/trait-privacy.rs +++ b/src/test/compile-fail/trait-privacy.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +#![feature(rustc_attrs, get_type_id)] #![allow(dead_code)] mod foo { @@ -26,5 +26,10 @@ fn g() { ().f(); // Check that this does not trigger a privacy error } +fn f() { + let error = ::std::thread::spawn(|| {}).join().unwrap_err(); + error.get_type_id(); // Regression test for #21670 +} + #[rustc_error] fn main() {} //~ ERROR compilation successful |
