-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These passed before 02cd324.
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// build-fail | ||
|
||
use spirv_std::spirv; | ||
|
||
#[derive(Default)] | ||
struct Foo { | ||
bar: bool, | ||
baz: [[u32; 2]; 1], | ||
} | ||
|
||
#[spirv(fragment)] | ||
pub fn main() { | ||
let x = [[1; 2]; 1]; | ||
let y = [Foo::default(); 1]; | ||
} |
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,40 @@ | ||
error: cannot cast between pointer types | ||
from `*i32` | ||
to `*[i32; 2]` | ||
--> $DIR/issue-46.rs:13:13 | ||
| | ||
13 | let x = [[1; 2]; 1]; | ||
| ^^^^^^^^^^^ | ||
| | ||
note: used from within `issue_46::main` | ||
--> $DIR/issue-46.rs:13:13 | ||
| | ||
13 | let x = [[1; 2]; 1]; | ||
| ^^^^^^^^^^^ | ||
note: called by `main` | ||
--> $DIR/issue-46.rs:12:8 | ||
| | ||
12 | pub fn main() { | ||
| ^^^^ | ||
|
||
error: cannot cast between pointer types | ||
from `*[[u32; 2]; 1]` | ||
to `*struct Foo { baz: [[u32; 2]; 1], bar: bool }` | ||
--> $DIR/issue-46.rs:14:13 | ||
| | ||
14 | let y = [Foo::default(); 1]; | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: used from within `issue_46::main` | ||
--> $DIR/issue-46.rs:14:13 | ||
| | ||
14 | let y = [Foo::default(); 1]; | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
note: called by `main` | ||
--> $DIR/issue-46.rs:12:8 | ||
| | ||
12 | pub fn main() { | ||
| ^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|