Remove Session
methods that duplicate DiagCtxt
methods.
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
This commit is contained in:
parent
d51db05d7e
commit
99472c7049
298 changed files with 1806 additions and 2064 deletions
|
@ -1079,7 +1079,7 @@ where
|
|||
(span1, span2) => span1.or(span2),
|
||||
};
|
||||
|
||||
tcx.sess.emit_fatal(SymbolAlreadyDefined { span, symbol: sym1.to_string() });
|
||||
tcx.dcx().emit_fatal(SymbolAlreadyDefined { span, symbol: sym1.to_string() });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1093,7 +1093,7 @@ fn collect_and_partition_mono_items(tcx: TyCtxt<'_>, (): ()) -> (&DefIdSet, &[Co
|
|||
MonoItemCollectionMode::Eager
|
||||
} else {
|
||||
if mode != "lazy" {
|
||||
tcx.sess.emit_warning(UnknownCguCollectionMode { mode });
|
||||
tcx.dcx().emit_warning(UnknownCguCollectionMode { mode });
|
||||
}
|
||||
|
||||
MonoItemCollectionMode::Lazy
|
||||
|
@ -1148,7 +1148,7 @@ fn collect_and_partition_mono_items(tcx: TyCtxt<'_>, (): ()) -> (&DefIdSet, &[Co
|
|||
if let Err(err) =
|
||||
dump_mono_items_stats(tcx, codegen_units, path, tcx.crate_name(LOCAL_CRATE))
|
||||
{
|
||||
tcx.sess.emit_fatal(CouldntDumpMonoStats { error: err.to_string() });
|
||||
tcx.dcx().emit_fatal(CouldntDumpMonoStats { error: err.to_string() });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue