Skip to content
Closed
Changes from 3 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
878a796
Add missing safety descriptions to Arc's 'from_raw','increment_strong…
DiuDiu777 Dec 19, 2024
c89f0dc
Adjust syntax
c410-f3r Dec 22, 2024
be23697
Detect overflow when the literal is larger than i128::MAX
s-cerevisiae Jan 8, 2025
330be17
Detect overflow when the literal is negative
s-cerevisiae Jan 8, 2025
1517a41
Add test cases and test for `HELP`
s-cerevisiae Jan 8, 2025
c04e65d
Extract integer conversion into a function
s-cerevisiae Jan 8, 2025
c994637
Only treat plain literal patterns as short
oli-obk Jan 8, 2025
4a85755
Minor simplification
s-cerevisiae Jan 11, 2025
f52724c
Add comment on case to mark the original issue
s-cerevisiae Jan 12, 2025
74e2e8b
Suggest the smallest fitting type instead
s-cerevisiae Jan 12, 2025
c4a5e12
Clarify note in `std::sync::LazyLock` example
Jan 15, 2025
bbeb5e3
Update `compiler-builtins` to 0.1.144
tgross35 Jan 16, 2025
48e671e
fix typo in library/alloc/src/sync.rs
DiuDiu777 Jan 16, 2025
79a1658
Rollup merge of #133720 - c410-f3r:cfg-match-foo-bar-baz, r=joshtriplett
matthiaskrgr Jan 16, 2025
663b35b
Rollup merge of #134496 - DiuDiu777:fix-doc, r=ibraheemdev
matthiaskrgr Jan 16, 2025
13c3759
Rollup merge of #135249 - s-cerevisiae:fix-overflowing-literals-help,…
matthiaskrgr Jan 16, 2025
2760486
Rollup merge of #135251 - oli-obk:push-lmpyvvyrtplk, r=ytmimi
matthiaskrgr Jan 16, 2025
b898de4
Rollup merge of #135556 - AeonSolstice:patch-1, r=tgross35
matthiaskrgr Jan 16, 2025
4dcc3f3
Rollup merge of #135560 - tgross35:update-builtins, r=tgross35
matthiaskrgr Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,8 @@ impl<T: ?Sized> Arc<T> {
/// different types. See [`mem::transmute`][transmute] for more information
/// on what restrictions apply in this case.
///
/// The raw pointer must point to a block of memory allocated by the global allocator.
///
/// The user of `from_raw` has to make sure a specific value of `T` is only
/// dropped once.
///
Expand Down Expand Up @@ -1452,7 +1454,8 @@ impl<T: ?Sized> Arc<T> {
///
/// The pointer must have been obtained through `Arc::into_raw`, and the
/// associated `Arc` instance must be valid (i.e. the strong count must be at
/// least 1) for the duration of this method.
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
/// allocated by the global allocator.
///
/// # Examples
///
Expand Down Expand Up @@ -1486,7 +1489,8 @@ impl<T: ?Sized> Arc<T> {
///
/// The pointer must have been obtained through `Arc::into_raw`, and the
/// associated `Arc` instance must be valid (i.e. the strong count must be at
/// least 1) when invoking this method. This method can be used to release the final
/// least 1) when invoking this method, and `ptr` must point to a block of memory
/// allocated by the global allocator. This method can be used to release the final
/// `Arc` and backing storage, but **should not** be called after the final `Arc` has been
/// released.
///
Expand Down