forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#66774 - GuillaumeGomez:cleanup-err-codes-2,…
… r=Dylan-DPC Clean up error codes r? @Dylan-DPC
- Loading branch information
Showing
5 changed files
with
44 additions
and
33 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,21 +1,23 @@ | ||
The `#[simd]` attribute can only be applied to non empty tuple structs, because | ||
it doesn't make sense to try to use SIMD operations when there are no values to | ||
operate on. | ||
A `#[simd]` attribute was applied to an empty tuple struct. | ||
|
||
This will cause an error: | ||
Erroneous code example: | ||
|
||
```compile_fail,E0075 | ||
#![feature(repr_simd)] | ||
#[repr(simd)] | ||
struct Bad; | ||
struct Bad; // error! | ||
``` | ||
|
||
This will not: | ||
The `#[simd]` attribute can only be applied to non empty tuple structs, because | ||
it doesn't make sense to try to use SIMD operations when there are no values to | ||
operate on. | ||
|
||
Fixed example: | ||
|
||
``` | ||
#![feature(repr_simd)] | ||
#[repr(simd)] | ||
struct Good(u32); | ||
struct Good(u32); // ok! | ||
``` |
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,21 +1,24 @@ | ||
When using the `#[simd]` attribute to automatically use SIMD operations in tuple | ||
struct, the types in the struct must all be of the same type, or the compiler | ||
will trigger this error. | ||
All types in a tuple struct aren't the same when using the `#[simd]` | ||
attribute. | ||
|
||
This will cause an error: | ||
Erroneous code example: | ||
|
||
```compile_fail,E0076 | ||
#![feature(repr_simd)] | ||
#[repr(simd)] | ||
struct Bad(u16, u32, u32); | ||
struct Bad(u16, u32, u32); // error! | ||
``` | ||
|
||
This will not: | ||
When using the `#[simd]` attribute to automatically use SIMD operations in tuple | ||
struct, the types in the struct must all be of the same type, or the compiler | ||
will trigger this error. | ||
|
||
Fixed example: | ||
|
||
``` | ||
#![feature(repr_simd)] | ||
#[repr(simd)] | ||
struct Good(u32, u32, u32); | ||
struct Good(u32, u32, u32); // ok! | ||
``` |
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,20 +1,23 @@ | ||
When using the `#[simd]` attribute on a tuple struct, the elements in the tuple | ||
must be machine types so SIMD operations can be applied to them. | ||
A tuple struct's element isn't a machine type when using the `#[simd]` | ||
attribute. | ||
|
||
This will cause an error: | ||
Erroneous code example: | ||
|
||
```compile_fail,E0077 | ||
#![feature(repr_simd)] | ||
#[repr(simd)] | ||
struct Bad(String); | ||
struct Bad(String); // error! | ||
``` | ||
|
||
This will not: | ||
When using the `#[simd]` attribute on a tuple struct, the elements in the tuple | ||
must be machine types so SIMD operations can be applied to them. | ||
|
||
Fixed example: | ||
|
||
``` | ||
#![feature(repr_simd)] | ||
#[repr(simd)] | ||
struct Good(u32, u32, u32); | ||
struct Good(u32, u32, u32); // ok! | ||
``` |