-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify why a type is rejected for asm!
- Loading branch information
Showing
3 changed files
with
85 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
error: cannot use value of type `Foo<C>` for inline assembly | ||
--> $DIR/generic_const_simd_vec_len.rs:13:27 | ||
error: cannot evaluate SIMD vector length `C` | ||
--> $DIR/generic_const_simd_vec_len.rs:10:32 | ||
| | ||
LL | pub struct Foo<const C: usize>([u8; C]); | ||
| ^^^^^^^ | ||
| | ||
note: SIMD vector length needs to be known statically for use in `asm!` | ||
--> $DIR/generic_const_simd_vec_len.rs:16:27 | ||
| | ||
LL | src = in(xmm_reg) a, | ||
| ^ | ||
| | ||
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly | ||
|
||
error: aborting due to 1 previous error | ||
|