Print list of missing target features when calling a function with target features outside an unsafe block#118333
Print list of missing target features when calling a function with target features outside an unsafe block#118333bors merged 2 commits intorust-lang:masterfrom eduardosm:print-missing-target-features
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.
| /// caller's `#[target_feature]` | |
| /// caller's `#[target_feature]`. |
est31
left a comment
There was a problem hiding this comment.
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 |
|
@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