Review comment
This commit is contained in:
parent
82f23d56b7
commit
8bf9c18914
2 changed files with 19 additions and 20 deletions
|
@ -642,34 +642,22 @@ impl<'tcx> Cx<'tcx> {
|
|||
}
|
||||
}
|
||||
hir::InlineAsmOperand::Const { ref anon_const } => {
|
||||
let value = mir::Const::Unevaluated(
|
||||
mir::UnevaluatedConst {
|
||||
def: anon_const.def_id.to_def_id(),
|
||||
args: GenericArgs::identity_for_item(
|
||||
self.tcx,
|
||||
anon_const.def_id,
|
||||
),
|
||||
promoted: None,
|
||||
},
|
||||
tcx.type_of(anon_const.def_id).instantiate_identity(),
|
||||
let value = mir::Const::identity_unevaluated(
|
||||
tcx,
|
||||
anon_const.def_id.to_def_id(),
|
||||
)
|
||||
.instantiate_identity()
|
||||
.normalize(tcx, self.param_env);
|
||||
let span = tcx.def_span(anon_const.def_id);
|
||||
|
||||
InlineAsmOperand::Const { value, span }
|
||||
}
|
||||
hir::InlineAsmOperand::SymFn { ref anon_const } => {
|
||||
let value = mir::Const::Unevaluated(
|
||||
mir::UnevaluatedConst {
|
||||
def: anon_const.def_id.to_def_id(),
|
||||
args: GenericArgs::identity_for_item(
|
||||
self.tcx,
|
||||
anon_const.def_id,
|
||||
),
|
||||
promoted: None,
|
||||
},
|
||||
tcx.type_of(anon_const.def_id).instantiate_identity(),
|
||||
let value = mir::Const::identity_unevaluated(
|
||||
tcx,
|
||||
anon_const.def_id.to_def_id(),
|
||||
)
|
||||
.instantiate_identity()
|
||||
.normalize(tcx, self.param_env);
|
||||
let span = tcx.def_span(anon_const.def_id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue