Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
15
third-party/vendor/pin-project-lite/tests/ui/pin_project/conflict-drop.rs
vendored
Normal file
15
third-party/vendor/pin-project-lite/tests/ui/pin_project/conflict-drop.rs
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! { //~ ERROR E0119
|
||||
struct Foo<T, U> {
|
||||
#[pin]
|
||||
future: T,
|
||||
field: U,
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, U> Drop for Foo<T, U> {
|
||||
fn drop(&mut self) {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
16
third-party/vendor/pin-project-lite/tests/ui/pin_project/conflict-drop.stderr
vendored
Normal file
16
third-party/vendor/pin-project-lite/tests/ui/pin_project/conflict-drop.stderr
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
error[E0119]: conflicting implementations of trait `MustNotImplDrop` for type `Foo<_, _>`
|
||||
--> tests/ui/pin_project/conflict-drop.rs:3:1
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR E0119
|
||||
4 | | struct Foo<T, U> {
|
||||
5 | | #[pin]
|
||||
6 | | future: T,
|
||||
7 | | field: U,
|
||||
8 | | }
|
||||
9 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_first implementation here
|
||||
| conflicting implementation for `Foo<_, _>`
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_drop_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
64
third-party/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs
vendored
Normal file
64
third-party/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
// The same implementation.
|
||||
|
||||
pin_project! { //~ ERROR E0119
|
||||
struct Foo<T, U> {
|
||||
#[pin]
|
||||
future: T,
|
||||
field: U,
|
||||
}
|
||||
}
|
||||
|
||||
// conflicting implementations
|
||||
impl<T, U> Unpin for Foo<T, U> where T: Unpin {} // Conditional Unpin impl
|
||||
|
||||
// The implementation that under different conditions.
|
||||
|
||||
pin_project! { //~ ERROR E0119
|
||||
struct Bar<T, U> {
|
||||
#[pin]
|
||||
future: T,
|
||||
field: U,
|
||||
}
|
||||
}
|
||||
|
||||
// conflicting implementations
|
||||
impl<T, U> Unpin for Bar<T, U> {} // Non-conditional Unpin impl
|
||||
|
||||
pin_project! { //~ ERROR E0119
|
||||
struct Baz<T, U> {
|
||||
#[pin]
|
||||
future: T,
|
||||
field: U,
|
||||
}
|
||||
}
|
||||
|
||||
// conflicting implementations
|
||||
impl<T: Unpin, U: Unpin> Unpin for Baz<T, U> {} // Conditional Unpin impl
|
||||
|
||||
pin_project! { //~ ERROR E0119
|
||||
#[project(!Unpin)]
|
||||
struct Qux<T, U> {
|
||||
#[pin]
|
||||
future: T,
|
||||
field: U,
|
||||
}
|
||||
}
|
||||
|
||||
// conflicting implementations
|
||||
impl<T, U> Unpin for Qux<T, U> {} // Non-conditional Unpin impl
|
||||
|
||||
pin_project! { //~ ERROR E0119
|
||||
#[project(!Unpin)]
|
||||
struct Fred<T, U> {
|
||||
#[pin]
|
||||
future: T,
|
||||
field: U,
|
||||
}
|
||||
}
|
||||
|
||||
// conflicting implementations
|
||||
impl<T: Unpin, U: Unpin> Unpin for Fred<T, U> {} // Conditional Unpin impl
|
||||
|
||||
fn main() {}
|
||||
84
third-party/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr
vendored
Normal file
84
third-party/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
error[E0119]: conflicting implementations of trait `Unpin` for type `Foo<_, _>`
|
||||
--> tests/ui/pin_project/conflict-unpin.rs:5:1
|
||||
|
|
||||
5 | / pin_project! { //~ ERROR E0119
|
||||
6 | | struct Foo<T, U> {
|
||||
7 | | #[pin]
|
||||
8 | | future: T,
|
||||
9 | | field: U,
|
||||
10 | | }
|
||||
11 | | }
|
||||
| |_^ conflicting implementation for `Foo<_, _>`
|
||||
...
|
||||
14 | impl<T, U> Unpin for Foo<T, U> where T: Unpin {} // Conditional Unpin impl
|
||||
| ------------------------------ first implementation here
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Unpin` for type `Bar<_, _>`
|
||||
--> tests/ui/pin_project/conflict-unpin.rs:18:1
|
||||
|
|
||||
18 | / pin_project! { //~ ERROR E0119
|
||||
19 | | struct Bar<T, U> {
|
||||
20 | | #[pin]
|
||||
21 | | future: T,
|
||||
22 | | field: U,
|
||||
23 | | }
|
||||
24 | | }
|
||||
| |_^ conflicting implementation for `Bar<_, _>`
|
||||
...
|
||||
27 | impl<T, U> Unpin for Bar<T, U> {} // Non-conditional Unpin impl
|
||||
| ------------------------------ first implementation here
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Unpin` for type `Baz<_, _>`
|
||||
--> tests/ui/pin_project/conflict-unpin.rs:29:1
|
||||
|
|
||||
29 | / pin_project! { //~ ERROR E0119
|
||||
30 | | struct Baz<T, U> {
|
||||
31 | | #[pin]
|
||||
32 | | future: T,
|
||||
33 | | field: U,
|
||||
34 | | }
|
||||
35 | | }
|
||||
| |_^ conflicting implementation for `Baz<_, _>`
|
||||
...
|
||||
38 | impl<T: Unpin, U: Unpin> Unpin for Baz<T, U> {} // Conditional Unpin impl
|
||||
| -------------------------------------------- first implementation here
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Unpin` for type `Qux<_, _>`
|
||||
--> tests/ui/pin_project/conflict-unpin.rs:40:1
|
||||
|
|
||||
40 | / pin_project! { //~ ERROR E0119
|
||||
41 | | #[project(!Unpin)]
|
||||
42 | | struct Qux<T, U> {
|
||||
43 | | #[pin]
|
||||
... |
|
||||
46 | | }
|
||||
47 | | }
|
||||
| |_^ conflicting implementation for `Qux<_, _>`
|
||||
...
|
||||
50 | impl<T, U> Unpin for Qux<T, U> {} // Non-conditional Unpin impl
|
||||
| ------------------------------ first implementation here
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Unpin` for type `Fred<_, _>`
|
||||
--> tests/ui/pin_project/conflict-unpin.rs:52:1
|
||||
|
|
||||
52 | / pin_project! { //~ ERROR E0119
|
||||
53 | | #[project(!Unpin)]
|
||||
54 | | struct Fred<T, U> {
|
||||
55 | | #[pin]
|
||||
... |
|
||||
58 | | }
|
||||
59 | | }
|
||||
| |_^ conflicting implementation for `Fred<_, _>`
|
||||
...
|
||||
62 | impl<T: Unpin, U: Unpin> Unpin for Fred<T, U> {} // Conditional Unpin impl
|
||||
| --------------------------------------------- first implementation here
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
93
third-party/vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs
vendored
Normal file
93
third-party/vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! {
|
||||
struct Generics1<T: 'static : Sized> { //~ ERROR no rules expected the token `:`
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct Generics2<T: 'static : ?Sized> { //~ ERROR no rules expected the token `:`
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct Generics3<T: Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct Generics4<T: ?Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct Generics5<T: Sized : ?Sized> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct Generics6<T: ?Sized : Sized> { //~ ERROR no rules expected the token `Sized`
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct WhereClause1<T>
|
||||
where
|
||||
T: 'static : Sized //~ ERROR no rules expected the token `:`
|
||||
{
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct WhereClause2<T>
|
||||
where
|
||||
T: 'static : ?Sized //~ ERROR no rules expected the token `:`
|
||||
{
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct WhereClause3<T>
|
||||
where
|
||||
T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
{
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct WhereClause4<T>
|
||||
where
|
||||
T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
{
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct WhereClause5<T>
|
||||
where
|
||||
T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
{
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct WhereClause6<T>
|
||||
where
|
||||
T: ?Sized : Sized //~ ERROR no rules expected the token `Sized`
|
||||
{
|
||||
field: T,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
470
third-party/vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.stderr
vendored
Normal file
470
third-party/vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.stderr
vendored
Normal file
|
|
@ -0,0 +1,470 @@
|
|||
error: no rules expected the token `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:4:33
|
||||
|
|
||||
4 | struct Generics1<T: 'static : Sized> { //~ ERROR no rules expected the token `:`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `>`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| >)?
|
||||
| ^
|
||||
|
||||
error: no rules expected the token `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:10:33
|
||||
|
|
||||
10 | struct Generics2<T: 'static : ?Sized> { //~ ERROR no rules expected the token `:`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `>`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| >)?
|
||||
| ^
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:15:1
|
||||
|
|
||||
15 | / pin_project! {
|
||||
16 | | struct Generics3<T: Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
17 | | field: T,
|
||||
18 | | }
|
||||
19 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:15:1
|
||||
|
|
||||
15 | / pin_project! {
|
||||
16 | | struct Generics3<T: Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
17 | | field: T,
|
||||
18 | | }
|
||||
19 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected one of `+`, `,`, `=`, or `>`
|
||||
| unexpected token
|
||||
|
|
||||
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:15:1
|
||||
|
|
||||
15 | / pin_project! {
|
||||
16 | | struct Generics3<T: Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
17 | | field: T,
|
||||
18 | | }
|
||||
19 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:15:1
|
||||
|
|
||||
15 | / pin_project! {
|
||||
16 | | struct Generics3<T: Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
17 | | field: T,
|
||||
18 | | }
|
||||
19 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:21:1
|
||||
|
|
||||
21 | / pin_project! {
|
||||
22 | | struct Generics4<T: ?Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
23 | | field: T,
|
||||
24 | | }
|
||||
25 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:21:1
|
||||
|
|
||||
21 | / pin_project! {
|
||||
22 | | struct Generics4<T: ?Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
23 | | field: T,
|
||||
24 | | }
|
||||
25 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected one of `+`, `,`, `=`, or `>`
|
||||
| unexpected token
|
||||
|
|
||||
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:21:1
|
||||
|
|
||||
21 | / pin_project! {
|
||||
22 | | struct Generics4<T: ?Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
23 | | field: T,
|
||||
24 | | }
|
||||
25 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:21:1
|
||||
|
|
||||
21 | / pin_project! {
|
||||
22 | | struct Generics4<T: ?Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
23 | | field: T,
|
||||
24 | | }
|
||||
25 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:27:1
|
||||
|
|
||||
27 | / pin_project! {
|
||||
28 | | struct Generics5<T: Sized : ?Sized> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
29 | | field: T,
|
||||
30 | | }
|
||||
31 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:27:1
|
||||
|
|
||||
27 | / pin_project! {
|
||||
28 | | struct Generics5<T: Sized : ?Sized> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
29 | | field: T,
|
||||
30 | | }
|
||||
31 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected one of `+`, `,`, `=`, or `>`
|
||||
| unexpected token
|
||||
|
|
||||
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:27:1
|
||||
|
|
||||
27 | / pin_project! {
|
||||
28 | | struct Generics5<T: Sized : ?Sized> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
29 | | field: T,
|
||||
30 | | }
|
||||
31 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:27:1
|
||||
|
|
||||
27 | / pin_project! {
|
||||
28 | | struct Generics5<T: Sized : ?Sized> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
|
||||
29 | | field: T,
|
||||
30 | | }
|
||||
31 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| | expected one of `+`, `,`, `=`, or `>`
|
||||
| |_unexpected token
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: no rules expected the token `Sized`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:34:34
|
||||
|
|
||||
34 | struct Generics6<T: ?Sized : Sized> { //~ ERROR no rules expected the token `Sized`
|
||||
| ^^^^^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match meta-variable `$generics_lifetime_bound:lifetime`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| $(: $generics_lifetime_bound:lifetime)?
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no rules expected the token `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:42:20
|
||||
|
|
||||
42 | T: 'static : Sized //~ ERROR no rules expected the token `:`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `{`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| {
|
||||
| ^
|
||||
|
||||
error: no rules expected the token `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:51:20
|
||||
|
|
||||
51 | T: 'static : ?Sized //~ ERROR no rules expected the token `:`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `{`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| {
|
||||
| ^
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:57:1
|
||||
|
|
||||
57 | / pin_project! {
|
||||
58 | | struct WhereClause3<T>
|
||||
59 | | where
|
||||
60 | | T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
63 | | }
|
||||
64 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, or `{`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:57:1
|
||||
|
|
||||
57 | / pin_project! {
|
||||
58 | | struct WhereClause3<T>
|
||||
59 | | where
|
||||
60 | | T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
63 | | }
|
||||
64 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected one of `+`, `,`, or `{`
|
||||
| unexpected token
|
||||
|
|
||||
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:57:1
|
||||
|
|
||||
57 | / pin_project! {
|
||||
58 | | struct WhereClause3<T>
|
||||
59 | | where
|
||||
60 | | T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
63 | | }
|
||||
64 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:57:1
|
||||
|
|
||||
57 | / pin_project! {
|
||||
58 | | struct WhereClause3<T>
|
||||
59 | | where
|
||||
60 | | T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
63 | | }
|
||||
64 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:66:1
|
||||
|
|
||||
66 | / pin_project! {
|
||||
67 | | struct WhereClause4<T>
|
||||
68 | | where
|
||||
69 | | T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
72 | | }
|
||||
73 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, or `{`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:66:1
|
||||
|
|
||||
66 | / pin_project! {
|
||||
67 | | struct WhereClause4<T>
|
||||
68 | | where
|
||||
69 | | T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
72 | | }
|
||||
73 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected one of `+`, `,`, or `{`
|
||||
| unexpected token
|
||||
|
|
||||
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:66:1
|
||||
|
|
||||
66 | / pin_project! {
|
||||
67 | | struct WhereClause4<T>
|
||||
68 | | where
|
||||
69 | | T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
72 | | }
|
||||
73 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:66:1
|
||||
|
|
||||
66 | / pin_project! {
|
||||
67 | | struct WhereClause4<T>
|
||||
68 | | where
|
||||
69 | | T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
72 | | }
|
||||
73 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:75:1
|
||||
|
|
||||
75 | / pin_project! {
|
||||
76 | | struct WhereClause5<T>
|
||||
77 | | where
|
||||
78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
81 | | }
|
||||
82 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected one of `+`, `,`, or `{`, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:75:1
|
||||
|
|
||||
75 | / pin_project! {
|
||||
76 | | struct WhereClause5<T>
|
||||
77 | | where
|
||||
78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
81 | | }
|
||||
82 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected one of `+`, `,`, or `{`
|
||||
| unexpected token
|
||||
|
|
||||
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:75:1
|
||||
|
|
||||
75 | / pin_project! {
|
||||
76 | | struct WhereClause5<T>
|
||||
77 | | where
|
||||
78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
81 | | }
|
||||
82 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `{` after struct name, found `:`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:75:1
|
||||
|
|
||||
75 | / pin_project! {
|
||||
76 | | struct WhereClause5<T>
|
||||
77 | | where
|
||||
78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:`
|
||||
... |
|
||||
81 | | }
|
||||
82 | | }
|
||||
| | ^
|
||||
| | |
|
||||
| |_expected `{` after struct name
|
||||
| in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_parse_generics` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: no rules expected the token `Sized`
|
||||
--> tests/ui/pin_project/invalid-bounds.rs:87:21
|
||||
|
|
||||
87 | T: ?Sized : Sized //~ ERROR no rules expected the token `Sized`
|
||||
| ^^^^^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match meta-variable `$where_clause_lifetime_bound:lifetime`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| $(: $where_clause_lifetime_bound:lifetime)?
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
25
third-party/vendor/pin-project-lite/tests/ui/pin_project/invalid.rs
vendored
Normal file
25
third-party/vendor/pin-project-lite/tests/ui/pin_project/invalid.rs
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! {
|
||||
struct A<T> {
|
||||
#[pin()] //~ ERROR no rules expected the token `(`
|
||||
pinned: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
#[pin] //~ ERROR cannot find attribute `pin` in this scope
|
||||
struct B<T> {
|
||||
pinned: T,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct C<T> {
|
||||
#[pin]
|
||||
#[pin] //~ ERROR no rules expected the token `#`
|
||||
pinned: T,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
53
third-party/vendor/pin-project-lite/tests/ui/pin_project/invalid.stderr
vendored
Normal file
53
third-party/vendor/pin-project-lite/tests/ui/pin_project/invalid.stderr
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
error: no rules expected the token `(`
|
||||
--> tests/ui/pin_project/invalid.rs:5:14
|
||||
|
|
||||
5 | #[pin()] //~ ERROR no rules expected the token `(`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `]`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| $(#[$pin:ident])?
|
||||
| ^
|
||||
|
||||
error: no rules expected the token `(`
|
||||
--> tests/ui/pin_project/invalid.rs:5:14
|
||||
|
|
||||
5 | #[pin()] //~ ERROR no rules expected the token `(`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `]`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| $(#[$pin:ident])?
|
||||
| ^
|
||||
|
||||
error: no rules expected the token `#`
|
||||
--> tests/ui/pin_project/invalid.rs:20:9
|
||||
|
|
||||
20 | #[pin] //~ ERROR no rules expected the token `#`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match meta-variable `$field_vis:vis`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| $field_vis:vis $field:ident: $field_ty:ty
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: no rules expected the token `#`
|
||||
--> tests/ui/pin_project/invalid.rs:20:9
|
||||
|
|
||||
20 | #[pin] //~ ERROR no rules expected the token `#`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match meta-variable `$field_vis:vis`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| $field_vis:vis $field:ident: $field_ty:ty
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: cannot find attribute `pin` in this scope
|
||||
--> tests/ui/pin_project/invalid.rs:11:7
|
||||
|
|
||||
11 | #[pin] //~ ERROR cannot find attribute `pin` in this scope
|
||||
| ^^^
|
||||
10
third-party/vendor/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.rs
vendored
Normal file
10
third-party/vendor/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.rs
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! { //~ ERROR E0263,E0496
|
||||
pub struct Foo<'__pin, T> {
|
||||
#[pin]
|
||||
field: &'__pin mut T,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
75
third-party/vendor/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.stderr
vendored
Normal file
75
third-party/vendor/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.stderr
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
error[E0403]: the name `'__pin` is already used for a generic parameter in this item's generic parameters
|
||||
--> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR E0263,E0496
|
||||
4 | | pub struct Foo<'__pin, T> {
|
||||
| | ^^^^^^ already used
|
||||
5 | | #[pin]
|
||||
6 | | field: &'__pin mut T,
|
||||
7 | | }
|
||||
8 | | }
|
||||
| |_- first use of `'__pin`
|
||||
|
||||
error[E0403]: the name `'__pin` is already used for a generic parameter in this item's generic parameters
|
||||
--> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR E0263,E0496
|
||||
4 | | pub struct Foo<'__pin, T> {
|
||||
| | ^^^^^^ already used
|
||||
5 | | #[pin]
|
||||
6 | | field: &'__pin mut T,
|
||||
7 | | }
|
||||
8 | | }
|
||||
| |_- first use of `'__pin`
|
||||
|
||||
error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in scope
|
||||
--> tests/ui/pin_project/overlapping_lifetime_names.rs:3:1
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR E0263,E0496
|
||||
4 | | pub struct Foo<'__pin, T> {
|
||||
| | ------ first declared here
|
||||
5 | | #[pin]
|
||||
6 | | field: &'__pin mut T,
|
||||
7 | | }
|
||||
8 | | }
|
||||
| |_^ lifetime `'__pin` already in scope
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in scope
|
||||
--> tests/ui/pin_project/overlapping_lifetime_names.rs:3:1
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR E0263,E0496
|
||||
4 | | pub struct Foo<'__pin, T> {
|
||||
| | ------ first declared here
|
||||
5 | | #[pin]
|
||||
6 | | field: &'__pin mut T,
|
||||
7 | | }
|
||||
8 | | }
|
||||
| |_^ lifetime `'__pin` already in scope
|
||||
|
|
||||
= note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0403]: the name `'__pin` is already used for a generic parameter in this item's generic parameters
|
||||
--> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR E0263,E0496
|
||||
4 | | pub struct Foo<'__pin, T> {
|
||||
| | ^^^^^^ already used
|
||||
5 | | #[pin]
|
||||
6 | | field: &'__pin mut T,
|
||||
7 | | }
|
||||
8 | | }
|
||||
| |_- first use of `'__pin`
|
||||
|
||||
error[E0403]: the name `'__pin` is already used for a generic parameter in this item's generic parameters
|
||||
--> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR E0263,E0496
|
||||
4 | | pub struct Foo<'__pin, T> {
|
||||
| | ^^^^^^ already used
|
||||
5 | | #[pin]
|
||||
6 | | field: &'__pin mut T,
|
||||
7 | | }
|
||||
8 | | }
|
||||
| |_- first use of `'__pin`
|
||||
20
third-party/vendor/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs
vendored
Normal file
20
third-party/vendor/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use std::marker::PhantomPinned;
|
||||
|
||||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! {
|
||||
struct Foo<T> {
|
||||
#[pin]
|
||||
inner: T,
|
||||
}
|
||||
}
|
||||
|
||||
struct __Origin {}
|
||||
|
||||
impl Unpin for __Origin {}
|
||||
|
||||
fn is_unpin<T: Unpin>() {}
|
||||
|
||||
fn main() {
|
||||
is_unpin::<Foo<PhantomPinned>>(); //~ ERROR E0277
|
||||
}
|
||||
34
third-party/vendor/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.stderr
vendored
Normal file
34
third-party/vendor/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.stderr
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
error[E0277]: `PhantomPinned` cannot be unpinned
|
||||
--> tests/ui/pin_project/overlapping_unpin_struct.rs:19:16
|
||||
|
|
||||
19 | is_unpin::<Foo<PhantomPinned>>(); //~ ERROR E0277
|
||||
| ^^^^^^^^^^^^^^^^^^ within `_::__Origin<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
|
||||
|
|
||||
= note: consider using the `pin!` macro
|
||||
consider using `Box::pin` if you need to access the pinned value outside of the current scope
|
||||
note: required because it appears within the type `__Origin<'_, PhantomPinned>`
|
||||
--> tests/ui/pin_project/overlapping_unpin_struct.rs:5:1
|
||||
|
|
||||
5 | / pin_project! {
|
||||
6 | | struct Foo<T> {
|
||||
7 | | #[pin]
|
||||
8 | | inner: T,
|
||||
9 | | }
|
||||
10 | | }
|
||||
| |_^
|
||||
note: required for `Foo<PhantomPinned>` to implement `Unpin`
|
||||
--> tests/ui/pin_project/overlapping_unpin_struct.rs:5:1
|
||||
|
|
||||
5 | / pin_project! {
|
||||
6 | | struct Foo<T> {
|
||||
7 | | #[pin]
|
||||
8 | | inner: T,
|
||||
9 | | }
|
||||
10 | | }
|
||||
| |_^ unsatisfied trait bound introduced here
|
||||
note: required by a bound in `is_unpin`
|
||||
--> tests/ui/pin_project/overlapping_unpin_struct.rs:16:16
|
||||
|
|
||||
16 | fn is_unpin<T: Unpin>() {}
|
||||
| ^^^^^ required by this bound in `is_unpin`
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
19
third-party/vendor/pin-project-lite/tests/ui/pin_project/packed.rs
vendored
Normal file
19
third-party/vendor/pin-project-lite/tests/ui/pin_project/packed.rs
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! { //~ ERROR reference to packed field is unaligned
|
||||
#[repr(packed, C)]
|
||||
struct Packed {
|
||||
#[pin]
|
||||
field: u16,
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! { //~ ERROR reference to packed field is unaligned
|
||||
#[repr(packed(2))]
|
||||
struct PackedN {
|
||||
#[pin]
|
||||
field: u32,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
101
third-party/vendor/pin-project-lite/tests/ui/pin_project/packed.stderr
vendored
Normal file
101
third-party/vendor/pin-project-lite/tests/ui/pin_project/packed.stderr
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
error[E0793]: reference to packed field is unaligned
|
||||
--> tests/ui/pin_project/packed.rs:3:1
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR reference to packed field is unaligned
|
||||
4 | | #[repr(packed, C)]
|
||||
5 | | struct Packed {
|
||||
6 | | #[pin]
|
||||
7 | | field: u16,
|
||||
8 | | }
|
||||
9 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
|
||||
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
|
||||
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
|
||||
= note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0793]: reference to packed field is unaligned
|
||||
--> tests/ui/pin_project/packed.rs:3:1
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR reference to packed field is unaligned
|
||||
4 | | #[repr(packed, C)]
|
||||
5 | | struct Packed {
|
||||
6 | | #[pin]
|
||||
7 | | field: u16,
|
||||
8 | | }
|
||||
9 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
|
||||
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
|
||||
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
|
||||
= note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0793]: reference to packed field is unaligned
|
||||
--> tests/ui/pin_project/packed.rs:3:1
|
||||
|
|
||||
3 | / pin_project! { //~ ERROR reference to packed field is unaligned
|
||||
4 | | #[repr(packed, C)]
|
||||
5 | | struct Packed {
|
||||
6 | | #[pin]
|
||||
7 | | field: u16,
|
||||
8 | | }
|
||||
9 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
|
||||
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
|
||||
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
|
||||
= note: this error originates in the macro `$crate::__pin_project_constant` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0793]: reference to packed field is unaligned
|
||||
--> tests/ui/pin_project/packed.rs:11:1
|
||||
|
|
||||
11 | / pin_project! { //~ ERROR reference to packed field is unaligned
|
||||
12 | | #[repr(packed(2))]
|
||||
13 | | struct PackedN {
|
||||
14 | | #[pin]
|
||||
15 | | field: u32,
|
||||
16 | | }
|
||||
17 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
|
||||
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
|
||||
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
|
||||
= note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0793]: reference to packed field is unaligned
|
||||
--> tests/ui/pin_project/packed.rs:11:1
|
||||
|
|
||||
11 | / pin_project! { //~ ERROR reference to packed field is unaligned
|
||||
12 | | #[repr(packed(2))]
|
||||
13 | | struct PackedN {
|
||||
14 | | #[pin]
|
||||
15 | | field: u32,
|
||||
16 | | }
|
||||
17 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
|
||||
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
|
||||
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
|
||||
= note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0793]: reference to packed field is unaligned
|
||||
--> tests/ui/pin_project/packed.rs:11:1
|
||||
|
|
||||
11 | / pin_project! { //~ ERROR reference to packed field is unaligned
|
||||
12 | | #[repr(packed(2))]
|
||||
13 | | struct PackedN {
|
||||
14 | | #[pin]
|
||||
15 | | field: u32,
|
||||
16 | | }
|
||||
17 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
|
||||
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
|
||||
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
|
||||
= note: this error originates in the macro `$crate::__pin_project_constant` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
12
third-party/vendor/pin-project-lite/tests/ui/pin_project/unpin_sneaky.rs
vendored
Normal file
12
third-party/vendor/pin-project-lite/tests/ui/pin_project/unpin_sneaky.rs
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! {
|
||||
struct Foo {
|
||||
#[pin]
|
||||
inner: u8,
|
||||
}
|
||||
}
|
||||
|
||||
impl Unpin for __Origin {} //~ ERROR E0412,E0321
|
||||
|
||||
fn main() {}
|
||||
5
third-party/vendor/pin-project-lite/tests/ui/pin_project/unpin_sneaky.stderr
vendored
Normal file
5
third-party/vendor/pin-project-lite/tests/ui/pin_project/unpin_sneaky.stderr
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
error[E0412]: cannot find type `__Origin` in this scope
|
||||
--> tests/ui/pin_project/unpin_sneaky.rs:10:16
|
||||
|
|
||||
10 | impl Unpin for __Origin {} //~ ERROR E0412,E0321
|
||||
| ^^^^^^^^ not found in this scope
|
||||
27
third-party/vendor/pin-project-lite/tests/ui/pin_project/unsupported.rs
vendored
Normal file
27
third-party/vendor/pin-project-lite/tests/ui/pin_project/unsupported.rs
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! {
|
||||
struct Struct1 {} //~ ERROR no rules expected the token `}`
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct Struct2(); //~ ERROR no rules expected the token `(`
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
struct Struct3; //~ ERROR no rules expected the token `;`
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
enum Enum { //~ ERROR no rules expected the token `enum`
|
||||
A(u8)
|
||||
}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
union Union { //~ ERROR no rules expected the token `union`
|
||||
x: u8,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
115
third-party/vendor/pin-project-lite/tests/ui/pin_project/unsupported.stderr
vendored
Normal file
115
third-party/vendor/pin-project-lite/tests/ui/pin_project/unsupported.stderr
vendored
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
error: no rules expected the token `}`
|
||||
--> tests/ui/pin_project/unsupported.rs:3:1
|
||||
|
|
||||
3 | / pin_project! {
|
||||
4 | | struct Struct1 {} //~ ERROR no rules expected the token `}`
|
||||
5 | | }
|
||||
| |_^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match meta-variable `$field_vis:vis`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| $field_vis:vis $field:ident: $field_ty:ty
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in the macro `$crate::__pin_project_expand` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: no rules expected the token `}`
|
||||
--> tests/ui/pin_project/unsupported.rs:3:1
|
||||
|
|
||||
3 | / pin_project! {
|
||||
4 | | struct Struct1 {} //~ ERROR no rules expected the token `}`
|
||||
5 | | }
|
||||
| |_^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match meta-variable `$field_vis:vis`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| $field_vis:vis $field:ident: $field_ty:ty
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in the macro `$crate::__pin_project_expand` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: no rules expected the token `(`
|
||||
--> tests/ui/pin_project/unsupported.rs:8:19
|
||||
|
|
||||
8 | struct Struct2(); //~ ERROR no rules expected the token `(`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `{`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| {
|
||||
| ^
|
||||
|
||||
error: no rules expected the token `;`
|
||||
--> tests/ui/pin_project/unsupported.rs:12:19
|
||||
|
|
||||
12 | struct Struct3; //~ ERROR no rules expected the token `;`
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `{`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| {
|
||||
| ^
|
||||
|
||||
error: no rules expected the token `(`
|
||||
--> tests/ui/pin_project/unsupported.rs:17:10
|
||||
|
|
||||
17 | A(u8)
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `}`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| }
|
||||
| ^
|
||||
|
||||
error: no rules expected the token `(`
|
||||
--> tests/ui/pin_project/unsupported.rs:17:10
|
||||
|
|
||||
17 | A(u8)
|
||||
| ^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `}`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| }
|
||||
| ^
|
||||
|
||||
error: no rules expected the token `union`
|
||||
--> tests/ui/pin_project/unsupported.rs:21:1
|
||||
|
|
||||
21 | / pin_project! {
|
||||
22 | | union Union { //~ ERROR no rules expected the token `union`
|
||||
23 | | x: u8,
|
||||
24 | | }
|
||||
25 | | }
|
||||
| |_^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `struct`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| [$(#[$attrs:meta])* $vis:vis struct $ident:ident]
|
||||
| ^^^^^^
|
||||
= note: captured metavariables except for `:tt`, `:ident` and `:lifetime` cannot be compared to other tokens
|
||||
= note: see <https://doc.rust-lang.org/nightly/reference/macros-by-example.html#forwarding-a-matched-fragment> for more information
|
||||
= note: this error originates in the macro `$crate::__pin_project_expand` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: no rules expected the token `union`
|
||||
--> tests/ui/pin_project/unsupported.rs:21:1
|
||||
|
|
||||
21 | / pin_project! {
|
||||
22 | | union Union { //~ ERROR no rules expected the token `union`
|
||||
23 | | x: u8,
|
||||
24 | | }
|
||||
25 | | }
|
||||
| |_^ no rules expected this token in macro call
|
||||
|
|
||||
note: while trying to match `struct`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| [$(#[$attrs:meta])* $vis:vis struct $ident:ident]
|
||||
| ^^^^^^
|
||||
= note: captured metavariables except for `:tt`, `:ident` and `:lifetime` cannot be compared to other tokens
|
||||
= note: see <https://doc.rust-lang.org/nightly/reference/macros-by-example.html#forwarding-a-matched-fragment> for more information
|
||||
= note: this error originates in the macro `$crate::__pin_project_expand` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
17
third-party/vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs
vendored
Normal file
17
third-party/vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
pin_project! {
|
||||
pub struct S {
|
||||
#[pin]
|
||||
field: u8,
|
||||
}
|
||||
impl PinnedDrop for S {
|
||||
fn drop(this: Pin<&mut Self>) {
|
||||
__drop_inner(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _x = S { field: 0 };
|
||||
}
|
||||
21
third-party/vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr
vendored
Normal file
21
third-party/vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
error[E0061]: this function takes 0 arguments but 1 argument was supplied
|
||||
--> tests/ui/pinned_drop/call-drop-inner.rs:10:13
|
||||
|
|
||||
10 | __drop_inner(this);
|
||||
| ^^^^^^^^^^^^ ----
|
||||
| |
|
||||
| unexpected argument of type `Pin<&mut S>`
|
||||
| help: remove the extra argument
|
||||
|
|
||||
note: function defined here
|
||||
--> tests/ui/pinned_drop/call-drop-inner.rs:3:1
|
||||
|
|
||||
3 | / pin_project! {
|
||||
4 | | pub struct S {
|
||||
5 | | #[pin]
|
||||
6 | | field: u8,
|
||||
... |
|
||||
12 | | }
|
||||
13 | | }
|
||||
| |_^
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_drop_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
26
third-party/vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs
vendored
Normal file
26
third-party/vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use pin_project_lite::pin_project;
|
||||
|
||||
// In `Drop` impl, the implementor must specify the same requirement as type definition.
|
||||
|
||||
struct DropImpl<T> {
|
||||
f: T,
|
||||
}
|
||||
|
||||
impl<T: Unpin> Drop for DropImpl<T> {
|
||||
//~^ ERROR E0367
|
||||
fn drop(&mut self) {}
|
||||
}
|
||||
|
||||
pin_project! {
|
||||
//~^ ERROR E0367
|
||||
struct PinnedDropImpl<T> {
|
||||
#[pin]
|
||||
f: T,
|
||||
}
|
||||
|
||||
impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> {
|
||||
fn drop(_this: Pin<&mut Self>) {}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
36
third-party/vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr
vendored
Normal file
36
third-party/vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
error[E0367]: `Drop` impl requires `T: Unpin` but the struct it is implemented for does not
|
||||
--> tests/ui/pinned_drop/conditional-drop-impl.rs:9:9
|
||||
|
|
||||
9 | impl<T: Unpin> Drop for DropImpl<T> {
|
||||
| ^^^^^
|
||||
|
|
||||
note: the implementor must specify the same requirement
|
||||
--> tests/ui/pinned_drop/conditional-drop-impl.rs:5:1
|
||||
|
|
||||
5 | struct DropImpl<T> {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0367]: `Drop` impl requires `T: Unpin` but the struct it is implemented for does not
|
||||
--> tests/ui/pinned_drop/conditional-drop-impl.rs:14:1
|
||||
|
|
||||
14 | / pin_project! {
|
||||
15 | | //~^ ERROR E0367
|
||||
16 | | struct PinnedDropImpl<T> {
|
||||
17 | | #[pin]
|
||||
... |
|
||||
23 | | }
|
||||
24 | | }
|
||||
| |_^
|
||||
|
|
||||
note: the implementor must specify the same requirement
|
||||
--> tests/ui/pinned_drop/conditional-drop-impl.rs:14:1
|
||||
|
|
||||
14 | / pin_project! {
|
||||
15 | | //~^ ERROR E0367
|
||||
16 | | struct PinnedDropImpl<T> {
|
||||
17 | | #[pin]
|
||||
... |
|
||||
23 | | }
|
||||
24 | | }
|
||||
| |_^
|
||||
= note: this error originates in the macro `$crate::__pin_project_make_drop_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
Loading…
Add table
Add a link
Reference in a new issue