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:
@@ -203,7 +203,7 @@ pub(crate) fn lint_nonexhaustive_missing_variants<'a, 'p, 'tcx>(
|
||||
};
|
||||
|
||||
use rustc_errors::DecorateLint;
|
||||
let mut err = rcx.tcx.sess.struct_span_warn(*arm.pat.data().unwrap(), "");
|
||||
let mut err = rcx.tcx.dcx().struct_span_warn(*arm.pat.data().unwrap(), "");
|
||||
err.set_primary_message(decorator.msg());
|
||||
decorator.decorate_lint(&mut err);
|
||||
err.emit();
|
||||
|
||||
Reference in New Issue
Block a user