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
|
@ -1201,7 +1201,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
}
|
||||
};
|
||||
self.report_error(span, error);
|
||||
self.tcx.sess.span_delayed_bug(span, CG_BUG_STR);
|
||||
self.dcx().span_delayed_bug(span, CG_BUG_STR);
|
||||
}
|
||||
|
||||
return Res::Err;
|
||||
|
@ -1496,7 +1496,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
record_segment_res(self, res);
|
||||
} else if res == Res::ToolMod && !is_last && opt_ns.is_some() {
|
||||
if binding.is_import() {
|
||||
self.tcx.sess.emit_err(errors::ToolModuleImported {
|
||||
self.dcx().emit_err(errors::ToolModuleImported {
|
||||
span: ident.span,
|
||||
import: binding.span,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue