-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Print list of missing target features when calling a function with target features outside an unsafe block #118333
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Print list of missing target features when calling a function with target features outside an unsafe block #118333
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
CallToFunctionWith, | ||
CallToFunctionWith { | ||
/// Target features enabled in callee's `#[target_feature]` but missing in | ||
/// caller's `#[target_feature]` |
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.
/// caller's `#[target_feature]` | |
/// caller's `#[target_feature]`. |
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.
Thanks for filing!
LGTM except one question: could you add something to the existing test that excercises the mir_transform_target_feature_call_note
case with multiple target features? Because right now, there is only tests for one.
…rget features outside an unsafe block
Done. I just learned about |
Yeah good point, we'd want that change be present there, too. So the .thir.stderr file should have the same changes in the end as .mir.stderr, ideally. |
…unction with target features outside an unsafe block
Done, also added a test to cover the case of an unsafe function with a |
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.
Great work, thank you!
@bors r+ |
…tures, r=est31 Print list of missing target features when calling a function with target features outside an unsafe block Fixes rust-lang#108680 Supersedes rust-lang#109710. I used the same wording for the messages, but the implementation is different. r? `@est31`
…tures, r=est31 Print list of missing target features when calling a function with target features outside an unsafe block Fixes rust-lang#108680 Supersedes rust-lang#109710. I used the same wording for the messages, but the implementation is different. r? ``@est31``
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#118157 (Add `never_patterns` feature gate) - rust-lang#118191 (Suggest `let` or `==` on typo'd let-chain) - rust-lang#118231 (also add is_empty to const raw slices) - rust-lang#118333 (Print list of missing target features when calling a function with target features outside an unsafe block) - rust-lang#118426 (ConstProp: Correctly remove const if unknown value assigned to it.) - rust-lang#118428 (rustdoc: Move `AssocItemRender` and `RenderMode` to `html::render`.) - rust-lang#118438 (Update nto-qnx.md) Failed merges: - rust-lang#118268 (Pretty print `Fn<(..., ...)>` trait refs with parentheses (almost) always) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#118333 - eduardosm:print-missing-target-features, r=est31 Print list of missing target features when calling a function with target features outside an unsafe block Fixes rust-lang#108680 Supersedes rust-lang#109710. I used the same wording for the messages, but the implementation is different. r? `@est31`
Fixes #108680
Supersedes #109710. I used the same wording for the messages, but the implementation is different.
r? @est31