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

Move some driver code around #138786

Merged
merged 3 commits into from
Mar 23, 2025
Merged

Move some driver code around #138786

merged 3 commits into from
Mar 23, 2025

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Mar 21, 2025

--emit mir, #[rustc_symbol_name] and #[rustc_def_path] now run before codegen and thus work even if codegen fails. This can help with debugging.

bjorn3 added 2 commits March 21, 2025 13:21
`--emit mir`, `#[rustc_symbol_name]` and `#[rustc_def_path]` now run
before codegen and thus work even if codegen fails. This can help with
debugging.
@rustbot
Copy link
Collaborator

rustbot commented Mar 21, 2025

r? @estebank

rustbot has assigned @estebank.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Mar 21, 2025
@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Mar 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 21, 2025

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

// Hook for UI tests.
check_for_rustc_errors_attr(tcx);

// Don't run this test assertions when not doing codegen. Compiletest tries to build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment feels misplaced 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or at least I'm not seeing its point. Are the ui tests relying on //@ build-fail?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the attributes in report_symbol_names emit errors so //@ build-fail is necessary, which requires a check build to pass, thus necessitating this pass not to run in check mode.

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a fan of these changes, but I'm confused about one (preexisting) comment. r=me with or without fixing it.

// Hook for UI tests.
check_for_rustc_errors_attr(tcx);

// Don't run this test assertions when not doing codegen. Compiletest tries to build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or at least I'm not seeing its point. Are the ui tests relying on //@ build-fail?

@compiler-errors compiler-errors 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 Mar 21, 2025
@bjorn3
Copy link
Member Author

bjorn3 commented Mar 22, 2025

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Mar 22, 2025

📌 Commit cd929bf has been approved by compiler-errors

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 22, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 22, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#138018 (rustdoc: Use own logic to print `#[repr(..)]` attributes in JSON output.)
 - rust-lang#138294 (Mark some std tests as requiring `panic = "unwind"`)
 - rust-lang#138468 (rustdoc js: add nonnull helper and typecheck src-script.js)
 - rust-lang#138675 (Add release notes for 1.85.1)
 - rust-lang#138765 (Fix Thread::set_name on cygwin)
 - rust-lang#138786 (Move some driver code around)
 - rust-lang#138793 (target spec check: better error when llvm-floatabi is missing)
 - rust-lang#138822 (De-Stabilize `file_lock`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4457da3 into rust-lang:master Mar 23, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 23, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 23, 2025
Rollup merge of rust-lang#138786 - bjorn3:driver_code_move, r=compiler-errors

Move some driver code around

`--emit mir`, `#[rustc_symbol_name]` and `#[rustc_def_path]` now run before codegen and thus work even if codegen fails. This can help with debugging.
@bjorn3 bjorn3 deleted the driver_code_move branch March 23, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants