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

rustc_session: remove dead code from check_expected_reuse() #105865

Closed

Conversation

matthiaskrgr
Copy link
Member

looks like we construct this IncorrectCguReuseType but actually never do anything with it. So by skipping that, we can actually remove half the function which is a bit weird... 😅

@rustbot
Copy link
Collaborator

rustbot commented Dec 18, 2022

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 18, 2022
@compiler-errors
Copy link
Member

This is an error that was created but not emitted in #100753. This needs to be wrapped in a sess.emit_err(IncorrectCguReuseType { ... }).

@compiler-errors
Copy link
Member

It's a shame that no UI test actually pointed at this change, but this also looks like an internal error so I'm unsurprised.

@cjgillot
Copy link
Contributor

cjgillot commented Jan 7, 2023

Thanks @matthiaskrgr. Could you try and make a test for it? There are already cgu-reuse tests in src/test/incremental.
@bors r+

@bors
Copy link
Contributor

bors commented Jan 7, 2023

📌 Commit c3415d4 has been approved by cjgillot

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

bors commented Jan 7, 2023

⌛ Testing commit c3415d4 with merge 97e767941d3332218a4be60f64d907c7574344e9...

@bors
Copy link
Contributor

bors commented Jan 7, 2023

💔 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 Jan 7, 2023
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-13-stage1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=incremental mode=incremental host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu

---- [incremental] src/test/incremental/thinlto/cgu_keeps_identical_fn.rs stdout ----

error in revision `cfail2`: test compilation failed although it shouldn't!
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/checkout/src/test/incremental/thinlto/cgu_keeps_identical_fn.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "cfail2" "-C" "incremental=/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/thinlto/cgu_keeps_identical_fn/cgu_keeps_identical_fn.inc" "-Z" "incremental-verify-ich" "-O" "--error-format" "json" "--json" "future-incompat" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/thinlto/cgu_keeps_identical_fn" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/thinlto/cgu_keeps_identical_fn/auxiliary" "-Z" "query-dep-graph" "-O"
stdout: none
--- stderr -------------------------------
error: CGU-reuse for `cgu_keeps_identical_fn-foo` is `PostLto ` but should be `No`
   |
   |
LL | #![rustc_expected_cgu_reuse(module = "cgu_keeps_identical_fn-foo", cfg = "cfail2", kind = "no")]

error: aborting due to previous error
------------------------------------------

@ehuss
Copy link
Contributor

ehuss commented Jan 11, 2023

@bors r-

bors resync doesn't track failures

@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 Jan 11, 2023
@JohnCSimon
Copy link
Member

@matthiaskrgr Ping from triage: Can you post your status on this PR? This has sat idle for a few months.

@Dylan-DPC
Copy link
Member

Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks

@Dylan-DPC Dylan-DPC closed this Jul 31, 2023
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 31, 2023
@matthiaskrgr matthiaskrgr deleted the cgu_reuse_dead_code branch January 25, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants