Skip to content

Commit

Permalink
tests: ui: compile-fail: fix stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
y86-dev committed May 27, 2024
1 parent 7413d9c commit 84ca758
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/ui/compile-fail/init/colon_instead_of_arrow.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ error[E0308]: mismatched types
found opaque type `impl pinned_init::PinInit<Bar>`
note: function defined here
--> $RUST/core/src/ptr/mod.rs
|
| pub const unsafe fn write<T>(dst: *mut T, src: T) {
| ^^^^^
= 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)
3 changes: 3 additions & 0 deletions tests/ui/compile-fail/init/field_value_wrong_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ error[E0308]: mismatched types
|
note: function defined here
--> $RUST/core/src/ptr/mod.rs
|
| pub const unsafe fn write<T>(dst: *mut T, src: T) {
| ^^^^^
= 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)
3 changes: 3 additions & 0 deletions tests/ui/compile-fail/init/missing_comma_with_zeroable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ error[E0308]: mismatched types
found struct `std::ops::Range<{integer}>`
note: function defined here
--> $RUST/core/src/ptr/mod.rs
|
| pub const unsafe fn write<T>(dst: *mut T, src: T) {
| ^^^^^
= 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)

error[E0063]: missing field `b` in initializer of `Foo`
Expand Down
3 changes: 3 additions & 0 deletions tests/ui/compile-fail/init/wrong_generics2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
|
note: function defined here
--> $RUST/core/src/ptr/mod.rs
|
| pub const unsafe fn write<T>(dst: *mut T, src: T) {
| ^^^^^
= 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)
7 changes: 7 additions & 0 deletions tests/ui/compile-fail/pin_data/missing_comma.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use pinned_init::*;

#[pin_data]
struct Foo {
a: Box<Foo>
b: Box<Foo>
}
14 changes: 14 additions & 0 deletions tests/ui/compile-fail/pin_data/missing_comma.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
error: expected `,`, or `}`, found `b`
--> tests/ui/compile-fail/pin_data/missing_comma.rs:5:16
|
5 | a: Box<Foo>
| ^ help: try adding a comma: `,`

error: recursion limit reached while expanding `$crate::__pin_data!`
--> tests/ui/compile-fail/pin_data/missing_comma.rs:3:1
|
3 | #[pin_data]
| ^^^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`$CRATE`)
= 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 comments on commit 84ca758

Please sign in to comment.