Skip to content

Commit 84ca758

Browse files
committed
tests: ui: compile-fail: fix stderr
1 parent 7413d9c commit 84ca758

6 files changed

Lines changed: 33 additions & 0 deletions

File tree

tests/ui/compile-fail/init/colon_instead_of_arrow.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ error[E0308]: mismatched types
1414
found opaque type `impl pinned_init::PinInit<Bar>`
1515
note: function defined here
1616
--> $RUST/core/src/ptr/mod.rs
17+
|
18+
| pub const unsafe fn write<T>(dst: *mut T, src: T) {
19+
| ^^^^^
1720
= note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `pin_init` (in Nightly builds, run with -Z macro-backtrace for more info)

tests/ui/compile-fail/init/field_value_wrong_type.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ error[E0308]: mismatched types
99
|
1010
note: function defined here
1111
--> $RUST/core/src/ptr/mod.rs
12+
|
13+
| pub const unsafe fn write<T>(dst: *mut T, src: T) {
14+
| ^^^^^
1215
= note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `init` (in Nightly builds, run with -Z macro-backtrace for more info)

tests/ui/compile-fail/init/missing_comma_with_zeroable.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ error[E0308]: mismatched types
3131
found struct `std::ops::Range<{integer}>`
3232
note: function defined here
3333
--> $RUST/core/src/ptr/mod.rs
34+
|
35+
| pub const unsafe fn write<T>(dst: *mut T, src: T) {
36+
| ^^^^^
3437
= note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `init` (in Nightly builds, run with -Z macro-backtrace for more info)
3538

3639
error[E0063]: missing field `b` in initializer of `Foo`

tests/ui/compile-fail/init/wrong_generics2.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
7171
|
7272
note: function defined here
7373
--> $RUST/core/src/ptr/mod.rs
74+
|
75+
| pub const unsafe fn write<T>(dst: *mut T, src: T) {
76+
| ^^^^^
7477
= note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `init` (in Nightly builds, run with -Z macro-backtrace for more info)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
use pinned_init::*;
2+
3+
#[pin_data]
4+
struct Foo {
5+
a: Box<Foo>
6+
b: Box<Foo>
7+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: expected `,`, or `}`, found `b`
2+
--> tests/ui/compile-fail/pin_data/missing_comma.rs:5:16
3+
|
4+
5 | a: Box<Foo>
5+
| ^ help: try adding a comma: `,`
6+
7+
error: recursion limit reached while expanding `$crate::__pin_data!`
8+
--> tests/ui/compile-fail/pin_data/missing_comma.rs:3:1
9+
|
10+
3 | #[pin_data]
11+
| ^^^^^^^^^^^
12+
|
13+
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`$CRATE`)
14+
= note: this error originates in the macro `$crate::__pin_data` which comes from the expansion of the attribute macro `pin_data` (in Nightly builds, run with -Z macro-backtrace for more info)

0 commit comments

Comments
 (0)