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 18 pull requests #120491

Merged
merged 47 commits into from
Jan 30, 2024
Merged

Rollup of 18 pull requests #120491

merged 47 commits into from
Jan 30, 2024

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

bjorn3 and others added 30 commits December 19, 2023 16:16
For consistency with normal functions.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Currently the documentation of `FileExt::seek_write` on Windows
indicates that writes beyond the end of the file leave intermediate
bytes uninitialized. This commentary dates back to the original
inclusion of these functions in rust-lang#35704 (wow blast from the past!). At
the time the functionality here was implemented using `WriteFile`, but
nowadays the `NtWriteFile` method is used instead. The documentation for
`NtWriteFile` explicitly states:

> If Length and ByteOffset specify a write operation past the current
> end-of-file mark, NtWriteFile automatically extends the file and updates
> the end-of-file mark; any bytes that are not explicitly written between
> such old and new end-of-file marks are defined to be zero.

This commentary has had a downstream impact in the `system-interface`
crate where it tries to handle this by explicitly writing zeros, but I
don't believe that's necessary any more. I'm sending a PR upstream here
to avoid future confusion and codify that zeros are written in the
intermediate bytes matching what Windows currently provides.
Because it can be used for a lifetime or a label.
…r literal.

Currently the parser will interpret any label/lifetime in certain
positions as a mistyped char literal, on the assumption that the
trailing single quote was accidentally omitted. This is reasonable for a
something like 'a (because 'a' would be valid) but not reasonable for a
something like 'abc (because 'abc' is not valid).

This commit restricts this behaviour only to labels/lifetimes that would
be valid char literals, via the new `could_be_unclosed_char_literal`
function. The commit also augments the `label-is-actually-char.rs` test
in a couple of ways:
- Adds testing of labels/lifetimes with identifiers longer than one
  char, e.g. 'abc.
- Adds a new match with simpler patterns, because the
  `recover_unclosed_char` call in `parse_pat_with_range_pat` was not
  being exercised (in this test or any other ui tests).

Fixes rust-lang#120397, an assertion failure, which was caused by this behaviour
in the parser interacting with some new stricter char literal checking
added in rust-lang#120329.
Issue tests numbered 1920, 3668, 5997, 23302, 32122, 40510, 57741, 71676, and 76077 were moved to relevant better-named subdirectories. ISSUES_ENTRY_LIMIT was adjusted to match new number of files and FIXME note was expanded.
Because it's almost always static.

This makes `impl IntoDiagnosticArg for DiagnosticArgValue` trivial,
which is nice.

There are a few diagnostics constructed in
`compiler/rustc_mir_build/src/check_unsafety.rs` and
`compiler/rustc_mir_transform/src/errors.rs` that now need symbols
converted to `String` with `to_string` instead of `&str` with `as_str`,
but that' no big deal, and worth it for the simplifications elsewhere.
Because the `&'a str` fields can be trivially converted to `String`
without causing any extra allocations.
It's identical to the one in `rustc_errors`; use that instead.

Also remove some `rustc_errors::` qualifiers.
Because it's always 'static.
Because it's always static.

I'm surprised the compiler allowed this unused lifetime without any
complaint.
…=Nilstrieb

Add triagebot mentions entry for simd intrinsics

Fixes rust-lang#119119

cc `@antoyo,` `@GuillaumeGomez,` `@rust-lang/project-portable-simd`
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic O-windows Operating system: Windows 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 30, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Jan 30, 2024

📌 Commit f99b510 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors 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 Jan 30, 2024
@Nilstrieb
Copy link
Member

going all in

@chenyukang
Copy link
Member

chenyukang commented Jan 30, 2024

@Nilstrieb @GuillaumeGomez
do you know how to resolve this homu timeout issue? 😅
#118533

@GuillaumeGomez
Copy link
Member Author

@Nilstrieb: No time to lose! 🚀

@chenyukang: Doing a retry like what was done. Not much else that can be done as far as I know...

@bors
Copy link
Contributor

bors commented Jan 30, 2024

⌛ Testing commit f99b510 with merge 5ad7454...

@bors
Copy link
Contributor

bors commented Jan 30, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 5ad7454 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 30, 2024
@bors bors merged commit 5ad7454 into rust-lang:master Jan 30, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 30, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#119123 Add triagebot mentions entry for simd intrinsics 5fc26ebef246ef49c2e50546c9995c5b49e1aa60 (link)
#119991 Reject infinitely-sized reads from io::Repeat dbe8c46246d5329c79b2712b33fbb2a91584e948 (link)
#120172 bootstrap: add more unit tests 53049329d66e26424c979a3226090363c25fbd32 (link)
#120250 rustdoc: Prevent JS injection from localStorage 59aba6cade7d91846d1c469ceb5f70c1b3e3ce64 (link)
#120376 Update codegen test for LLVM 18 87b53c211c21334a47f530e47c9ab8e0a694ebc5 (link)
#120387 interpret/memory: fix safety comment for large array memset… 4421fadaa932fce454854d57e67f425ca33c6c45 (link)
#120400 Bound errors span label cleanup 88a5ece18a1e91fc3e792ef7e8f3be247f20a8aa (link)
#120402 Make the coroutine def id of an async closure the child of … 422e271bd7e10e413f06574bd6a37e04bce51608 (link)
#120403 Add instructions of how to use pre-vendored 'rustc-src' 4c2184ebac3046fe8194561b3ae168212f904a1c (link)
#120424 raw pointer metadata API: data address -> data pointer 662a497b6b8c92875f5c7234b74a5063d0e6058f (link)
#120425 Remove unnecessary unit returns in query declarations c692c8fb81ec55060fb812d67ec47201f5a0339e (link)
#120439 Move UI issue tests to subdirectories 9c695b5d8897d75660868b559303487098900dda (link)
#120443 Fixes footnote handling in rustdoc 2922ca67c0539b071da839cb65a31f37484ef873 (link)
#120452 std: Update documentation of seek_write on Windows b5ccecbc734c24851cc7532077a05635d8b5df31 (link)
#120460 Be more careful about interpreting a label/lifetime as a mi… d02a140e3e6c80343b921435da38c71e03e34998 (link)
#120464 Add matthewjasper to some review groups 8c4d847973bd977ad040b276417a0e73da734c22 (link)
#120467 Update books 48c550d7727a47d9fd2dc51287447d5cb47c5fc6 (link)
#120488 Diagnostic lifetimes cleanups f452d04058ce2c57473a01676505e6ed7a6f056c (link)

previous master: c401f09979

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
Collaborator

Finished benchmarking commit (5ad7454): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

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)
2.9% [1.7%, 4.5%] 7
Regressions ❌
(secondary)
3.1% [0.8%, 7.1%] 48
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [1.7%, 4.5%] 7

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.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 660.86s -> 662.13s (0.19%)
Artifact size: 308.08 MiB -> 308.08 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues about the rust-lang/rust repository. A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows 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. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet