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 12 pull requests #73779

Merged
merged 30 commits into from
Jun 27, 2020
Merged

Rollup of 12 pull requests #73779

merged 30 commits into from
Jun 27, 2020

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

estebank and others added 30 commits June 18, 2020 14:01
Speedup vec![1_i8; N] for non-zero element.

Before
test do_bench_from_elem_i8        ... bench:         130 ns/iter (+/- 7) = 61 MB/s
test do_bench_from_elem_u8        ... bench:         121 ns/iter (+/- 4) = 66 MB/s
After
test do_bench_from_elem_i8        ... bench:         123 ns/iter (+/- 7) = 65 MB/s
test do_bench_from_elem_u8        ... bench:         121 ns/iter (+/- 5) = 66 MB/s

No speed difference if element is already zero.

    #[bench]
    fn do_bench_from_elem_i8(b: &mut Bencher) {
        b.bytes = 8 as u64;
        b.iter(|| {
            let dst = ve::vec![10_i8; 100];
            assert_eq!(dst.len(), 100);
            assert!(dst.iter().all(|x| *x == 10));
        })
    }

As suggested by @cuviper
https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/SpecForElem.20for.20other.20integers
Co-authored-by: Bastian Kauschke <[email protected]>
- Pass around document_private a lot more
- Add tests
  + Add tests for intra-doc links to private items
  + Add ignored tests for warnings in reference links
Fortanix SGX target libunwind build process changes

Ticket: fortanix/rust-sgx#174
LLVM related changes (merged): rust-lang/llvm-project#57

Description: libunwind changes needed to run code in sgx environment via rust-sgx.

Target that uses this in rust: x86_64-fortanix-unknown-sgx.

Without this change, rust std for this toolchain is forced to use a precompiled library loaded via environment variable.

With this change we act the same as musl target.
Perform obligation deduplication to avoid buggy `ExistentialMismatch`

Address rust-lang#59326.
…r=cuviper

Add liballoc impl SpecFromElem for i8

Speedup vec![1_i8; N] for non-zero element.

Before
test do_bench_from_elem_i8        ... bench:         130 ns/iter (+/- 7) = 61 MB/s
test do_bench_from_elem_u8        ... bench:         121 ns/iter (+/- 4) = 66 MB/s
After
test do_bench_from_elem_i8        ... bench:         123 ns/iter (+/- 7) = 65 MB/s
test do_bench_from_elem_u8        ... bench:         121 ns/iter (+/- 5) = 66 MB/s

No speed difference if element is already zero.

```rust
#[bench]
fn do_bench_from_elem_i8(b: &mut Bencher) {
    b.bytes = 8 as u64;
    b.iter(|| {
        let dst = ve::vec![10_i8; 100];
        assert_eq!(dst.len(), 100);
        assert!(dst.iter().all(|x| *x == 10));
    })
}
```

As suggested by @cuviper
https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/SpecForElem.20for.20other.20integers

r? @cuviper
CC @joshtriplett

Edit: Wow, I just realized both reviewers are Josh.
…aster

add missing doc links

The doc comments contain ``[`size_of_val`]`` but the link target was missing.
…Simulacrum

Shortcuts for min/max on double-ended BTreeMap/BTreeSet iterators

Closes rust-lang#59947: a performance tweak that might benefit some. Optimizes `min` and `max ` on all btree double-ended iterators that do not drop, i.e. the iterators created by:

- `BTreeMap::iter`
- `BTreeMap::iter_mut`
- `BTreeMap::keys` and `BTreeSet::iter`
- `BTreeMap::range` and `BTreeSet::range`
- `BTreeMap::range_mut`

Also in these (currently) single-ended iterators, but obviously for `min` only:
- `BTreeSet::difference`
- `BTreeSet::intersection`
- `BTreeSet::symmetric_difference`
- `BTreeSet::union`

Did not do this in iterators created by `into_iter` to preserve drop order, as outlined in rust-lang#62316.

Did not do this in iterators created by `drain_filter`, possibly to preserve drop order, possibly to preserve predicate invocation, mostly to not have to think about it too hard (I guess maybe it wouldn't be a change for `min`, which is the only shortcut possible in this single-ended iterator).
…=Mark-Simulacrum

Bootstrap: detect Windows based on sys.platform

Closes rust-lang#73689.
…Mark-Simulacrum

Document the Self keyword

Partial fix of rust-lang#34601.

Document the `Self` keyword.

This contains simple examples of the places where `Self` can be used.
…aster

Document the super keyword

Partial fix of rust-lang#34601.

Quite short, just a small example and a link to the reference.

@rustbot modify labels: T-doc,C-enhancement
…ywiser

Document some invariants correctly/more

r? @wesleywiser
Remove irrelevant comment

Iterator is no longer a lang item since 216e72f.
@Manishearth
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jun 26, 2020

📌 Commit 50026ae has been approved by Manishearth

@rustbot rustbot added the rollup A PR which is a rollup label Jun 26, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 26, 2020
@bors
Copy link
Contributor

bors commented Jun 27, 2020

⌛ Testing commit 50026ae with merge 394e1b4...

@bors
Copy link
Contributor

bors commented Jun 27, 2020

☀️ Test successful - checks-azure
Approved by: Manishearth
Pushing 394e1b4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 27, 2020
@bors bors merged commit 394e1b4 into rust-lang:master Jun 27, 2020
@Manishearth Manishearth deleted the rollup-lwqd9jm branch July 18, 2020 01:15
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.