Get rid of const eval_* and try_eval_* helpers
This commit is contained in:
parent
a2a1206811
commit
e83e4e8112
31 changed files with 119 additions and 172 deletions
|
@ -85,7 +85,6 @@ mod rustc {
|
|||
use rustc_macros::TypeVisitable;
|
||||
use rustc_middle::traits::ObligationCause;
|
||||
use rustc_middle::ty::{Const, ParamEnv, Ty, TyCtxt, ValTree};
|
||||
use rustc_span::DUMMY_SP;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
@ -134,7 +133,7 @@ mod rustc {
|
|||
use rustc_middle::ty::ScalarInt;
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
let Ok((ty, cv)) = c.eval(tcx, param_env, DUMMY_SP) else {
|
||||
let Some((cv, ty)) = c.try_to_valtree() else {
|
||||
return Some(Self {
|
||||
alignment: true,
|
||||
lifetimes: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue