Skip to content

Commit 19c7453

Browse files
diliopfacebook-github-bot
authored andcommitted
Update platform010 & platform010-aarch64 symlinks
Summary: Release notes: https://blog.rust-lang.org/2025/05/15/Rust-1.87.0/ Relevant changes: * `feature(extract_if)` stabilized * `feature(ptr_sub_ptr)` stabilized * `feature(os_str_display)` stabilized * `feature(slice_take)` stabilized * `feature(hash_raw_entry)` removed * `sub_ptr` renamed to `offset_from_unsigned` ([#137483](rust-lang/rust#137483)) * `MaybeUninit::uninit_array()` uses replaced with inline const blocks ([#125082](rust-lang/rust#125082)) * Lint `#[must_use`] attributes applied to methods in trait impls ([#136923](rust-lang/rust#136923)) * `clippy` lints: `io_other_error`, `elidable_lifetime_names`, `mem_replace_option_with_some`, `manual_contains`, `owned_cow` Reviewed By: dtolnay Differential Revision: D75010345 fbshipit-source-id: ab6ee65fe82eb7fe90b5aa9bbeeedefed2befad1
1 parent 0f3af3b commit 19c7453

File tree

9 files changed

+16
-9
lines changed

9 files changed

+16
-9
lines changed

allocative/allocative/src/flamegraph.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ impl VisitorImpl for FlameGraphBuilder {
451451
self.current().current_data().unique = true;
452452
}
453453

454-
#[must_use]
455454
fn enter_shared_impl(
456455
&mut self,
457456
name: Key,

starlark/src/collections/alloca.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl Alloca {
171171
// If the pointer changed, it means a callback called alloca again,
172172
// which allocated a new buffer. So we are abandoning the current allocation here,
173173
// and new allocations will use the new buffer even if the current buffer has space.
174-
if likely(self.alloc.get() == stop) {
174+
if likely(std::ptr::eq(self.alloc.get(), stop)) {
175175
self.alloc.set(old);
176176
}
177177

starlark/src/docs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ pub struct DocProperty {
200200
}
201201

202202
/// A named member of an object.
203+
#[allow(clippy::large_enum_variant)]
203204
#[derive(Debug, Clone, PartialEq, Allocative)]
204205
pub enum DocMember {
205206
Property(DocProperty),

starlark/src/eval/compiler/expr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,7 @@ pub(crate) enum EvalError {
10251025

10261026
/// Try fold expression `cmp(l == r)` into `cmp(type(x) == "y")`.
10271027
/// Return original `l` and `r` arguments if fold was unsuccessful.
1028+
#[allow(clippy::result_large_err)]
10281029
fn try_eval_type_is(
10291030
l: IrSpanned<ExprCompiled>,
10301031
r: IrSpanned<ExprCompiled>,

starlark/src/eval/compiler/scope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ impl<'f> Binding<'f> {
11251125

11261126
/// Initialize the slot during analysis.
11271127
pub(crate) fn init_slot(&mut self, slot: Slot, codemap: &CodeMap) -> Result<(), InternalError> {
1128-
match mem::replace(&mut self.slot, Some(slot)) {
1128+
match self.slot.replace(slot) {
11291129
Some(_) => Err(InternalError::msg(
11301130
"slot is already assigned",
11311131
self.span(),

starlark/src/values/layout/heap/allocator/alloc/per_thread.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,13 @@ mod tests {
144144
let b = allocator
145145
.fetch(AlignedSize::new_bytes(3 * AValueHeader::ALIGN))
146146
.unwrap();
147-
assert!(old_a_ptr == a.begin().as_ptr() || old_a_ptr == b.begin().as_ptr());
148-
assert!(old_b_ptr == a.begin().as_ptr() || old_b_ptr == b.begin().as_ptr());
147+
assert!(
148+
std::ptr::eq(old_a_ptr, a.begin().as_ptr())
149+
|| std::ptr::eq(old_a_ptr, b.begin().as_ptr())
150+
);
151+
assert!(
152+
std::ptr::eq(old_b_ptr, a.begin().as_ptr())
153+
|| std::ptr::eq(old_b_ptr, b.begin().as_ptr())
154+
);
149155
}
150156
}

starlark/src/values/layout/heap/heap_type.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -993,12 +993,10 @@ impl<'v> Tracer<'v> {
993993
let old_val = value.0.unpack_ptr().unwrap();
994994

995995
// Case 2: We have already been replaced with a forwarding, or need to freeze
996-
let res = match old_val.unpack() {
996+
match old_val.unpack() {
997997
AValueOrForwardUnpack::Forward(x) => unsafe { x.forward_ptr().unpack_unfrozen_value() },
998998
AValueOrForwardUnpack::Header(v) => unsafe { v.unpack().heap_copy(self) },
999-
};
1000-
1001-
res
999+
}
10021000
}
10031001
}
10041002

starlark_derive/src/module/render/fun.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ fn render_native_callable_components(
638638
))
639639
}
640640

641+
#[allow(clippy::large_enum_variant)]
641642
enum SignatureRegularArgMode {
642643
Required,
643644
Optional,

starlark_derive/src/module/typ.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ pub(crate) struct StarArguments {
194194
}
195195

196196
/// How we handle `&Arguments`.
197+
#[allow(clippy::large_enum_variant)]
197198
#[derive(Debug)]
198199
pub(crate) enum RegularParams {
199200
/// Pass `&Arguments` as is.

0 commit comments

Comments
 (0)