Skip to content

Rollup of 10 pull requests - #124208

Merged
bors merged 22 commits into
rust-lang:masterfrom
jieyouxu:rollup-gbgpu4u
Apr 21, 2024
Merged

Rollup of 10 pull requests#124208
bors merged 22 commits into
rust-lang:masterfrom
jieyouxu:rollup-gbgpu4u

Conversation

@jieyouxu

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJungand others added 22 commits April 15, 2024 18:45
Before:
Metadata {
file_type: FileType(
FileType {
mode: 0o100600 (-rw-------),
},
),
is_dir: false,
is_file: true,
permissions: Permissions(
FilePermissions {
mode: 0o100600 (-rw-------),
},
),
modified: Ok(
SystemTime {
tv_sec: 1713402981,
tv_nsec: 682983531,
},
),
accessed: Ok(
SystemTime {
tv_sec: 1713402983,
tv_nsec: 206999623,
},
),
created: Ok(
SystemTime {
tv_sec: 1713402981,
tv_nsec: 682983531,
},
),
..
}
After:
Metadata {
file_type: FileType {
is_dir: false,
is_file: true,
is_symlink: false,
..
},
permissions: Permissions(
FilePermissions {
mode: 0o100600 (-rw-------),
},
),
len: 2096,
modified: SystemTime {
tv_sec: 1713402981,
tv_nsec: 682983531,
},
accessed: SystemTime {
tv_sec: 1713402983,
tv_nsec: 206999623,
},
created: SystemTime {
tv_sec: 1713402981,
tv_nsec: 682983531,
},
..
}
Required for being able to make the fields private and force the use of
accessor methods, which will be added in the next commit.
Print note with closure signature on type mismatch
Fixesrust-lang#119266
r? Nilstrieb
static_mut_refs: use raw pointers to remove the remaining FIXME
Using `SyncUnsafeCell` would not make a lot of sense IMO.
…ts, r=Mark-Simulacrum
Use fake libc in core test
The war on libc continues.
Some platforms may not need to link to the libc crate (and it's possible some may not even have a libc), therefore we shouldn't require it for tests. This creates dummy `malloc` and `free` implementations for use in the pointer docs, but, keeps the public documentation looking the same as before.
lint-docs: Add redirects for renamed lints.
This updates the lint docs to include a redirect for renamed lints to the new name. This helps ensure that links to the old name will still be valid.
Note that this currently uses a hard-coded list. As mentioned in the comment, a future enhancement may gather this information in a better way.
Unblocks rust-lang#123680
…lacrum
coverage: Branch coverage tests for lazy boolean operators
The current branch coverage implementation already supports the `&&` and `||` operators (even outside of an `if` condition), as a natural consequence of how they are desugared/lowered, but we didn't have any specific tests for them. This PR adds some appropriate tests.
I've also moved the existing branch coverage tests into a `coverage/branch` subdirectory, so that they don't become unwieldy as I add more branch coverage tests.
``@rustbot`` label +A-code-coverage
…ild_manifest, r=Mark-Simulacrum
Add llvm-bitcode-linker to build manifest
When creating rust-lang#123423 I didn't realize I also had to add the new component to the build-manifest. This PR finishes the work of adding it, by also adding it to the build manifest.
r? ``@Mark-Simulacrum``
…lacrum
Improve std::fs::Metadata Debug representation
- Remove duplication of `mode` between `file_type` and `permissions`, which both involve operating on the same mode_t integer
- Add `is_symlink`
- Add `len` in bytes
- Remove Ok wrapping around `modified`, `accessed`, `created`, which eliminates 6 useless lines
<table>
<tr><th>Before</th><th>After</th></tr>
<tr><td>
```console
Metadata {
file_type: FileType(
FileType {
mode: 0o100600 (-rw-------),
},
),
is_dir: false,
is_file: true,
permissions: Permissions(
FilePermissions {
mode: 0o100600 (-rw-------),
},
),
modified: Ok(
SystemTime {
tv_sec: 1713402981,
tv_nsec: 682983531,
},
),
accessed: Ok(
SystemTime {
tv_sec: 1713402983,
tv_nsec: 206999623,
},
),
created: Ok(
SystemTime {
tv_sec: 1713402981,
tv_nsec: 682983531,
},
),
..
}
```
</td><td>
```console
Metadata {
file_type: FileType {
is_file: true,
is_dir: false,
is_symlink: false,
..
},
permissions: Permissions(
FilePermissions {
mode: 0o100600 (-rw-------),
},
),
len: 2096,
modified: SystemTime {
tv_sec: 1713402981,
tv_nsec: 682983531,
},
accessed: SystemTime {
tv_sec: 1713402983,
tv_nsec: 206999623,
},
created: SystemTime {
tv_sec: 1713402981,
tv_nsec: 682983531,
},
..
}
```
</td></tr></table>
Generated by:
```rust
fn main() {
println!("{:#?}", std::fs::metadata("Cargo.toml").unwrap());
}
```
…-Simulacrum
llvm RustWrapper: explain OpBundlesIndirect argument type
Follow-up to rust-lang#123941
r? ``@Mark-Simulacrum``
Give a name to each distinct manipulation of pretty-printer FixupContext
There are only 7 distinct ways that the AST pretty-printer interacts with FixupContext: 3 constructors (including Default), 2 transformations, and 2 queries.
This PR turns these into associated functions which can be documented with examples.
This PR unblocks rust-lang#119427 (comment). In order to improve the pretty-printer's behavior regarding parenthesization of braced macro calls in match arms, which have different grammar than macro calls in statements, FixupContext needs to be extended with 2 new fields. In the previous approach, that would be onerous. In the new approach, all it entails is 1 new constructor (`FixupContext::new_match_arm()`).
…ulacrum
mir-opt tests: rename unit-test -> test-mir-pass
"unit-test" is extremely non-descriptive, no idea how one is supposed to read that and know that this specifies the MIR pass being tested.
@rustbotrustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Apr 20, 2024
@jieyouxu

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit c72cfdd has been approved by jieyouxu

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 20, 2024
@bors

bors commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c72cfdd with merge 453ceaf...

@bors

bors commented Apr 21, 2024

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 453ceaf to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 21, 2024
@bors
bors merged commit 453ceaf into rust-lang:masterApr 21, 2024
@rustbotrustbot added this to the 1.79.0 milestone Apr 21, 2024
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#MessagePerf Build Sha
#123379Print note with closure signature on type mismatch4cff725a21a1a367239a601a73519e505f5e28c1 (link)
#123967static_mut_refs: use raw pointers to remove the remaining F…026e322182717e648f48f0665b5d516ba5a028ce (link)
#123976Use fake libc in core test2ec6bbd49dd09e599188edc65d990a5d931c3a67 (link)
#123986lint-docs: Add redirects for renamed lints.0de5faf79590f971016aa480f0ee562352e29362 (link)
#124053coverage: Branch coverage tests for lazy boolean operatorsd840ef9edab0dfc2e74b45c258b39e6f068177a0 (link)
#124071Add llvm-bitcode-linker to build manifest7d5e9fdccb99bcce130fe115bb7db171fceba4d2 (link)
#124103Improve std::fs::Metadata Debug representation0c23aa4ea45a8db96fc9673bb4da7499d99f8f71 (link)
#124132llvm RustWrapper: explain OpBundlesIndirect argument typee7d2b0765bd83388de2294737a371facb939945d (link)
#124191Give a name to each distinct manipulation of pretty-printer…6bc83d8a448aeee400c56c0846065e25bba13419 (link)
#124196mir-opt tests: rename unit-test -> test-mir-pass5b141809e74adf9b81c8fde623fe5cbac1d11a67 (link)

previous master: dbce3b43b6

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (453ceaf): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.

meanrangecount
Regressions ❌
(primary)
0.3%[0.3%, 0.3%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-1.4%[-1.4%, -1.4%]1
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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-6.8%[-8.4%, -5.2%]2
Improvements ✅
(secondary)
--0
All ❌✅ (primary)-6.8%[-8.4%, -5.2%]2

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.

meanrangecount
Regressions ❌
(primary)
1.2%[1.2%, 1.2%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)1.2%[1.2%, 1.2%]1

Binary size

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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.2%[-0.2%, -0.2%]1
All ❌✅ (primary)--0

Bootstrap: 673.418s -> 671.572s (-0.27%)
Artifact size: 315.27 MiB -> 315.28 MiB (0.01%)

@jieyouxu
jieyouxu deleted the rollup-gbgpu4u branch April 21, 2024 14:30
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcmerged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11 participants

@jieyouxu@bors@rust-timer@rustbot@RalfJung@ChrisDenton@ehuss@Zalathar@kjetilkjeka@dtolnay@wutchzone