Avoid various uses of Option<Span>
in favor of using DUMMY_SP
in the few cases that used None
This commit is contained in:
parent
a42873e85b
commit
adda9da604
34 changed files with 70 additions and 75 deletions
|
@ -56,7 +56,7 @@ impl<'tcx> MutVisitor<'tcx> for BodyBuilder<'tcx> {
|
|||
|
||||
fn visit_constant(&mut self, constant: &mut mir::ConstOperand<'tcx>, location: mir::Location) {
|
||||
let const_ = self.monomorphize(constant.const_);
|
||||
let val = match const_.eval(self.tcx, ty::ParamEnv::reveal_all(), Some(constant.span)) {
|
||||
let val = match const_.eval(self.tcx, ty::ParamEnv::reveal_all(), constant.span) {
|
||||
Ok(v) => v,
|
||||
Err(mir::interpret::ErrorHandled::Reported(..)) => return,
|
||||
Err(mir::interpret::ErrorHandled::TooGeneric(..)) => {
|
||||
|
|
|
@ -566,7 +566,7 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
|
|||
let result = tcx.const_eval_instance(
|
||||
ParamEnv::reveal_all(),
|
||||
instance,
|
||||
Some(tcx.def_span(instance.def_id())),
|
||||
tcx.def_span(instance.def_id()),
|
||||
);
|
||||
result
|
||||
.map(|const_val| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue