Skip to content

Commit 50d28ce

Browse files
committed
location assignment: bless other compiletests
1 parent 7329767 commit 50d28ce

File tree

6 files changed

+49
-25
lines changed

6 files changed

+49
-25
lines changed

tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.stderr

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,11 @@ LL | #![feature(ptr_internals)]
77
= note: using it is strongly discouraged
88
= note: `#[warn(internal_features)]` on by default
99

10-
error: pointer has non-null integer address
11-
|
12-
note: used from within `allocate_const_scalar::main`
13-
--> $DIR/allocate_const_scalar.rs:16:5
14-
|
15-
LL | *output = POINTER;
16-
| ^^^^^^^^^^^^^^^^^
17-
note: called by `main`
18-
--> $DIR/allocate_const_scalar.rs:15:8
10+
error: Type not supported in Input or Output declarations
11+
--> $DIR/allocate_const_scalar.rs:15:21
1912
|
2013
LL | pub fn main(output: &mut Unique<()>) {
21-
| ^^^^
14+
| ^^^^^^^^^^^^^^^
2215

2316
error: aborting due to 1 previous error; 1 warning emitted
2417

tests/compiletests/ui/spirv-attr/bad-deduce-storage-class.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ use spirv_std::{Image, spirv};
55

66
#[spirv(vertex)]
77
pub fn main(
8-
#[spirv(uniform)] error: &Image!(2D, type=f32),
9-
#[spirv(uniform_constant)] warning: &Image!(2D, type=f32),
8+
#[spirv(descriptor_set = 0, binding = 0, uniform)] error: &Image!(2D, type=f32),
9+
#[spirv(descriptor_set = 0, binding = 1, uniform_constant)] warning: &Image!(2D, type=f32),
1010
) {
1111
}
1212

1313
// https://github.com/EmbarkStudios/rust-gpu/issues/585
1414
#[spirv(vertex)]
15-
pub fn issue_585(invalid: Image!(2D, type=f32)) {}
15+
pub fn issue_585(#[spirv(descriptor_set = 0, binding = 0)] invalid: Image!(2D, type=f32)) {}

tests/compiletests/ui/spirv-attr/bad-deduce-storage-class.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
error: storage class mismatch
22
--> $DIR/bad-deduce-storage-class.rs:8:5
33
|
4-
LL | #[spirv(uniform)] error: &Image!(2D, type=f32),
5-
| ^^^^^^^^-------^^^^^^^^^^---------------------
6-
| | |
7-
| | `UniformConstant` deduced from type
8-
| `Uniform` specified in attribute
4+
LL | #[spirv(descriptor_set = 0, binding = 0, uniform)] error: &Image!(2D, type=f32),
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^^^^^^^^^^---------------------
6+
| | |
7+
| | `UniformConstant` deduced from type
8+
| `Uniform` specified in attribute
99
|
1010
= help: remove storage class attribute to use `UniformConstant` as storage class
1111

1212
warning: redundant storage class attribute, storage class is deduced from type
13-
--> $DIR/bad-deduce-storage-class.rs:9:13
13+
--> $DIR/bad-deduce-storage-class.rs:9:46
1414
|
15-
LL | #[spirv(uniform_constant)] warning: &Image!(2D, type=f32),
16-
| ^^^^^^^^^^^^^^^^
15+
LL | #[spirv(descriptor_set = 0, binding = 1, uniform_constant)] warning: &Image!(2D, type=f32),
16+
| ^^^^^^^^^^^^^^^^
1717

1818
error: entry parameter type must be by-reference: `&spirv_std::image::Image<f32, 1, 2, 0, 0, 0, 0, 4>`
19-
--> $DIR/bad-deduce-storage-class.rs:15:27
19+
--> $DIR/bad-deduce-storage-class.rs:15:69
2020
|
21-
LL | pub fn issue_585(invalid: Image!(2D, type=f32)) {}
22-
| ^^^^^^^^^^^^^^^^^^^^
21+
LL | pub fn issue_585(#[spirv(descriptor_set = 0, binding = 0)] invalid: Image!(2D, type=f32)) {}
22+
| ^^^^^^^^^^^^^^^^^^^^
2323
|
2424
= note: this error originates in the macro `Image` (in Nightly builds, run with -Z macro-backtrace for more info)
2525

tests/compiletests/ui/spirv-attr/bool-inputs-err.stderr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,24 @@ error: entry-point parameter cannot contain `bool`s
44
LL | input: bool,
55
| ^^^^
66

7+
error: Type not supported in Input or Output declarations
8+
--> $DIR/bool-inputs-err.rs:13:12
9+
|
10+
LL | input: bool,
11+
| ^^^^
12+
713
error: entry-point parameter cannot contain `bool`s
814
--> $DIR/bool-inputs-err.rs:14:13
915
|
1016
LL | output: &mut bool,
1117
| ^^^^^^^^^
1218

19+
error: Type not supported in Input or Output declarations
20+
--> $DIR/bool-inputs-err.rs:14:13
21+
|
22+
LL | output: &mut bool,
23+
| ^^^^^^^^^
24+
1325
error: entry-point parameter cannot contain `bool`s
1426
--> $DIR/bool-inputs-err.rs:15:35
1527
|
@@ -22,5 +34,5 @@ error: entry-point parameter cannot contain `bool`s
2234
LL | #[spirv(uniform)] uniform: &Boolthing,
2335
| ^^^^^^^^^^
2436

25-
error: aborting due to 4 previous errors
37+
error: aborting due to 6 previous errors
2638

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// build-pass
2+
3+
use spirv_std::image::Image2d;
4+
use spirv_std::spirv;
5+
6+
#[spirv(vertex)]
7+
pub fn main(
8+
#[spirv(descriptor_set = 0, binding = 0)] implicit: &Image2d,
9+
#[spirv(descriptor_set = 0, binding = 1, uniform_constant)] explicit: &Image2d,
10+
) {
11+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
warning: redundant storage class attribute, storage class is deduced from type
2+
--> $DIR/uniform-constant-storage-class.rs:9:46
3+
|
4+
LL | #[spirv(descriptor_set = 0, binding = 1, uniform_constant)] explicit: &Image2d,
5+
| ^^^^^^^^^^^^^^^^
6+
7+
warning: 1 warning emitted
8+

0 commit comments

Comments
 (0)