use GlobalId in eval_to_valtree query and introduce query for valtree_to_const_val

This commit is contained in:
b-naber
2022-04-12 18:14:28 +02:00
parent 56d540e057
commit 96b36d6eb2
27 changed files with 541 additions and 245 deletions

View File

@@ -3,7 +3,6 @@
use crate::build::Builder;
use rustc_middle::mir;
use rustc_middle::mir::*;
use rustc_middle::ty::{self, Ty};
use rustc_span::{Span, DUMMY_SP};
@@ -26,11 +25,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
/// Convenience function for creating a literal operand, one
/// without any user type annotation.
crate fn literal_operand(
&mut self,
span: Span,
literal: mir::ConstantKind<'tcx>,
) -> Operand<'tcx> {
crate fn literal_operand(&mut self, span: Span, literal: ConstantKind<'tcx>) -> Operand<'tcx> {
let constant = Box::new(Constant { span, user_ty: None, literal });
Operand::Constant(constant)
}