Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b621c9b

Browse files
committedFeb 22, 2025·
Fix binding mode problems
1 parent e1819a8 commit b621c9b

File tree

67 files changed

+153
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+153
-180
lines changed
 

‎compiler/rustc_abi/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -329,19 +329,19 @@ impl TargetDataLayout {
329329
[p] if p.starts_with('P') => {
330330
dl.instruction_address_space = parse_address_space(&p[1..], "P")?
331331
}
332-
["a", ref a @ ..] => dl.aggregate_align = parse_align(a, "a")?,
333-
["f16", ref a @ ..] => dl.f16_align = parse_align(a, "f16")?,
334-
["f32", ref a @ ..] => dl.f32_align = parse_align(a, "f32")?,
335-
["f64", ref a @ ..] => dl.f64_align = parse_align(a, "f64")?,
336-
["f128", ref a @ ..] => dl.f128_align = parse_align(a, "f128")?,
332+
["a", a @ ..] => dl.aggregate_align = parse_align(a, "a")?,
333+
["f16", a @ ..] => dl.f16_align = parse_align(a, "f16")?,
334+
["f32", a @ ..] => dl.f32_align = parse_align(a, "f32")?,
335+
["f64", a @ ..] => dl.f64_align = parse_align(a, "f64")?,
336+
["f128", a @ ..] => dl.f128_align = parse_align(a, "f128")?,
337337
// FIXME(erikdesjardins): we should be parsing nonzero address spaces
338338
// this will require replacing TargetDataLayout::{pointer_size,pointer_align}
339339
// with e.g. `fn pointer_size_in(AddressSpace)`
340-
[p @ "p", s, ref a @ ..] | [p @ "p0", s, ref a @ ..] => {
340+
[p @ "p", s, a @ ..] | [p @ "p0", s, a @ ..] => {
341341
dl.pointer_size = parse_size(s, p)?;
342342
dl.pointer_align = parse_align(a, p)?;
343343
}
344-
[s, ref a @ ..] if s.starts_with('i') => {
344+
[s, a @ ..] if s.starts_with('i') => {
345345
let Ok(bits) = s[1..].parse::<u64>() else {
346346
parse_size(&s[1..], "i")?; // For the user error.
347347
continue;
@@ -362,7 +362,7 @@ impl TargetDataLayout {
362362
dl.i128_align = a;
363363
}
364364
}
365-
[s, ref a @ ..] if s.starts_with('v') => {
365+
[s, a @ ..] if s.starts_with('v') => {
366366
let v_size = parse_size(&s[1..], "v")?;
367367
let a = parse_align(a, s)?;
368368
if let Some(v) = dl.vector_align.iter_mut().find(|v| v.0 == v_size) {
@@ -1802,7 +1802,7 @@ where
18021802
variants,
18031803
max_repr_align,
18041804
unadjusted_abi_align,
1805-
ref randomization_seed,
1805+
randomization_seed,
18061806
} = self;
18071807
f.debug_struct("Layout")
18081808
.field("size", size)

‎compiler/rustc_ast/src/visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ pub fn walk_use_tree<'a, V: Visitor<'a>>(
597597
visit_opt!(visitor, visit_ident, rename);
598598
}
599599
UseTreeKind::Glob => {}
600-
UseTreeKind::Nested { ref items, span: _ } => {
600+
UseTreeKind::Nested { items, span: _ } => {
601601
for &(ref nested_tree, nested_id) in items {
602602
try_visit!(visitor.visit_use_tree(nested_tree, nested_id, true));
603603
}

0 commit comments

Comments
 (0)
Please sign in to comment.