-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Move some driver code around #138786
Conversation
`--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.
Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
// Hook for UI tests. | ||
check_for_rustc_errors_attr(tcx); | ||
|
||
// Don't run this test assertions when not doing codegen. Compiletest tries to build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment feels misplaced 🤔
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
?
@bors r=compiler-errors |
…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
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.
--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.