mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 11:12:43 +00:00
add #[rustc_pass_by_value]
to more types
This commit is contained in:
parent
d3bc1297db
commit
a4d6c61bdc
@ -543,10 +543,10 @@ impl<'a, 'tcx> PossibleBorrowerVisitor<'a, 'tcx> {
|
||||
continue;
|
||||
}
|
||||
|
||||
let borrowers = self.possible_borrower.reachable_from(&row);
|
||||
let borrowers = self.possible_borrower.reachable_from(row);
|
||||
if !borrowers.is_empty() {
|
||||
let mut bs = HybridBitSet::new_empty(self.body.local_decls.len());
|
||||
for &c in borrowers {
|
||||
for c in borrowers {
|
||||
if c != mir::Local::from_usize(0) {
|
||||
bs.insert(c);
|
||||
}
|
||||
@ -663,10 +663,10 @@ impl<'a, 'tcx> PossibleOriginVisitor<'a, 'tcx> {
|
||||
continue;
|
||||
}
|
||||
|
||||
let borrowers = self.possible_origin.reachable_from(&row);
|
||||
let borrowers = self.possible_origin.reachable_from(row);
|
||||
if !borrowers.is_empty() {
|
||||
let mut bs = HybridBitSet::new_empty(self.body.local_decls.len());
|
||||
for &c in borrowers {
|
||||
for c in borrowers {
|
||||
if c != mir::Local::from_usize(0) {
|
||||
bs.insert(c);
|
||||
}
|
||||
|
@ -489,7 +489,8 @@ pub fn def_path_res(cx: &LateContext<'_>, path: &[&str]) -> Res {
|
||||
fn find_crate(tcx: TyCtxt<'_>, name: &str) -> Option<DefId> {
|
||||
tcx.crates(())
|
||||
.iter()
|
||||
.find(|&&num| tcx.crate_name(num).as_str() == name)
|
||||
.copied()
|
||||
.find(|&num| tcx.crate_name(num).as_str() == name)
|
||||
.map(CrateNum::as_def_id)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user