Skip to content

Commit

Permalink
update platform010 & platform010-aarch64 symlinks
Browse files Browse the repository at this point in the history
Summary: Upgrade toolchain to 1.83.0

Reviewed By: dtolnay

Differential Revision: D67041293

fbshipit-source-id: 6b8039d953e044d51ab61d3c5c4fadf442eb166b
  • Loading branch information
capickett authored and facebook-github-bot committed Dec 18, 2024
1 parent 5f32a60 commit fc908cf
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 34 deletions.
1 change: 1 addition & 0 deletions gazebo/gazebo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

#![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: 3 additions & 3 deletions starlark/src/__derive_refs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

#![doc(hidden)]

/// __derive_refs allows us to reference other crates in starlark_derive without users needing to be
/// aware of those dependencies. We make them public here and then can reference them like
/// `starlark::__derive_refs::foo`.
//! __derive_refs allows us to reference other crates in starlark_derive without users needing to be
//! aware of those dependencies. We make them public here and then can reference them like
//! `starlark::__derive_refs::foo`.
pub mod serde {
pub use serde::ser::Error;
Expand Down
2 changes: 1 addition & 1 deletion starlark/src/collections/aligned_padded_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<'a> AlignedPaddedStr<'a> {
/// Len of string in words.
#[inline]
fn len_words(self) -> usize {
(self.len + mem::size_of::<usize>() - 1) / mem::size_of::<usize>()
self.len.div_ceil(mem::size_of::<usize>())
}
}

Expand Down
4 changes: 2 additions & 2 deletions starlark/src/collections/alloca.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Alloca {
}

pub fn with_capacity(size_bytes: usize) -> Self {
let size_words = (size_bytes + ALIGN - 1) / ALIGN;
let size_words = size_bytes.div_ceil(ALIGN);
let layout = Layout::array::<Align>(size_words).unwrap();
let buffer = Buffer::alloc(layout);
Self {
Expand Down Expand Up @@ -138,7 +138,7 @@ impl Alloca {
} else {
// Multiplication does not overflow because we know that `[T; len]`
// is within the size of the current buffer, which is smaller than `isize::MAX`.
(len * mem::size_of::<T>() + ALIGN - 1) / ALIGN
(len * mem::size_of::<T>()).div_ceil(ALIGN)
}
}

Expand Down
2 changes: 1 addition & 1 deletion starlark/src/collections/symbol/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl Symbol {
let small_hash = x.hash();
let hash = small_hash.promote();
let len = x.key().len();
let len_words = (len + mem::size_of::<usize>() - 1) / mem::size_of::<usize>();
let len_words = len.div_ceil(mem::size_of::<usize>());
let mut payload = vec![0; len_words]; // 0 pad it at the end
unsafe {
copy_nonoverlapping(x.key().as_ptr(), payload.as_mut_ptr() as *mut u8, len);
Expand Down
2 changes: 1 addition & 1 deletion starlark/src/values/frozen_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ unsafe impl<'v, 'f, T: 'f + ?Sized> Trace<'v> for FrozenRef<'f, T> {
}

impl<'f, T: 'f + ?Sized> FrozenRef<'f, T> {
pub(crate) const fn new(value: &'f T) -> FrozenRef<T> {
pub(crate) const fn new(value: &'f T) -> FrozenRef<'f, T> {
FrozenRef { value }
}

Expand Down
6 changes: 1 addition & 5 deletions starlark/src/values/layout/heap/heap_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,12 +790,8 @@ impl Heap {
&'v self,
elems: impl IntoIterator<Item = Value<'v>>,
) -> Value<'v> {
match self.try_alloc_list_iter(elems.into_iter().map(Ok)) {
match self.try_alloc_list_iter(elems.into_iter().map(Ok::<_, Infallible>)) {
Ok(value) => value,
Err(e) => {
let e: Infallible = e;
match e {}
}
}
}

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

Expand Down
2 changes: 1 addition & 1 deletion starlark/src/values/types/dict/refs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl<'v> DictRef<'v> {
impl<'v> DictMut<'v> {
/// Downcast the value to a mutable dict reference.
#[inline]
pub fn from_value(x: Value<'v>) -> anyhow::Result<DictMut> {
pub fn from_value(x: Value<'v>) -> anyhow::Result<DictMut<'v>> {
#[derive(thiserror::Error, Debug)]
#[error("Value is not dict, value type: `{0}`")]
struct NotDictError(&'static str);
Expand Down
6 changes: 1 addition & 5 deletions starlark/src/values/types/list/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,8 @@ 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), heap) {
match self.try_extend(iter.into_iter().map(Ok::<_, Infallible>), heap) {
Ok(()) => {}
Err(e) => {
let e: Infallible = e;
match e {}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion starlark/src/values/types/set/refs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub struct SetMut<'v> {
impl<'v> SetMut<'v> {
/// Downcast the value to a mutable set reference.
#[inline]
pub fn from_value(x: Value<'v>) -> anyhow::Result<SetMut> {
pub fn from_value(x: Value<'v>) -> anyhow::Result<SetMut<'v>> {
#[derive(thiserror::Error, Debug)]
#[error("Value is not set, value type: `{0}`")]
struct NotSetError(&'static str);
Expand Down
2 changes: 1 addition & 1 deletion starlark/src/values/types/string/str_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl StarlarkStr {
#[doc(hidden)]
#[inline]
pub const fn payload_len_for_len(len: usize) -> usize {
(len + mem::size_of::<usize>() - 1) / mem::size_of::<usize>()
len.div_ceil(mem::size_of::<usize>())
}

/// Unsafe because if you do `unpack` on this it will blow up
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
6 changes: 3 additions & 3 deletions starlark_map/src/vec_map/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,17 @@ impl<K, V> IntoIter<K, V> {
}
}

impl<'a, K: 'a, V: 'a> Iterator for IntoIter<K, V> {
impl<K, V> Iterator for IntoIter<K, V> {
type Item = (K, V);

def_iter!();
}

impl<'a, K: 'a, V: 'a> DoubleEndedIterator for IntoIter<K, V> {
impl<K, V> DoubleEndedIterator for IntoIter<K, V> {
def_double_ended_iter!();
}

impl<'a, K: 'a, V: 'a> ExactSizeIterator for IntoIter<K, V> {
impl<K, V> ExactSizeIterator for IntoIter<K, V> {
#[inline]
fn len(&self) -> usize {
self.iter.len()
Expand Down

0 comments on commit fc908cf

Please sign in to comment.