Skip to content

Commit 3abb03f

Browse files
authored
Rollup merge of rust-lang#58138 - ishitatsuyuki:stability-delay, r=estebank
Fix rust-lang#58101
2 parents a35dac2 + 652f2c7 commit 3abb03f

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/librustc/middle/stability.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,9 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
765765
}
766766
}
767767
EvalResult::Unmarked => {
768-
span_bug!(span, "encountered unmarked API: {:?}", def_id);
768+
// The API could be uncallable for other reasons, for example when a private module
769+
// was referenced.
770+
self.sess.delay_span_bug(span, &format!("encountered unmarked API: {:?}", def_id));
769771
}
770772
}
771773
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
let _ = std::thread::thread_info::current_thread();
3+
//~^ERROR module `thread_info` is private
4+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0603]: module `thread_info` is private
2+
--> $DIR/stability-in-private-module.rs:2:26
3+
|
4+
LL | let _ = std::thread::thread_info::current_thread();
5+
| ^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0603`.

0 commit comments

Comments
 (0)