-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #116742 - GuillaumeGomez:rollup-xjxs0mr, r=GuillaumeGomez
Rollup of 3 pull requests Successful merges: - #116540 (Implement `OnceCell/Lock::try_insert()`) - #116576 (const-eval: allow calling functions with targat features disabled at compile time in WASM) - #116661 (Make "request changes" reviews apply `S-waiting-on-author`) Failed merges: - #116643 (x.py zsh completion support) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
7 changed files
with
116 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/tools/miri/tests/pass/function_calls/target_feature_wasm.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//@only-target-wasm32: tests WASM-specific behavior | ||
//@compile-flags: -C target-feature=-simd128 | ||
|
||
fn main() { | ||
// Calling functions with `#[target_feature]` is not unsound on WASM, see #84988 | ||
assert!(!cfg!(target_feature = "simd128")); | ||
simd128_fn(); | ||
} | ||
|
||
#[target_feature(enable = "simd128")] | ||
fn simd128_fn() {} |
14 changes: 14 additions & 0 deletions
14
tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// only-wasm32 | ||
// compile-flags:-C target-feature=-simd128 | ||
// build-pass | ||
|
||
#![crate_type = "lib"] | ||
|
||
#[cfg(target_feature = "simd128")] | ||
compile_error!("simd128 target feature should be disabled"); | ||
|
||
// Calling functions with `#[target_feature]` is not unsound on WASM, see #84988 | ||
const A: () = simd128_fn(); | ||
|
||
#[target_feature(enable = "simd128")] | ||
const fn simd128_fn() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters