diff options
| author | bors <bors@rust-lang.org> | 2024-10-25 21:01:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-25 21:01:03 +0000 |
| commit | c1db4dc24267a707409c9bf2e67cf3c7323975c8 (patch) | |
| tree | 01af826253af9b474b7af04fc091d11df77915cc /library/alloc/src | |
| parent | b188577f14fd238ca8568276baabd461a174038d (diff) | |
| parent | 4f2e9c5284abf541f61ec0399cf20c0d143ae284 (diff) | |
| download | rust-c1db4dc24267a707409c9bf2e67cf3c7323975c8.tar.gz rust-c1db4dc24267a707409c9bf2e67cf3c7323975c8.zip | |
Auto merge of #132148 - matthiaskrgr:rollup-c155tcy, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #132106 (Pass Ident by reference in ast Visitor) - #132130 (remove `change-id` from CI script) - #132137 (library: consistently use American spelling for 'behavior') r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/binary_heap/tests.rs | 4 | ||||
| -rw-r--r-- | library/alloc/src/collections/btree/map/tests.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/rc.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/sync.rs | 4 | ||||
| -rw-r--r-- | library/alloc/src/vec/is_zero.rs | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/library/alloc/src/collections/binary_heap/tests.rs b/library/alloc/src/collections/binary_heap/tests.rs index c18318724a4..ad0a020a1a9 100644 --- a/library/alloc/src/collections/binary_heap/tests.rs +++ b/library/alloc/src/collections/binary_heap/tests.rs @@ -350,7 +350,7 @@ fn test_drain_forget() { mem::forget(it); })) .unwrap(); - // Behaviour after leaking is explicitly unspecified and order is arbitrary, + // Behavior after leaking is explicitly unspecified and order is arbitrary, // so it's fine if these start failing, but probably worth knowing. assert!(q.is_empty()); assert_eq!(a.dropped() + b.dropped() + c.dropped(), 1); @@ -377,7 +377,7 @@ fn test_drain_sorted_forget() { mem::forget(it); })) .unwrap(); - // Behaviour after leaking is explicitly unspecified, + // Behavior after leaking is explicitly unspecified, // so it's fine if these start failing, but probably worth knowing. assert_eq!(q.len(), 2); assert_eq!(a.dropped(), 0); diff --git a/library/alloc/src/collections/btree/map/tests.rs b/library/alloc/src/collections/btree/map/tests.rs index d0e413778f8..db16d82be7d 100644 --- a/library/alloc/src/collections/btree/map/tests.rs +++ b/library/alloc/src/collections/btree/map/tests.rs @@ -1216,7 +1216,7 @@ mod test_extract_if { { let mut it = map.extract_if(|dummy, _| dummy.query(true)); catch_unwind(AssertUnwindSafe(|| while it.next().is_some() {})).unwrap_err(); - // Iterator behaviour after a panic is explicitly unspecified, + // Iterator behavior after a panic is explicitly unspecified, // so this is just the current implementation: let result = catch_unwind(AssertUnwindSafe(|| it.next())); assert!(matches!(result, Ok(None))); diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 128503284cd..9fdd51ce331 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -3075,7 +3075,7 @@ impl<T: ?Sized, A: Allocator> Weak<T, A> { /// /// drop(strong); /// // But not any more. We can do weak.as_ptr(), but accessing the pointer would lead to - /// // undefined behaviour. + /// // undefined behavior. /// // assert_eq!("hello", unsafe { &*weak.as_ptr() }); /// ``` /// diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 220b79eaf8a..15a1b0f2834 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -804,7 +804,7 @@ impl<T, A: Allocator> Arc<T, A> { // observe a non-zero strong count. Therefore we need at least "Release" ordering // in order to synchronize with the `compare_exchange_weak` in `Weak::upgrade`. // - // "Acquire" ordering is not required. When considering the possible behaviours + // "Acquire" ordering is not required. When considering the possible behaviors // of `data_fn` we only need to look at what it could do with a reference to a // non-upgradeable `Weak`: // - It can *clone* the `Weak`, increasing the weak reference count. @@ -2788,7 +2788,7 @@ impl<T: ?Sized, A: Allocator> Weak<T, A> { /// /// drop(strong); /// // But not any more. We can do weak.as_ptr(), but accessing the pointer would lead to - /// // undefined behaviour. + /// // undefined behavior. /// // assert_eq!("hello", unsafe { &*weak.as_ptr() }); /// ``` /// diff --git a/library/alloc/src/vec/is_zero.rs b/library/alloc/src/vec/is_zero.rs index bcc5bf4d65b..ba57d940d8c 100644 --- a/library/alloc/src/vec/is_zero.rs +++ b/library/alloc/src/vec/is_zero.rs @@ -172,7 +172,7 @@ macro_rules! impl_is_zero_option_of_bool { fn is_zero(&self) -> bool { // SAFETY: This is *not* a stable layout guarantee, but // inside `core` we're allowed to rely on the current rustc - // behaviour that options of bools will be one byte with + // behavior that options of bools will be one byte with // no padding, so long as they're nested less than 254 deep. let raw: u8 = unsafe { core::mem::transmute(*self) }; raw == 0 |
