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
|
@ -231,7 +231,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
// Arrays give us `[]`, `[{ty}; _]` and `[{ty}; N]`
|
||||
if let ty::Array(aty, len) = self_ty.kind() {
|
||||
flags.push((sym::_Self, Some("[]".to_string())));
|
||||
let len = len.try_to_valtree().and_then(|v| v.try_to_target_usize(self.tcx));
|
||||
let len = len.try_to_target_usize(self.tcx);
|
||||
flags.push((sym::_Self, Some(format!("[{aty}; _]"))));
|
||||
if let Some(n) = len {
|
||||
flags.push((sym::_Self, Some(format!("[{aty}; {n}]"))));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue