code review fixes
This commit is contained in:
parent
9f8b099846
commit
5bb06b3acb
1 changed files with 1 additions and 1 deletions
|
@ -697,7 +697,7 @@ pub fn const_eval_raw_provider<'tcx>(
|
||||||
// promoting runtime code is only allowed to error if it references broken constants
|
// promoting runtime code is only allowed to error if it references broken constants
|
||||||
// any other kind of error will be reported to the user as a deny-by-default lint
|
// any other kind of error will be reported to the user as a deny-by-default lint
|
||||||
_ => if let Some(p) = cid.promoted {
|
_ => if let Some(p) = cid.promoted {
|
||||||
use crate::interpret::InvalidProgramInfo::*;
|
use crate::interpret::InvalidProgramInfo::ReferencedConstant;
|
||||||
let span = tcx.promoted_mir(def_id)[p].span;
|
let span = tcx.promoted_mir(def_id)[p].span;
|
||||||
if let InterpError::InvalidProgram(ReferencedConstant) = err.error {
|
if let InterpError::InvalidProgram(ReferencedConstant) = err.error {
|
||||||
err.report_as_error(
|
err.report_as_error(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue