Skip to content

Commit b06a1cc

Browse files
committed
Add regression test
1 parent 2998564 commit b06a1cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/compile-fail/trait-privacy.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(rustc_attrs)]
11+
#![feature(rustc_attrs, get_type_id)]
1212
#![allow(dead_code)]
1313

1414
mod foo {
@@ -26,5 +26,10 @@ fn g() {
2626
().f(); // Check that this does not trigger a privacy error
2727
}
2828

29+
fn f() {
30+
let error = ::std::thread::spawn(|| {}).join().unwrap_err();
31+
error.get_type_id(); // Regression test for #21670
32+
}
33+
2934
#[rustc_error]
3035
fn main() {} //~ ERROR compilation successful

0 commit comments

Comments
 (0)