Get rid of const eval_* and try_eval_* helpers
This commit is contained in:
@@ -346,7 +346,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
|
||||
None
|
||||
}
|
||||
}
|
||||
ty::Array(ty, len) => match len.try_eval_target_usize(cx.tcx, cx.param_env) {
|
||||
ty::Array(ty, len) => match len.try_to_target_usize(cx.tcx) {
|
||||
// If the array is empty we don't lint, to avoid false positives
|
||||
Some(0) | None => None,
|
||||
// If the array is definitely non-empty, we can do `#[must_use]` checking.
|
||||
|
||||
Reference in New Issue
Block a user