Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect trait privacy error #32073

Merged
merged 4 commits into from
Mar 9, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add regression test
  • Loading branch information
jseyfried committed Mar 6, 2016
commit b06a1cc760cfb09e4eeae6d40244be9fcf048d8a
7 changes: 6 additions & 1 deletion src/test/compile-fail/trait-privacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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