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
870a5d957b
commit
620a1e4c2f
4 changed files with 15 additions and 15 deletions
|
|
@ -153,7 +153,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingConstForFn {
|
|||
|
||||
if let Err((span, err)) = is_min_const_fn(cx.tcx, mir, &self.msrv) {
|
||||
if cx.tcx.is_const_fn_raw(def_id.to_def_id()) {
|
||||
cx.tcx.sess.span_err(span, err);
|
||||
cx.tcx.dcx().span_err(span, err);
|
||||
}
|
||||
} else {
|
||||
span_lint(cx, MISSING_CONST_FOR_FN, span, "this could be a `const fn`");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue