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 11 pull requests #91761

Merged
merged 26 commits into from
Dec 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
913996b
Remove the match on `ErrorKind::Other`
ChrisDenton Dec 8, 2021
c7f80fc
add tests
b-naber Dec 8, 2021
c025a5d
move core/stream/stream/mod.rs to core/stream/stream.rs
ibraheemdev Dec 8, 2021
9f6da95
fix typo in `intrinsics::raw_eq` docs
WaffleLapkin Dec 8, 2021
42f9104
Fix `Vec::reserve_exact` documentation
dalcde Dec 9, 2021
4b0a9c9
Delete Utf8Lossy::from_str
dtolnay Dec 9, 2021
e18518b
Add unstable book entries for parts of asm that are not being stabilized
Amanieu Dec 9, 2021
caed83d
Add reminder to match the error kind once ` DirectoryNotEmpty` is sta…
ChrisDenton Dec 9, 2021
cebd949
Replace iterator-based set construction by *Set::From<[T; N]>
juniorbassani Dec 9, 2021
8a6f54f
Use more accurate wording in `bootstrap.py` logging
jyn514 Dec 9, 2021
ae6f5fb
If --verbose is passed, print a warning in `bootstrap.py` when downlo…
jyn514 Dec 9, 2021
dfcaac5
Don't print bootstrap caching/ensure info unless `-vv` is passed
jyn514 Dec 9, 2021
6840030
Default to `doc-stage = 2` for the tools profile
jyn514 Dec 9, 2021
777c041
Add pierwill to .mailmap
pierwill Dec 10, 2021
305dd69
Fix since attribute for const_linked_list_new feature
not-my-profile Dec 10, 2021
0aa41be
Rollup merge of #91668 - ChrisDenton:bootstrap-clean-error, r=Mark-Si…
matthiaskrgr Dec 10, 2021
d6e9417
Rollup merge of #91678 - b-naber:tests-for-postpone-const-eval, r=jac…
matthiaskrgr Dec 10, 2021
6451de0
Rollup merge of #91679 - ibraheemdev:stream-mod, r=Mark-Simulacrum
matthiaskrgr Dec 10, 2021
4286ade
Rollup merge of #91681 - WaffleLapkin:patch-3, r=scottmcm
matthiaskrgr Dec 10, 2021
1d36c6a
Rollup merge of #91686 - dalcde:patch-1, r=dtolnay
matthiaskrgr Dec 10, 2021
2784051
Rollup merge of #91697 - dtolnay:lossyfromstr, r=Mark-Simulacrum
matthiaskrgr Dec 10, 2021
698ea96
Rollup merge of #91706 - Amanieu:asm_unstable_book2, r=joshtriplett
matthiaskrgr Dec 10, 2021
3beeb75
Rollup merge of #91709 - juniorbassani:use-from-array-in-set-examples…
matthiaskrgr Dec 10, 2021
ca9d14b
Rollup merge of #91716 - jyn514:x.py-defaults, r=Mark-Simulacrum
matthiaskrgr Dec 10, 2021
6768a07
Rollup merge of #91747 - pierwill:patch-1, r=Mark-Simulacrum
matthiaskrgr Dec 10, 2021
637859b
Rollup merge of #91755 - not-my-profile:fix-const_linked_list_new-sin…
matthiaskrgr Dec 10, 2021
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
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ Philipp Brüschweiler <[email protected]> <[email protected]>
Philipp Krones <[email protected]> flip1995 <[email protected]>
Philipp Krones <[email protected]> <[email protected]>
Philipp Matthias Schäfer <[email protected]>
pierwill <[email protected]> <[email protected]>
Przemysław Wesołek <[email protected]> Przemek Wesołek <[email protected]>
Rafael Ávila de Espíndola <[email protected]> Rafael Avila de Espindola <espindola@dream.(none)>
Ralph Giles <[email protected]> Ralph Giles <[email protected]>
Expand Down
37 changes: 18 additions & 19 deletions library/alloc/src/collections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let set: BTreeSet<_> = [1, 2, 3].iter().cloned().collect();
/// let set = BTreeSet::from([1, 2, 3]);
/// assert_eq!(set.contains(&1), true);
/// assert_eq!(set.contains(&4), false);
/// ```
Expand All @@ -515,7 +515,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let set: BTreeSet<_> = [1, 2, 3].iter().cloned().collect();
/// let set = BTreeSet::from([1, 2, 3]);
/// assert_eq!(set.get(&2), Some(&2));
/// assert_eq!(set.get(&4), None);
/// ```
Expand All @@ -536,7 +536,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let a: BTreeSet<_> = [1, 2, 3].iter().cloned().collect();
/// let a = BTreeSet::from([1, 2, 3]);
/// let mut b = BTreeSet::new();
///
/// assert_eq!(a.is_disjoint(&b), true);
Expand All @@ -562,7 +562,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let sup: BTreeSet<_> = [1, 2, 3].iter().cloned().collect();
/// let sup = BTreeSet::from([1, 2, 3]);
/// let mut set = BTreeSet::new();
///
/// assert_eq!(set.is_subset(&sup), true);
Expand Down Expand Up @@ -639,7 +639,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let sub: BTreeSet<_> = [1, 2].iter().cloned().collect();
/// let sub = BTreeSet::from([1, 2]);
/// let mut set = BTreeSet::new();
///
/// assert_eq!(set.is_superset(&sub), false);
Expand Down Expand Up @@ -853,7 +853,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let mut set: BTreeSet<_> = [1, 2, 3].iter().cloned().collect();
/// let mut set = BTreeSet::from([1, 2, 3]);
/// assert_eq!(set.take(&2), Some(2));
/// assert_eq!(set.take(&2), None);
/// ```
Expand All @@ -876,8 +876,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let xs = [1, 2, 3, 4, 5, 6];
/// let mut set: BTreeSet<i32> = xs.iter().cloned().collect();
/// let mut set = BTreeSet::from([1, 2, 3, 4, 5, 6]);
/// // Keep only the even numbers.
/// set.retain(|&k| k % 2 == 0);
/// assert!(set.iter().eq([2, 4, 6].iter()));
Expand Down Expand Up @@ -1009,7 +1008,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let set: BTreeSet<usize> = [1, 2, 3].iter().cloned().collect();
/// let set = BTreeSet::from([1, 2, 3]);
/// let mut set_iter = set.iter();
/// assert_eq!(set_iter.next(), Some(&1));
/// assert_eq!(set_iter.next(), Some(&2));
Expand All @@ -1022,7 +1021,7 @@ impl<T> BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let set: BTreeSet<usize> = [3, 1, 2].iter().cloned().collect();
/// let set = BTreeSet::from([3, 1, 2]);
/// let mut set_iter = set.iter();
/// assert_eq!(set_iter.next(), Some(&1));
/// assert_eq!(set_iter.next(), Some(&2));
Expand Down Expand Up @@ -1124,7 +1123,7 @@ impl<T> IntoIterator for BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let set: BTreeSet<usize> = [1, 2, 3, 4].iter().cloned().collect();
/// let set = BTreeSet::from([1, 2, 3, 4]);
///
/// let v: Vec<_> = set.into_iter().collect();
/// assert_eq!(v, [1, 2, 3, 4]);
Expand Down Expand Up @@ -1243,8 +1242,8 @@ impl<T: Ord + Clone> Sub<&BTreeSet<T>> for &BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let a: BTreeSet<_> = vec![1, 2, 3].into_iter().collect();
/// let b: BTreeSet<_> = vec![3, 4, 5].into_iter().collect();
/// let a = BTreeSet::from([1, 2, 3]);
/// let b = BTreeSet::from([3, 4, 5]);
///
/// let result = &a - &b;
/// let result_vec: Vec<_> = result.into_iter().collect();
Expand All @@ -1266,8 +1265,8 @@ impl<T: Ord + Clone> BitXor<&BTreeSet<T>> for &BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let a: BTreeSet<_> = vec![1, 2, 3].into_iter().collect();
/// let b: BTreeSet<_> = vec![2, 3, 4].into_iter().collect();
/// let a = BTreeSet::from([1, 2, 3]);
/// let b = BTreeSet::from([2, 3, 4]);
///
/// let result = &a ^ &b;
/// let result_vec: Vec<_> = result.into_iter().collect();
Expand All @@ -1289,8 +1288,8 @@ impl<T: Ord + Clone> BitAnd<&BTreeSet<T>> for &BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let a: BTreeSet<_> = vec![1, 2, 3].into_iter().collect();
/// let b: BTreeSet<_> = vec![2, 3, 4].into_iter().collect();
/// let a = BTreeSet::from([1, 2, 3]);
/// let b = BTreeSet::from([2, 3, 4]);
///
/// let result = &a & &b;
/// let result_vec: Vec<_> = result.into_iter().collect();
Expand All @@ -1312,8 +1311,8 @@ impl<T: Ord + Clone> BitOr<&BTreeSet<T>> for &BTreeSet<T> {
/// ```
/// use std::collections::BTreeSet;
///
/// let a: BTreeSet<_> = vec![1, 2, 3].into_iter().collect();
/// let b: BTreeSet<_> = vec![3, 4, 5].into_iter().collect();
/// let a = BTreeSet::from([1, 2, 3]);
/// let b = BTreeSet::from([3, 4, 5]);
///
/// let result = &a | &b;
/// let result_vec: Vec<_> = result.into_iter().collect();
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/collections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ impl<T> LinkedList<T> {
/// let list: LinkedList<u32> = LinkedList::new();
/// ```
#[inline]
#[rustc_const_stable(feature = "const_linked_list_new", since = "1.32.0")]
#[rustc_const_stable(feature = "const_linked_list_new", since = "1.39.0")]
#[stable(feature = "rust1", since = "1.0.0")]
#[must_use]
pub const fn new() -> Self {
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity overflows `usize`.
/// Panics if the new capacity exceeds `isize::MAX` bytes.
///
/// # Examples
///
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ extern "rust-intrinsic" {

/// Determines whether the raw bytes of the two values are equal.
///
/// The is particularly handy for arrays, since it allows things like just
/// This is particularly handy for arrays, since it allows things like just
/// comparing `i96`s instead of forcing `alloca`s for `[6 x i16]`.
///
/// Above some backend-decided threshold this will emit calls to `memcmp`,
Expand Down
5 changes: 0 additions & 5 deletions library/core/src/str/lossy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ pub struct Utf8Lossy {
}

impl Utf8Lossy {
#[must_use]
pub fn from_str(s: &str) -> &Utf8Lossy {
Utf8Lossy::from_bytes(s.as_bytes())
}

#[must_use]
pub fn from_bytes(bytes: &[u8]) -> &Utf8Lossy {
// SAFETY: Both use the same memory layout, and UTF-8 correctness isn't required.
Expand Down
Loading