提交 c6848141 编写于 作者: E Eduard-Mihai Burtescu

rustc: don't support missing TLS TyCtxt in ty::print.

上级 852fc6d2
......@@ -33,10 +33,9 @@ pub struct PrintContext {
impl PrintContext {
pub(crate) fn new() -> Self {
ty::tls::with_opt(|tcx| {
let (is_verbose, identify_regions) = tcx.map(
|tcx| (tcx.sess.verbose(), tcx.sess.opts.debugging_opts.identify_regions)
).unwrap_or((false, false));
ty::tls::with(|tcx| {
let (is_verbose, identify_regions) =
(tcx.sess.verbose(), tcx.sess.opts.debugging_opts.identify_regions);
PrintContext {
is_debug: false,
is_verbose: is_verbose,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册