Skip to content

Commit

Permalink
Revert D65324129: update platform010 & platform010-aarch64 symlinks
Browse files Browse the repository at this point in the history
Differential Revision:
D65324129

Original commit changeset: 8266029f01dc

Original Phabricator Diff: D65324129

fbshipit-source-id: b4f909750fa65b4f549a2d638743896c28e988e4
  • Loading branch information
capickett authored and facebook-github-bot committed Nov 14, 2024
1 parent f0f4412 commit 221f90b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 21 deletions.
24 changes: 12 additions & 12 deletions gazebo/gazebo/src/ext/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait StrExt {
#[cfg(feature = "str_pattern_extensions")]
fn split1<'a, P>(&'a self, pat: P) -> (&'a Self, &'a Self)
where
P: Pattern;
P: Pattern<'a>;

/// Like `split`, but only separates off the first element if there is a
/// separator, otherwise returns `None`. For example:
Expand All @@ -48,7 +48,7 @@ pub trait StrExt {
#[deprecated(since = "0.6.1", note = "use `split_once` available in `std`")]
fn split1_opt<'a, P>(&'a self, pat: P) -> Option<(&'a Self, &'a Self)>
where
P: Pattern;
P: Pattern<'a>;

/// Trim off the first match, or return the string unchanged if the pattern
/// is not a prefix of the string. Like 'trim_start_matches', but at
Expand All @@ -63,7 +63,7 @@ pub trait StrExt {
#[cfg(feature = "str_pattern_extensions")]
fn trim_start_match<'a, P>(&'a self, pat: P) -> &'a Self
where
P: Pattern;
P: Pattern<'a>;

/// Trim off the first match and return 'Some', or return 'None' if the
/// pattern is not a prefix of the string. Like 'trim_start_matches'.
Expand All @@ -79,7 +79,7 @@ pub trait StrExt {
#[deprecated(note = "Use str.strip_prefix instead")]
fn trim_start_match_opt<'a, P>(&'a self, pat: P) -> Option<&'a Self>
where
P: Pattern;
P: Pattern<'a>;

/// Trim off the first match, or return the string unchanged if the pattern
/// is not a prefix of the string. Like 'trim_start_matches', but at
Expand All @@ -94,7 +94,7 @@ pub trait StrExt {
#[cfg(feature = "str_pattern_extensions")]
fn trim_end_match<'a, P>(&'a self, pat: P) -> &'a Self
where
P: Pattern<Searcher<'a>: ReverseSearcher<'a>>;
P: Pattern<'a, Searcher: ReverseSearcher<'a>>;

/// Trim off the first match and return 'Some', or return 'None' if the
/// pattern is not a prefix of the string. Like 'trim_start_matches'.
Expand All @@ -110,30 +110,30 @@ pub trait StrExt {
#[deprecated(note = "Use str.strip_suffix instead")]
fn trim_end_match_opt<'a, P>(&'a self, pat: P) -> Option<&'a Self>
where
P: Pattern<Searcher<'a>: ReverseSearcher<'a>>;
P: Pattern<'a, Searcher: ReverseSearcher<'a>>;
}

impl StrExt for str {
#[cfg(feature = "str_pattern_extensions")]
fn split1_opt<'a, P>(&'a self, pat: P) -> Option<(&'a Self, &'a Self)>
where
P: Pattern,
P: Pattern<'a>,
{
self.split_once(pat)
}

#[cfg(feature = "str_pattern_extensions")]
fn split1<'a, P>(&'a self, pat: P) -> (&'a Self, &'a Self)
where
P: Pattern,
P: Pattern<'a>,
{
self.split_once(pat).unwrap_or((self, ""))
}

#[cfg(feature = "str_pattern_extensions")]
fn trim_start_match_opt<'a, P>(&'a self, pat: P) -> Option<&'a Self>
where
P: Pattern,
P: Pattern<'a>,
{
let mut matcher = pat.into_searcher(self);
match matcher.next() {
Expand All @@ -145,7 +145,7 @@ impl StrExt for str {
#[cfg(feature = "str_pattern_extensions")]
fn trim_start_match<'a, P>(&'a self, pat: P) -> &'a Self
where
P: Pattern,
P: Pattern<'a>,
{
#[allow(deprecated)]
self.trim_start_match_opt(pat).unwrap_or(self)
Expand All @@ -154,7 +154,7 @@ impl StrExt for str {
#[cfg(feature = "str_pattern_extensions")]
fn trim_end_match_opt<'a, P>(&'a self, pat: P) -> Option<&'a Self>
where
P: Pattern<Searcher<'a>: ReverseSearcher<'a>>,
P: Pattern<'a, Searcher: ReverseSearcher<'a>>,
{
let mut matcher = pat.into_searcher(self);
match matcher.next_back() {
Expand All @@ -166,7 +166,7 @@ impl StrExt for str {
#[cfg(feature = "str_pattern_extensions")]
fn trim_end_match<'a, P>(&'a self, pat: P) -> &'a Self
where
P: Pattern<Searcher<'a>: ReverseSearcher<'a>>,
P: Pattern<'a, Searcher: ReverseSearcher<'a>>,
{
#[allow(deprecated)]
self.trim_end_match_opt(pat).unwrap_or(self)
Expand Down
1 change: 0 additions & 1 deletion gazebo/gazebo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

#![cfg_attr(feature = "str_pattern_extensions", feature(pattern))]
#![allow(clippy::too_long_first_doc_paragraph)]

//! A collection of well-tested primitives that have been useful. Most modules stand alone.
Expand Down
6 changes: 5 additions & 1 deletion starlark/src/values/layout/heap/heap_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,12 @@ impl Heap {
&'v self,
elems: impl IntoIterator<Item = Value<'v>>,
) -> Value<'v> {
match self.try_alloc_list_iter(elems.into_iter().map(Ok::<_, Infallible>)) {
match self.try_alloc_list_iter(elems.into_iter().map(Ok)) {
Ok(value) => value,
Err(e) => {
let e: Infallible = e;
match e {}
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion starlark/src/values/owned_frozen_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ impl<'f, T: ?Sized> OwnedRefFrozenRef<'f, T> {
where
F: FnOnce(&'f T) -> &'f U,
{
match self.try_map_result(|x| Ok::<_, Infallible>(f(x))) {
match self.try_map_result(|x| Ok(f(x))) {
Ok(x) => x,
Err(e) => {
let e: Infallible = e;
match e {}
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion starlark/src/values/types/list/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,12 @@ impl<'v> ListData<'v> {

#[inline]
pub(crate) fn extend<I: IntoIterator<Item = Value<'v>>>(&self, iter: I, heap: &'v Heap) {
match self.try_extend(iter.into_iter().map(Ok::<_, Infallible>), heap) {
match self.try_extend(iter.into_iter().map(Ok), heap) {
Ok(()) => {}
Err(e) => {
let e: Infallible = e;
match e {}
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions starlark_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ pub fn derive_alloc_frozen_value(input: proc_macro::TokenStream) -> proc_macro::
alloc_value::derive_alloc_frozen_value(input)
}

/// Derive accessor methods that are designed to be used from {has,get,dir}_attr in an `impl StarlarkValue` block.
///
/// All fields in the struct that are not marked with #[starlark(skip)] are exported to Starlark code as
/// attributes. NOTE: Any usage must also call `starlark_attrs!()` in the impl block for `StarlarkValue`,
/// otherwise the generated attr methods will not be used.
/// Derive accessor methods that are designed to be used from {has,get,dir}_attr
/// in an `impl StarlarkValue` block. All fields in the struct that are not
/// marked with #[starlark(skip)] are exported to Starlark code as attributes.
/// NOTE: Any usage must also call `starlark_attrs!()` in the impl block for
/// `StarlarkValue`, otherwise the generated attr methods will not be used.
#[proc_macro_derive(StarlarkAttrs, attributes(starlark))]
pub fn derive_starlark_attrs(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
attrs::derive_attrs(input)
Expand Down

0 comments on commit 221f90b

Please sign in to comment.