Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #120466

Merged
merged 30 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a208662
References refer to allocated objects
joshlf Oct 12, 2023
4f0192a
Update primitive_docs.rs
joshlf Oct 13, 2023
39660c4
Update library/core/src/primitive_docs.rs
joshlf Oct 13, 2023
55487e2
Update primitive_docs.rs
joshlf Oct 13, 2023
1a0309a
Update primitive_docs.rs
joshlf Nov 3, 2023
ab938b9
Improve documentation for [A]Rc::into_inner
steffahn Jan 23, 2024
c2c6e33
Update primitive_docs.rs
joshlf Jan 25, 2024
3269513
fix issue 120040
HTGAzureX1212 Jan 26, 2024
8f89e57
remove redundant call to Error::last_os_error
HTGAzureX1212 Jan 26, 2024
2241d16
fix
HTGAzureX1212 Jan 26, 2024
e26f213
make modifications as per reviews
HTGAzureX1212 Jan 27, 2024
018bf30
add extra check for invalid handle in ReadDir::next
HTGAzureX1212 Jan 27, 2024
f5c7895
Stop using derivative in rustc_pattern_analysis
lnicola Jan 27, 2024
b867c7c
Update primitive_docs.rs
joshlf Jan 27, 2024
5f8030d
hir: Remove unnecessary `HirId` from `hir::Let`
petrochenkov Jan 27, 2024
b2b5b91
hir: Use `InferArg` in `ArrayLen::Infer`
petrochenkov Jan 27, 2024
6f014a8
Handle methodcalls & operators in patterns
ShE3py Jan 28, 2024
6755805
normalize_newlines(): fix incorrect comment
mattheww Jan 28, 2024
d3bf8b7
Clean dead code
mu001999 Jan 28, 2024
83fa46f
Borrow check inline const patterns
matthewjasper Jan 26, 2024
44824e0
Enable tests for unsafe blocks in inline const patterns
matthewjasper Jan 26, 2024
8017ea4
Rollup merge of #116677 - joshlf:patch-11, r=RalfJung
Dylan-DPC Jan 29, 2024
0138151
Rollup merge of #118625 - ShE3py:expr-in-pats, r=WaffleLapkin
Dylan-DPC Jan 29, 2024
4528b37
Rollup merge of #120266 - steffahn:a_rc_into_inner_docs, r=Mark-Simul…
Dylan-DPC Jan 29, 2024
d04bede
Rollup merge of #120373 - HTGAzureX1212:HTGAzureX1212/issue-120040, r…
Dylan-DPC Jan 29, 2024
549eeb0
Rollup merge of #120390 - matthewjasper:inline-constant-pat-mir, r=da…
Dylan-DPC Jan 29, 2024
5de94a3
Rollup merge of #120420 - lnicola:rm-pattern-analysis-derivative, r=N…
Dylan-DPC Jan 29, 2024
eaa1002
Rollup merge of #120428 - petrochenkov:somehir2, r=compiler-errors
Dylan-DPC Jan 29, 2024
15e8b90
Rollup merge of #120453 - mattheww:2024-01_normalize_newlines, r=oli-obk
Dylan-DPC Jan 29, 2024
c70c4cc
Rollup merge of #120462 - mu001999:clean, r=Nilstrieb
Dylan-DPC Jan 29, 2024
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
7 changes: 5 additions & 2 deletions library/alloc/src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,11 @@ impl<T, A: Allocator> Rc<T, A> {
/// it is guaranteed that exactly one of the calls returns the inner value.
/// This means in particular that the inner value is not dropped.
///
/// This is equivalent to `Rc::try_unwrap(this).ok()`. (Note that these are not equivalent for
/// [`Arc`](crate::sync::Arc), due to race conditions that do not apply to `Rc`.)
/// [`Rc::try_unwrap`] is conceptually similar to `Rc::into_inner`.
/// And while they are meant for different use-cases, `Rc::into_inner(this)`
/// is in fact equivalent to <code>[Rc::try_unwrap]\(this).[ok][Result::ok]()</code>.
/// (Note that the same kind of equivalence does **not** hold true for
/// [`Arc`](crate::sync::Arc), due to race conditions that do not apply to `Rc`!)
#[inline]
#[stable(feature = "rc_into_inner", since = "1.70.0")]
pub fn into_inner(this: Self) -> Option<T> {
Expand Down
10 changes: 7 additions & 3 deletions library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -983,9 +983,13 @@ impl<T, A: Allocator> Arc<T, A> {
/// it is guaranteed that exactly one of the calls returns the inner value.
/// This means in particular that the inner value is not dropped.
///
/// The similar expression `Arc::try_unwrap(this).ok()` does not
/// offer such a guarantee. See the last example below
/// and the documentation of [`Arc::try_unwrap`].
/// [`Arc::try_unwrap`] is conceptually similar to `Arc::into_inner`, but it
/// is meant for different use-cases. If used as a direct replacement
/// for `Arc::into_inner` anyway, such as with the expression
/// <code>[Arc::try_unwrap]\(this).[ok][Result::ok]()</code>, then it does
/// **not** give the same guarantee as described in the previous paragraph.
/// For more information, see the examples below and read the documentation
/// of [`Arc::try_unwrap`].
///
/// # Examples
///
Expand Down