aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lint.rs8
-rw-r--r--tests/ui/pin_project/conflict-drop.stderr2
-rw-r--r--tests/ui/pin_project/conflict-unpin.stderr6
-rw-r--r--tests/ui/pin_project/invalid-bounds.stderr314
-rw-r--r--tests/ui/pin_project/invalid.stderr31
-rw-r--r--tests/ui/pin_project/overlapping_lifetime_names.stderr52
-rw-r--r--tests/ui/pin_project/overlapping_unpin_struct.stderr2
-rw-r--r--tests/ui/pin_project/packed.stderr4
-rw-r--r--tests/ui/pin_project/unsupported.stderr56
-rw-r--r--tests/ui/pinned_drop/call-drop-inner.stderr10
-rw-r--r--tests/ui/pinned_drop/conditional-drop-impl.stderr2
11 files changed, 375 insertions, 112 deletions
diff --git a/tests/lint.rs b/tests/lint.rs
index 792adce..852f940 100644
--- a/tests/lint.rs
+++ b/tests/lint.rs
@@ -9,14 +9,16 @@
#![forbid(future_incompatible, rust_2018_compatibility, rust_2021_compatibility)]
// lints forbidden as a part of future_incompatible, rust_2018_compatibility, and rust_2021_compatibility are not included in the list below.
// elided_lifetimes_in_paths, explicit_outlives_requirements, unused_extern_crates: as a part of rust_2018_idioms
-// unsafe_block_in_unsafe_fn: requires Rust 1.52. and, we don't generate unsafe fn.
+// unsafe_op_in_unsafe_fn: requires Rust 1.52. and, we don't generate unsafe fn.
// non_exhaustive_omitted_patterns: unstable
// unstable_features: no way to generate #![feature(..)] by macros, expect for unstable inner attribute. and this lint is deprecated: https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unstable-features
-// unused_crate_dependencies: unrelated
+// unused_crate_dependencies, must_not_suspend: unrelated
// unsafe_code: checked in forbid_unsafe module
#![warn(
box_pointers,
deprecated_in_future,
+ fuzzy_provenance_casts,
+ lossy_provenance_casts,
macro_use_extern_crate,
meta_variable_misuse,
missing_abi,
@@ -37,7 +39,7 @@
)]
#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::restriction)]
#![allow(clippy::blanket_clippy_restriction_lints)] // this is a test, so enable all restriction lints intentionally.
-#![allow(clippy::exhaustive_structs, clippy::exhaustive_enums)] // TODO
+#![allow(clippy::exhaustive_structs, clippy::exhaustive_enums, clippy::single_char_lifetime_names)] // TODO
pub mod basic {
include!("include/basic.rs");
diff --git a/tests/ui/pin_project/conflict-drop.stderr b/tests/ui/pin_project/conflict-drop.stderr
index 8531d08..66872bd 100644
--- a/tests/ui/pin_project/conflict-drop.stderr
+++ b/tests/ui/pin_project/conflict-drop.stderr
@@ -13,4 +13,4 @@ error[E0119]: conflicting implementations of trait `_::MustNotImplDrop` for type
| |_first implementation here
| conflicting implementation for `Foo<_, _>`
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_make_drop_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/pin_project/conflict-unpin.stderr b/tests/ui/pin_project/conflict-unpin.stderr
index 0c3141c..bd30faf 100644
--- a/tests/ui/pin_project/conflict-unpin.stderr
+++ b/tests/ui/pin_project/conflict-unpin.stderr
@@ -13,7 +13,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type
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_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Bar<_, _>`
--> tests/ui/pin_project/conflict-unpin.rs:18:1
@@ -30,7 +30,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type
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_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Baz<_, _>`
--> tests/ui/pin_project/conflict-unpin.rs:29:1
@@ -47,4 +47,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type
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_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/pin_project/invalid-bounds.stderr b/tests/ui/pin_project/invalid-bounds.stderr
index e179565..40e79bf 100644
--- a/tests/ui/pin_project/invalid-bounds.stderr
+++ b/tests/ui/pin_project/invalid-bounds.stderr
@@ -1,26 +1,14 @@
-error: no rules expected the token `[`
- --> tests/ui/pin_project/invalid-bounds.rs:3:1
+error: no rules expected the token `:`
+ --> tests/ui/pin_project/invalid-bounds.rs:4:33
|
-3 | / pin_project! {
-4 | | struct Generics1<T: 'static : Sized> { //~ ERROR no rules expected the token `:`
-5 | | field: T,
-6 | | }
-7 | | }
- | |_^ no rules expected this token in macro call
- |
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+4 | struct Generics1<T: 'static : Sized> { //~ ERROR no rules expected the token `:`
+ | ^ no rules expected this token in macro call
-error: no rules expected the token `[`
- --> tests/ui/pin_project/invalid-bounds.rs:9:1
- |
-9 | / pin_project! {
-10 | | struct Generics2<T: 'static : ?Sized> { //~ ERROR no rules expected the token `:`
-11 | | field: T,
-12 | | }
-13 | | }
- | |_^ no rules expected this token in macro call
+error: no rules expected the token `:`
+ --> tests/ui/pin_project/invalid-bounds.rs:10:33
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+10 | struct Generics2<T: 'static : ?Sized> { //~ ERROR no rules expected the token `:`
+ | ^ no rules expected this token in macro call
error: expected one of `+`, `,`, `=`, or `>`, found `:`
--> tests/ui/pin_project/invalid-bounds.rs:15:1
@@ -36,7 +24,7 @@ error: expected one of `+`, `,`, `=`, or `>`, found `:`
| |_unexpected token
| in this macro invocation
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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
@@ -51,7 +39,39 @@ error: expected one of `+`, `,`, `=`, or `>`, found `:`
| |_expected one of `+`, `,`, `=`, or `>`
| unexpected token
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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` (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` (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
@@ -67,7 +87,7 @@ error: expected one of `+`, `,`, `=`, or `>`, found `:`
| |_unexpected token
| in this macro invocation
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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
@@ -82,7 +102,39 @@ error: expected one of `+`, `,`, `=`, or `>`, found `:`
| |_expected one of `+`, `,`, `=`, or `>`
| unexpected token
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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` (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` (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
@@ -98,7 +150,7 @@ error: expected one of `+`, `,`, `=`, or `>`, found `:`
| |_unexpected token
| in this macro invocation
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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
@@ -113,49 +165,59 @@ error: expected one of `+`, `,`, `=`, or `>`, found `:`
| |_expected one of `+`, `,`, `=`, or `>`
| unexpected token
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: no rules expected the token `[`
- --> tests/ui/pin_project/invalid-bounds.rs:33:1
+error: expected one of `+`, `,`, `=`, or `>`, found `:`
+ --> tests/ui/pin_project/invalid-bounds.rs:27:1
|
-33 | / pin_project! {
-34 | | struct Generics6<T: ?Sized : Sized> { //~ ERROR no rules expected the token `Sized`
-35 | | field: T,
-36 | | }
-37 | | }
- | |_^ no rules expected this token in macro call
+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_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: no rules expected the token `[`
- --> tests/ui/pin_project/invalid-bounds.rs:39:1
+error: expected one of `+`, `,`, `=`, or `>`, found `:`
+ --> tests/ui/pin_project/invalid-bounds.rs:27:1
|
-39 | / pin_project! {
-40 | | struct WhereClause1<T>
-41 | | where
-42 | | T: 'static : Sized //~ ERROR no rules expected the token `:`
-... |
-45 | | }
-46 | | }
- | |_^ no rules expected this token in macro call
+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_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: no rules expected the token `[`
- --> tests/ui/pin_project/invalid-bounds.rs:48:1
+error: no rules expected the token `Sized`
+ --> tests/ui/pin_project/invalid-bounds.rs:34:34
|
-48 | / pin_project! {
-49 | | struct WhereClause2<T>
-50 | | where
-51 | | T: 'static : ?Sized //~ ERROR no rules expected the token `:`
-... |
-54 | | }
-55 | | }
- | |_^ no rules expected this token in macro call
+34 | struct Generics6<T: ?Sized : Sized> { //~ ERROR no rules expected the token `Sized`
+ | ^^^^^ no rules expected this token in macro call
+
+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
+
+error: no rules expected the token `:`
+ --> tests/ui/pin_project/invalid-bounds.rs:51:20
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+51 | T: 'static : ?Sized //~ ERROR no rules expected the token `:`
+ | ^ no rules expected this token in macro call
-error: expected `where`, or `{` after struct name, found `:`
+error: expected `{` after struct name, found `:`
--> tests/ui/pin_project/invalid-bounds.rs:57:1
|
57 | / pin_project! {
@@ -167,10 +229,10 @@ error: expected `where`, or `{` after struct name, found `:`
64 | | }
| | ^
| | |
- | |_expected `where`, or `{` after struct name
+ | |_expected `{` after struct name
| in this macro invocation
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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
@@ -187,9 +249,43 @@ error: expected one of `+`, `,`, or `{`, found `:`
| |_expected one of `+`, `,`, or `{`
| unexpected token
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: expected `where`, or `{` after struct name, found `:`
+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` (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! {
@@ -201,10 +297,10 @@ error: expected `where`, or `{` after struct name, found `:`
73 | | }
| | ^
| | |
- | |_expected `where`, or `{` after struct name
+ | |_expected `{` after struct name
| in this macro invocation
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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
@@ -221,9 +317,43 @@ error: expected one of `+`, `,`, or `{`, found `:`
| |_expected one of `+`, `,`, or `{`
| unexpected token
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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` (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` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: expected `where`, or `{` after struct name, found `:`
+error: expected `{` after struct name, found `:`
--> tests/ui/pin_project/invalid-bounds.rs:75:1
|
75 | / pin_project! {
@@ -235,10 +365,10 @@ error: expected `where`, or `{` after struct name, found `:`
82 | | }
| | ^
| | |
- | |_expected `where`, or `{` after struct name
+ | |_expected `{` after struct name
| in this macro invocation
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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
@@ -255,18 +385,44 @@ error: expected one of `+`, `,`, or `{`, found `:`
| |_expected one of `+`, `,`, or `{`
| unexpected token
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: no rules expected the token `[`
- --> tests/ui/pin_project/invalid-bounds.rs:84:1
+error: expected `{` after struct name, found `:`
+ --> tests/ui/pin_project/invalid-bounds.rs:75:1
|
-84 | / pin_project! {
-85 | | struct WhereClause6<T>
-86 | | where
-87 | | T: ?Sized : Sized //~ ERROR no rules expected the token `Sized`
+75 | / pin_project! {
+76 | | struct WhereClause5<T>
+77 | | where
+78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:`
... |
-90 | | }
-91 | | }
- | |_^ no rules expected this token in macro call
+81 | | }
+82 | | }
+ | | ^
+ | | |
+ | |_expected `{` after struct name
+ | in this macro invocation
+ |
+ = note: this error originates in the macro `$crate::__pin_project_parse_generics` (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` (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
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+87 | T: ?Sized : Sized //~ ERROR no rules expected the token `Sized`
+ | ^^^^^ no rules expected this token in macro call
diff --git a/tests/ui/pin_project/invalid.stderr b/tests/ui/pin_project/invalid.stderr
index 1e363d7..623a886 100644
--- a/tests/ui/pin_project/invalid.stderr
+++ b/tests/ui/pin_project/invalid.stderr
@@ -9,7 +9,34 @@ error: no rules expected the token `struct`
8 | | }
| |_^ no rules expected this token in macro call
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: no rules expected the token `struct`
+ --> tests/ui/pin_project/invalid.rs:3:1
+ |
+3 | / pin_project! {
+4 | | struct A<T> {
+5 | | #[pin()] //~ ERROR no rules expected the token `(`
+6 | | pinned: T,
+7 | | }
+8 | | }
+ | |_^ no rules expected this token in macro call
+ |
+ = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: no rules expected the token `struct`
+ --> tests/ui/pin_project/invalid.rs:17:1
+ |
+17 | / pin_project! {
+18 | | struct C<T> {
+19 | | #[pin]
+20 | | #[pin] //~ ERROR no rules expected the token `#`
+21 | | pinned: T,
+22 | | }
+23 | | }
+ | |_^ no rules expected this token in macro call
+ |
+ = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info)
error: no rules expected the token `struct`
--> tests/ui/pin_project/invalid.rs:17:1
@@ -23,7 +50,7 @@ error: no rules expected the token `struct`
23 | | }
| |_^ no rules expected this token in macro call
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find attribute `pin` in this scope
--> tests/ui/pin_project/invalid.rs:11:7
diff --git a/tests/ui/pin_project/overlapping_lifetime_names.stderr b/tests/ui/pin_project/overlapping_lifetime_names.stderr
index dfd4235..35074d0 100644
--- a/tests/ui/pin_project/overlapping_lifetime_names.stderr
+++ b/tests/ui/pin_project/overlapping_lifetime_names.stderr
@@ -10,6 +10,30 @@ error[E0263]: lifetime name `'__pin` declared twice in the same scope
8 | | }
| |_- previous declaration here
+error[E0263]: lifetime name `'__pin` declared twice in the same scope
+ --> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20
+ |
+3 | / pin_project! { //~ ERROR E0263,E0496
+4 | | pub struct Foo<'__pin, T> {
+ | | ^^^^^^ declared twice
+5 | | #[pin]
+6 | | field: &'__pin mut T,
+7 | | }
+8 | | }
+ | |_- previous declaration here
+
+error[E0263]: lifetime name `'__pin` declared twice in the same scope
+ --> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20
+ |
+3 | / pin_project! { //~ ERROR E0263,E0496
+4 | | pub struct Foo<'__pin, T> {
+ | | ^^^^^^ declared twice
+5 | | #[pin]
+6 | | field: &'__pin mut T,
+7 | | }
+8 | | }
+ | |_- previous declaration here
+
error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in scope
--> tests/ui/pin_project/overlapping_lifetime_names.rs:3:1
|
@@ -22,4 +46,30 @@ error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in
8 | | }
| |_^ lifetime `'__pin` already in scope
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` (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` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0263]: lifetime name `'__pin` declared twice in the same scope
+ --> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20
+ |
+3 | / pin_project! { //~ ERROR E0263,E0496
+4 | | pub struct Foo<'__pin, T> {
+ | | ^^^^^^ declared twice
+5 | | #[pin]
+6 | | field: &'__pin mut T,
+7 | | }
+8 | | }
+ | |_- previous declaration here
diff --git a/tests/ui/pin_project/overlapping_unpin_struct.stderr b/tests/ui/pin_project/overlapping_unpin_struct.stderr
index 1049879..303e7cb 100644
--- a/tests/ui/pin_project/overlapping_unpin_struct.stderr
+++ b/tests/ui/pin_project/overlapping_unpin_struct.stderr
@@ -30,4 +30,4 @@ note: required by a bound in `is_unpin`
|
16 | fn is_unpin<T: Unpin>() {}
| ^^^^^ required by this bound in `is_unpin`
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/pin_project/packed.stderr b/tests/ui/pin_project/packed.stderr
index 40a955e..81fb4f1 100644
--- a/tests/ui/pin_project/packed.stderr
+++ b/tests/ui/pin_project/packed.stderr
@@ -25,7 +25,7 @@ note: the lint level is defined here
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
= note: fields of packed structs are not properly aligned, and 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_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_constant` (in Nightly builds, run with -Z macro-backtrace for more info)
error: reference to packed field is unaligned
--> tests/ui/pin_project/packed.rs:13:1
@@ -54,4 +54,4 @@ note: the lint level is defined here
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
= note: fields of packed structs are not properly aligned, and 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_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_constant` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/pin_project/unsupported.stderr b/tests/ui/pin_project/unsupported.stderr
index d95f455..a7d215a 100644
--- a/tests/ui/pin_project/unsupported.stderr
+++ b/tests/ui/pin_project/unsupported.stderr
@@ -6,27 +6,41 @@ error: no rules expected the token `}`
5 | | }
| |_^ no rules expected this token in macro call
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: no rules expected the token `[`
- --> tests/ui/pin_project/unsupported.rs:7:1
+error: no rules expected the token `}`
+ --> tests/ui/pin_project/unsupported.rs:3:1
|
-7 | / pin_project! {
-8 | | struct Struct2(); //~ ERROR no rules expected the token `(`
-9 | | }
+3 | / pin_project! {
+4 | | struct Struct1 {} //~ ERROR no rules expected the token `}`
+5 | | }
| |_^ no rules expected this token in macro call
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_expand` (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
-error: no rules expected the token `[`
- --> tests/ui/pin_project/unsupported.rs:11:1
+error: no rules expected the token `;`
+ --> tests/ui/pin_project/unsupported.rs:12:19
|
-11 | / pin_project! {
-12 | | struct Struct3; //~ ERROR no rules expected the token `;`
-13 | | }
+12 | struct Struct3; //~ ERROR no rules expected the token `;`
+ | ^ no rules expected this token in macro call
+
+error: no rules expected the token `enum`
+ --> tests/ui/pin_project/unsupported.rs:15:1
+ |
+15 | / pin_project! {
+16 | | enum Enum { //~ ERROR no rules expected the token `enum`
+17 | | A(u8)
+18 | | }
+19 | | }
| |_^ no rules expected this token in macro call
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info)
error: no rules expected the token `enum`
--> tests/ui/pin_project/unsupported.rs:15:1
@@ -38,7 +52,19 @@ error: no rules expected the token `enum`
19 | | }
| |_^ no rules expected this token in macro call
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_expand` (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: this error originates in the macro `$crate::__pin_project_expand` (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
@@ -50,4 +76,4 @@ error: no rules expected the token `union`
25 | | }
| |_^ no rules expected this token in macro call
|
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/pinned_drop/call-drop-inner.stderr b/tests/ui/pinned_drop/call-drop-inner.stderr
index 5bcb728..597f67c 100644
--- a/tests/ui/pinned_drop/call-drop-inner.stderr
+++ b/tests/ui/pinned_drop/call-drop-inner.stderr
@@ -2,9 +2,7 @@ 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);
- | ^^^^^^^^^^^^ ---- supplied 1 argument
- | |
- | expected 0 arguments
+ | ^^^^^^^^^^^^ ---- argument unexpected
|
note: function defined here
--> tests/ui/pinned_drop/call-drop-inner.rs:3:1
@@ -17,4 +15,8 @@ note: function defined here
12 | | }
13 | | }
| |_^
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_make_drop_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: remove the extra argument
+ |
+10 | __drop_inner();
+ | ~~~~~~~~~~~~~~
diff --git a/tests/ui/pinned_drop/conditional-drop-impl.stderr b/tests/ui/pinned_drop/conditional-drop-impl.stderr
index f6c2075..d70009c 100644
--- a/tests/ui/pinned_drop/conditional-drop-impl.stderr
+++ b/tests/ui/pinned_drop/conditional-drop-impl.stderr
@@ -35,4 +35,4 @@ note: the implementor must specify the same requirement
23 | | }
24 | | }
| |_^
- = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the macro `$crate::__pin_project_make_drop_impl` (in Nightly builds, run with -Z macro-backtrace for more info)