const-eval: make lint scope computation consistent
This commit is contained in:
parent
b316033dd8
commit
54e24c1573
4 changed files with 25 additions and 30 deletions
|
@ -114,7 +114,7 @@ fn eval_body_using_ecx<'tcx, R: InterpretationResult<'tcx>>(
|
|||
let err_diag = errors::MutablePtrInFinal { span: ecx.tcx.span, kind: intern_kind };
|
||||
ecx.tcx.emit_node_span_lint(
|
||||
lint::builtin::CONST_EVAL_MUTABLE_PTR_IN_FINAL_VALUE,
|
||||
ecx.best_lint_scope(),
|
||||
ecx.machine.best_lint_scope(*ecx.tcx),
|
||||
err_diag.span,
|
||||
err_diag,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue