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 9 pull requests #128575

Closed
wants to merge 40 commits into from
Closed

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Aug 2, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

EtomicBomb and others added 30 commits July 29, 2024 14:33
It has a single use. This makes the `let` handling case in
`parse_stmt_without_recovery` more similar to the statement path and
statement expression cases.
`parse_expr_assoc_with` has an awkward structure -- sometimes the lhs is
already parsed. This commit splits the post-lhs part into a new method
`parse_expr_assoc_rest_with`, which makes everything shorter and
simpler.
It can be done more concisely.
When collecting tokens there are two kinds of range:
- a range relative to the parser's full token stream (which we get when
  we are parsing);
- a range relative to a single AST node's token stream (which we use
  within `LazyAttrTokenStreamImpl` when replacing tokens).

These are currently both represented with `Range<u32>` and it's easy to
mix them up -- until now I hadn't properly understood the difference.

This commit introduces `ParserRange` and `NodeRange` to distinguish
them. This also requires splitting `ReplaceRange` in two, giving the new
types `ParserReplacement` and `NodeReplacement`. (These latter two names
reduce the overloading of the word "range".)

The commit also rewrites some comments to be clearer.

The end result is a little more verbose, but much clearer.
…3, r=petrochenkov"

This reverts commit 91b18a0, reversing
changes made to 9aedec9.
…nce, r=pnkfelix"

This reverts commit a70dc29, reversing
changes made to ceae371.
…nce-2, r=pnkfelix"

This reverts commit 31fe962, reversing
changes made to f203078.
…nce, r=pnkfelix"

This reverts commit 2724aea, reversing
changes made to d929a42.
…9, r=petrochenkov"

This reverts commit 977c5fd, reversing
changes made to 24c94f0.
…nce, r=pnkfelix"

This reverts commit 13314df, reversing
changes made to 6e534c7.
Add the feature in `core/lib.rs`
The one use of it was guaranteed to be always true.
…hanges, r=pnkfelix

Revert recent changes to dead code analysis

This is a revert to recent changes to dead code analysis, namely:
* efdf219 Rollup merge of rust-lang#128104 - mu001999-contrib:fix/128053, r=petrochenkov
* a70dc29 Rollup merge of rust-lang#127017 - mu001999-contrib:dead/enhance, r=pnkfelix
* 31fe962 Rollup merge of rust-lang#127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix
* 2724aea Rollup merge of rust-lang#126618 - mu001999-contrib:dead/enhance, r=pnkfelix
* 977c5fd Rollup merge of rust-lang#126315 - mu001999-contrib:fix/126289, r=petrochenkov
* 13314df Rollup merge of rust-lang#125572 - mu001999-contrib:dead/enhance, r=pnkfelix

There is an additional change stacked on top, which suppresses false-negatives that were masked by this work. I believe the functions that are touched in that code are legitimately unused functions and the types are not reachable since this `AnonPipe` type is not publically reachable -- please correct me if I'm wrong cc ```@NobodyXu``` who added these in #rust-lang#127153.

Some of these reverts (rust-lang#126315 and rust-lang#126618) are only included because it makes the revert apply cleanly, and I think these changes were only done to fix follow-ups from the other PRs?

I apologize for the size of the PR and the churn that it has on the codebase (and for reverting ```@mu001999's``` work here), but I'm putting this PR up because I am concerned that we're making ad-hoc changes to fix bugs that are fallout of these PRs, and I'd like to see these changes reimplemented in a way that's more separable from the existing dead code pass. I am happy to review any code to reapply these changes in a more separable way.

cc ```@mu001999```
r? ```@pnkfelix```

Fixes rust-lang#128272
Fixes rust-lang#126169
…s, r=petrochenkov

Still more `cfg` cleanups

Found while looking closely at `cfg`/`cfg_attr` processing code.

r? ```````@petrochenkov```````
…e-this-cpuid-move-along, r=Amanieu

Finish removing `has_cpuid`

The one use of it was guaranteed to be always true.

try-job: test-various
chore: use shorthand initializer

Tiny readability improvement - don't use redundant initializer vars
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like 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 Aug 2, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Aug 2, 2024

Burrito looks iffy, but let's give it a try anyway.
@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Aug 2, 2024

📌 Commit 2d4f3ea has been approved by jieyouxu

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 Aug 2, 2024
@bors
Copy link
Contributor

bors commented Aug 2, 2024

⌛ Testing commit 2d4f3ea with merge efc8b46...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2024
Rollup of 9 pull requests

Successful merges:

 - rust-lang#126704 (Added SHA512, SM3, SM4 target-features and `sha512_sm_x86` feature gate)
 - rust-lang#127095 (Migrate `reproducible-build-2` and `stable-symbol-names` `run-make` tests to rmake)
 - rust-lang#128107 (Migrate `raw-dylib-alt-calling-convention`, `raw-dylib-c` and `redundant-libs` `run-make` tests to rmake)
 - rust-lang#128161 (nested aux-build in tests/rustdoc/ tests)
 - rust-lang#128356 (Migrate `cross-lang-lto-clang` and `cross-lang-lto-pgo-smoketest` `run-make` tests to rmake)
 - rust-lang#128404 (Revert recent changes to dead code analysis)
 - rust-lang#128483 (Still more `cfg` cleanups)
 - rust-lang#128528 (Finish removing `has_cpuid`)
 - rust-lang#128557 (chore: use shorthand initializer)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job i686-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [rustdoc] tests\rustdoc\doctest\doctest-markdown-trailing-docblock-48377.rs ... ok
test [rustdoc] tests\rustdoc\doctest\doctest-multi-line-string-literal-25944.rs ... ok
test [rustdoc] tests\rustdoc\doctest\doctest-ignore-32556.rs ... ok
test [rustdoc] tests\rustdoc\doctest\doctest-escape-boring-41783.rs ... ok
test [rustdoc] tests\rustdoc\cross-crate-info\kitchen-sink\i.rs ... ok
test [rustdoc] tests\rustdoc\document-item-with-associated-const-in-where-clause.rs ... ok
test [rustdoc] tests\rustdoc\double-quote-escape.rs ... ok
test [rustdoc] tests\rustdoc\double-hyphen-to-dash.rs ... ok
test [rustdoc] tests\rustdoc\duplicate-cfg.rs ... ok
---
---- [run-make] tests\run-make\raw-dylib-alt-calling-convention stdout ----

error: rmake recipe failed to complete
status: exit code: 101
command: "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\run-make\\raw-dylib-alt-calling-convention\\rmake.exe"
--- stderr -------------------------------
thread 'main' panicked at C:\a\rust\rust\tests\run-make\raw-dylib-alt-calling-convention\rmake.rs:23:67:
test failed: `output.txt` is different from `actual`


--- output.txt
+++ actual
@@ -1,18 +1,18 @@
-stdcall_fn_1(14)
-stdcall_fn_2(16, 3.5)
-stdcall_fn_3(3.5)
-stdcall_fn_4(1, 2, 3.0)
-stdcall_fn_5(S { x: 1, y: 2 }, 16)
-stdcall_fn_6(S { x: 10, y: 12 })
-stdcall_fn_7(S2 { x: 15, y: 16 }, 3)
-stdcall_fn_8(S3 { x: [1, 2, 3, 4, 5] }, S3 { x: [6, 7, 8, 9, 10] })
-stdcall_fn_9(1, 3.0)
-stdcall_fn_10(19)
-fastcall_fn_1(14)
-fastcall_fn_2(16, 3.5)
-fastcall_fn_3(3.5)
-fastcall_fn_4(1, 2, 3.0)
-fastcall_fn_6(S { x: 10, y: 12 })
-fastcall_fn_8(S3 { x: [1, 2, 3, 4, 5] }, S3 { x: [6, 7, 8, 9, 10] })
-fastcall_fn_9(1, 3.0)
-fastcall_fn_10(19)
+stdcall_fn_1(14)
+stdcall_fn_2(16, 3.5)
+stdcall_fn_3(3.5)
+stdcall_fn_4(1, 2, 3.0)
+stdcall_fn_5(S { x: 1, y: 2 }, 16)
+stdcall_fn_6(S { x: 10, y: 12 })
+stdcall_fn_7(S2 { x: 15, y: 16 }, 3)
+stdcall_fn_8(S3 { x: [1, 2, 3, 4, 5] }, S3 { x: [6, 7, 8, 9, 10] })
+stdcall_fn_9(1, 3.0)
+stdcall_fn_10(19)
+fastcall_fn_1(14)
+fastcall_fn_2(16, 3.5)
+fastcall_fn_3(3.5)
+fastcall_fn_4(1, 2, 3.0)
+fastcall_fn_6(S { x: 10, y: 12 })
+fastcall_fn_8(S3 { x: [1, 2, 3, 4, 5] }, S3 { x: [6, 7, 8, 9, 10] })
+fastcall_fn_9(1, 3.0)
+fastcall_fn_10(19)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------


---
test result: FAILED. 254 passed; 1 failed; 97 ignored; 0 measured; 0 filtered out; finished in 81.45s

Some tests failed in compiletest suite=run-make mode=run-make host=i686-pc-windows-msvc target=i686-pc-windows-msvc
Build completed unsuccessfully in 1:35:05
make: *** [Makefile:102: ci-msvc-ps1] Error 1
  network time: Sat, 03 Aug 2024 00:16:17 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Contributor

bors commented Aug 3, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 3, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Aug 3, 2024

@bors r-

@jieyouxu jieyouxu closed this Aug 3, 2024
@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 3, 2024
@jieyouxu jieyouxu deleted the rollup-wet6vjy branch August 3, 2024 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.