Skip to content

Commit c40411c

Browse files
committed
rustc: don't support missing TLS TyCtxt in ty::print.
1 parent 4cdc441 commit c40411c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustc/ty/print.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ pub struct PrintContext {
3333

3434
impl PrintContext {
3535
pub(crate) fn new() -> Self {
36-
ty::tls::with_opt(|tcx| {
37-
let (is_verbose, identify_regions) = tcx.map(
38-
|tcx| (tcx.sess.verbose(), tcx.sess.opts.debugging_opts.identify_regions)
39-
).unwrap_or((false, false));
36+
ty::tls::with(|tcx| {
37+
let (is_verbose, identify_regions) =
38+
(tcx.sess.verbose(), tcx.sess.opts.debugging_opts.identify_regions);
4039
PrintContext {
4140
is_debug: false,
4241
is_verbose: is_verbose,

0 commit comments

Comments
 (0)