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 8 pull requests #106866

Merged
merged 24 commits into from
Jan 15, 2023
Merged

Rollup of 8 pull requests #106866

merged 24 commits into from
Jan 15, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Xiretza and others added 24 commits December 10, 2022 09:27
This allows for propagating trait impls on the iterator type.
This is currently only relevant with #![feature(generator_clone)].
The test relied on Error::last_os_error() coming from the stat call on
the passed file, but there is no guarantee this will be the case.

Instead extract errno from the error returned by the routine.

Patch de facto written by joboet.

Co-authored-by:	joboet <jonasboettiger@icloud.com>
As is the current toy program:
fn main() -> std::io::Result<()> {
    use std::fs;

    let metadata = fs::metadata("foo.txt")?;

    assert!(!metadata.is_dir());
    Ok(())
}

... observed under strace will issue:
[snip]
statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address)
statx(AT_FDCWD, "foo.txt", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=0, ...}) = 0

While statx is not necessarily always present, checking for it can be
delayed to the first error condition. Said condition may very well never
happen, in which case the check got avoided altogether.

Note this is still suboptimal as there still will be programs issuing
it, but bulk of the problem is removed.

Tested by forbidding the syscall for the binary and observing it
correctly falls back to newfstatat.

While here tidy up the commentary, in particular by denoting some
problems with the current approach.
This commit builds on b72de9b, which removes
the `docblock` class from the All Items page, and
9457380, which removes the `docblock` class
from the item decl.

Fixes rust-lang#92974
…, r=scottmcm

libcore: make result of iter::from_generator Clone

`@rustbot` label +A-generators
Fix `unused_braces` on generic const expr macro call

Fixes rust-lang#106545

`@rustbot` label +A-const-generics +A-lint
…crum

Stop probing for statx unless necessary

As is the current toy program:
fn main() -> std::io::Result<()> {
    use std::fs;

    let metadata = fs::metadata("foo.txt")?;

    assert!(!metadata.is_dir());
    Ok(())
}

... observed under strace will issue:
[snip]
statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address) statx(AT_FDCWD, "foo.txt", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=0, ...}) = 0

While statx is not necessarily always present, checking for it can be delayed to the first error condition. Said condition may very well never happen, in which case the check got avoided altogether.

Note this is still suboptimal as there still will be programs issuing it, but bulk of the problem is removed.

Tested by forbidding the syscall for the binary and observing it correctly falls back to newfstatat.

While here tidy up the commentary, in particular by denoting some problems with the current approach.
…estebank

Deprioritize fulfillment errors that come from expansions.

Fixes (part of?) rust-lang#69455
…docblock, r=GuillaumeGomez

rustdoc: remove `docblock` class from notable trait popover

This commit builds on b72de9b, which removes the `docblock` class from the All Items page, and 9457380, which removes the `docblock` class from the item decl.

Fixes rust-lang#92974
Allocate one less vec while parsing arrays

Probably does not matter, but imo a little bit nicer.
Remove various double spaces in the libraries.

I was just pretty bothered by this when reading the source for a function, and was suggested to check if this happened elsewhere.
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Jan 14, 2023

📌 Commit e0eb63a has been approved by matthiaskrgr

It is now in the queue for this repository.

@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 Jan 14, 2023
@bors
Copy link
Contributor

bors commented Jan 14, 2023

⌛ Testing commit e0eb63a with merge afaf3e0...

@bors
Copy link
Contributor

bors commented Jan 15, 2023

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing afaf3e0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 15, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (afaf3e0): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.0% [1.1%, 7.1%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-4.8%, -1.4%] 8
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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. 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.

None yet