Skip to content

Commit

Permalink
Update platform010 & platform010-aarch64 symlinks
Browse files Browse the repository at this point in the history
Summary:
Upgrading Rust from `1.80.1` to `1.81.0` ([release notes](https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html)) with the following changes affecting `fbsource`:
* Feature stabilizations:
  * `io_slice_advance` ([#62726](rust-lang/rust#62726))
  * `panic_info_message` ([#66745](rust-lang/rust#66745))
  * `fs_try_exists` ([#83186](rust-lang/rust#83186))
  * `lint_reasons` ([#120924](rust-lang/rust#120924))
  * `duration_abs_diff` ([#117618](rust-lang/rust#117618))
  * `effects` ([#102090](rust-lang/rust#102090))
* New `clippy` lints:
  * `manual_inspect` ([#12287](rust-lang/rust-clippy#12287))
  * `manual_pattern_char_comparison` ([#12849](rust-lang/rust-clippy#12849))
* Other:
  * `NEVER_TYPE_FALLBACK_FLOWING_INTO_UNSAFE` became a deny-by-default lint ([#126881](rust-lang/rust#126881) & [#123748](rust-lang/rust#123748))
  * Changes to `stringify!` introducing whitespaces between some tokens ([#125174](rust-lang/rust#125174))
  * `format!` is now marked with a `must_use` hint ([#127355](rust-lang/rust#127355))

ignore-conflict-markers

Reviewed By: zertosh, dtolnay

Differential Revision: D63864870

fbshipit-source-id: c8d61f3e9483ec709c8116514cfb030c883ec262
  • Loading branch information
diliop authored and facebook-github-bot committed Oct 7, 2024
1 parent 53c1895 commit 5bb1c5c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 19 deletions.
1 change: 1 addition & 0 deletions allocative/allocative/src/rc_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use std::ops::Deref;
use std::rc::Rc;

#[derive(Clone, Debug, PartialEq, Eq, Ord, PartialOrd)]
#[allow(dead_code)]
pub(crate) struct RcStr(Rc<str>);

impl<'a> From<&'a str> for RcStr {
Expand Down
2 changes: 1 addition & 1 deletion gazebo/dupe/src/__macro_refs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
use crate::Dupe;

#[inline]
pub const fn assert_dupe<T: Dupe + ?Sized>() {}
pub const fn assert_dupe<T: Dupe>() {}
1 change: 1 addition & 0 deletions starlark/src/tests/derive/freeze/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ use crate as starlark;
use crate::values::Freeze;

#[derive(Freeze)]
#[allow(dead_code)]
struct TestUnitStruct;
4 changes: 2 additions & 2 deletions starlark/src/tests/uncategorized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ fn test_fuzzer_59102() {
let res: Result<AstModule, crate::Error> =
AstModule::parse("hello_world.star", src.to_owned(), &Dialect::Standard);
// The panic actually only happens when we format the result
format!("{:?}", res);
let _unused = format!("{:?}", res);
}

#[test]
Expand All @@ -966,7 +966,7 @@ fn test_fuzzer_59371() {
let res: Result<AstModule, crate::Error> =
AstModule::parse("hello_world.star", src.to_owned(), &Dialect::Standard);
// The panic actually only happens when we format the result
format!("{:?}", res);
let _unused = format!("{:?}", res);
}

#[test]
Expand Down
7 changes: 2 additions & 5 deletions starlark/src/values/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ impl ValueError {

/// Helper to create an [`OperationNotSupported`](ValueError::OperationNotSupported) error.
#[cold]
pub fn unsupported<'v, T, V: StarlarkValue<'v> + ?Sized>(
_left: &V,
op: &str,
) -> crate::Result<T> {
pub fn unsupported<'v, T, V: StarlarkValue<'v>>(_left: &V, op: &str) -> crate::Result<T> {
Self::unsupported_owned(V::TYPE, op, None)
}

Expand All @@ -114,7 +111,7 @@ impl ValueError {

/// Helper to create an [`OperationNotSupported`](ValueError::OperationNotSupportedBinary) error.
#[cold]
pub fn unsupported_with<'v, T, V: StarlarkValue<'v> + ?Sized>(
pub fn unsupported_with<'v, T, V: StarlarkValue<'v>>(
_left: &V,
op: &str,
right: Value,
Expand Down
4 changes: 2 additions & 2 deletions starlark/src/values/layout/vtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ pub(crate) struct AValueVTable {
allocative: unsafe fn(StarlarkValueRawPtr) -> *const dyn Allocative,
}

struct GetTypeId<'v, T: StarlarkValue<'v> + ?Sized>(PhantomData<&'v T>);
struct GetTypeId<'v, T: StarlarkValue<'v>>(PhantomData<&'v T>);

impl<'v, T: StarlarkValue<'v> + ?Sized> GetTypeId<'v, T> {
impl<'v, T: StarlarkValue<'v>> GetTypeId<'v, T> {
const TYPE_ID: ConstTypeId = ConstTypeId::of::<<T as ProvidesStaticType>::StaticType>();
const STARLARK_TYPE_ID: StarlarkTypeId = StarlarkTypeId::of::<T>();
}
Expand Down
2 changes: 1 addition & 1 deletion starlark/src/values/type_repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl<T: StarlarkTypeRepr> StarlarkTypeRepr for SetType<T> {
}
}

impl<'v, T: StarlarkValue<'v> + ?Sized> StarlarkTypeRepr for T {
impl<'v, T: StarlarkValue<'v>> StarlarkTypeRepr for T {
type Canonical = Self;

fn starlark_type_repr() -> Ty {
Expand Down
2 changes: 1 addition & 1 deletion starlark/src/values/types/string/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ pub(crate) fn string_methods(builder: &mut MethodsBuilder) {
let mut s = this;
let mut lines: Vec<StringValue> = Vec::new();
loop {
if let Some(x) = s.find(|x| x == '\n' || x == '\r') {
if let Some(x) = s.find(['\n', '\r']) {
let y = x;
let x = match s.get(y..y + 2) {
Some("\r\n") => y + 2,
Expand Down
11 changes: 4 additions & 7 deletions starlark/src/values/typing/type_compiled/compiled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,10 @@ impl<'v, V: ValueLike<'v>> Hash for TypeCompiled<V> {
impl<'v, V: ValueLike<'v>> PartialEq for TypeCompiled<V> {
#[allow(clippy::manual_unwrap_or)]
fn eq(&self, other: &Self) -> bool {
match self.0.to_value().equals(other.0.to_value()) {
Ok(b) => b,
Err(_) => {
// Unreachable, but we should not panic in `PartialEq`.
false
}
}
self.0
.to_value()
.equals(other.0.to_value())
.unwrap_or_default()
}
}

Expand Down

0 comments on commit 5bb1c5c

Please sign in to comment.