s/eval_usize/eval_target_usize/ for clarity
This commit is contained in:
parent
c3c6d73b04
commit
936bf29d4c
48 changed files with 347 additions and 259 deletions
|
@ -284,8 +284,9 @@ pub(crate) mod rustc {
|
|||
}
|
||||
|
||||
ty::Array(ty, len) => {
|
||||
let len =
|
||||
len.try_eval_usize(tcx, ParamEnv::reveal_all()).ok_or(Err::Unspecified)?;
|
||||
let len = len
|
||||
.try_eval_target_usize(tcx, ParamEnv::reveal_all())
|
||||
.ok_or(Err::Unspecified)?;
|
||||
let elt = Tree::from_ty(*ty, tcx)?;
|
||||
Ok(std::iter::repeat(elt)
|
||||
.take(len as usize)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue