removes unnecessary tidy ignore
This commit is contained in:
parent
15e81beb47
commit
cf398a33eb
@ -2,8 +2,6 @@
|
|||||||
//!
|
//!
|
||||||
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/index.html
|
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/index.html
|
||||||
|
|
||||||
// ignore-tidy-filelength
|
|
||||||
|
|
||||||
use crate::mir::interpret::{GlobalAlloc, Scalar};
|
use crate::mir::interpret::{GlobalAlloc, Scalar};
|
||||||
use crate::mir::visit::MirVisitable;
|
use crate::mir::visit::MirVisitable;
|
||||||
use crate::ty::adjustment::PointerCast;
|
use crate::ty::adjustment::PointerCast;
|
||||||
@ -299,11 +297,7 @@ impl<'tcx> Body<'tcx> {
|
|||||||
pub fn temps_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a {
|
pub fn temps_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a {
|
||||||
(self.arg_count + 1..self.local_decls.len()).filter_map(move |index| {
|
(self.arg_count + 1..self.local_decls.len()).filter_map(move |index| {
|
||||||
let local = Local::new(index);
|
let local = Local::new(index);
|
||||||
if self.local_decls[local].is_user_variable() {
|
if self.local_decls[local].is_user_variable() { None } else { Some(local) }
|
||||||
None
|
|
||||||
} else {
|
|
||||||
Some(local)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1190,11 +1184,7 @@ impl<'tcx> BasicBlockData<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn visitable(&self, index: usize) -> &dyn MirVisitable<'tcx> {
|
pub fn visitable(&self, index: usize) -> &dyn MirVisitable<'tcx> {
|
||||||
if index < self.statements.len() {
|
if index < self.statements.len() { &self.statements[index] } else { &self.terminator }
|
||||||
&self.statements[index]
|
|
||||||
} else {
|
|
||||||
&self.terminator
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user