-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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_pass_by_value]
cleanup
#93363
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@@ -61,6 +61,9 @@ use rustc_data_structures::fx::FxIndexSet; | |||
/// using the callback `SPAN_TRACK` to access the query engine. | |||
/// | |||
#[derive(Clone, Copy, Eq, PartialEq, Hash)] | |||
// FIXME(@lcnr): Enable this attribute once the bootstrap | |||
// compiler knows of `rustc_pass_by_value`. | |||
// #[cfg_attr(not(bootstrap), rustc_pass_by_value)] |
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.
// #[cfg_attr(not(bootstrap), rustc_pass_by_value)] | |
#[cfg_attr(not(bootstrap), rustc_pass_by_value)] |
Why doesn't this work? Isn't not(bootstrap)
supposed to specifically address this case?
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.
&Span
is used incredibly frequently, so fixing it takes a while. As long as rustc_pass_by_value
is ignored in the bootstrap compiler, it isn't as nice to deal with that.
It means that the lint will only trigger when compiling the stage 2 compiler, which most people don't tend to do before submitting their PR, causing CI to break. So it would work, but would imo be too annoying to be worth it.
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.
Could you say in the comment that not all uses of Span
are fixed, and it's tedious to fix them until it can be done at stage 0-1 when stage 0-1 supports #[rustc_pass_by_value]
?
Right now it's entirely unclear from the comment why the attribute is commented out.
r=me with the comment extended (#93363 (comment)). |
@bors r=petrochenkov rollup=always |
📌 Commit 2684dfe has been approved by |
why does CI segfault here and in #93267? that seems weird 🤔 cc @rust-lang/infra do you know what's going on here?
|
…askrgr Rollup of 8 pull requests Successful merges: - rust-lang#91641 (Define c_char using cfg_if rather than repeating 40-line cfg) - rust-lang#92899 (Mention std::iter::zip in Iterator::zip docs) - rust-lang#93193 (Add test for stable hash uniqueness of adjacent field values) - rust-lang#93325 (Introduce a limit to Levenshtein distance computation) - rust-lang#93339 (rustdoc: add test case for multiple traits and erased names) - rust-lang#93357 (Clarify the `usage-of-qualified-ty` error message.) - rust-lang#93363 (`#[rustc_pass_by_value]` cleanup) - rust-lang#93365 (More arena cleanups) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
No description provided.