diff options
author | Joel Galenson <jgalenson@google.com> | 2021-05-27 15:42:45 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-27 15:42:45 +0000 |
commit | b845c5fd84f50f28cd5cce350eac405562744e3b (patch) | |
tree | a2808291a9d00789d7f23e0e6bc9e133aace307a /tests/ui/unstable-features | |
parent | 2985289ffb56db1a2cf157e4b6874d18496b2c35 (diff) | |
parent | c95dc516440636acb2e9f0b61e3a4595a90c4d2e (diff) | |
download | pin-project-b845c5fd84f50f28cd5cce350eac405562744e3b.tar.gz |
Upgrade rust/crates/pin-project to 1.0.7 am: c95dc51644android-s-beta-4android-s-beta-3android-s-beta-4
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pin-project/+/1713049
Change-Id: I83082aeac5db98559efa3c9c5ccf4df14e0ff691
Diffstat (limited to 'tests/ui/unstable-features')
10 files changed, 44 insertions, 24 deletions
diff --git a/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs b/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs index 127cd1a..542250b 100644 --- a/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs +++ b/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs @@ -1,8 +1,9 @@ // Note: If you change this test, change 'marker_trait_attr.rs' at the same time. -use pin_project::pin_project; use std::marker::PhantomPinned; +use pin_project::pin_project; + #[pin_project] //~ ERROR E0119 struct Struct<T> { #[pin] diff --git a/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr b/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr index bab534b..44322ec 100644 --- a/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr +++ b/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr @@ -1,10 +1,10 @@ -error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Struct<_>`: - --> $DIR/marker_trait_attr-feature-gate.rs:6:1 +error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Struct<_>` + --> $DIR/marker_trait_attr-feature-gate.rs:7:1 | -6 | #[pin_project] //~ ERROR E0119 +7 | #[pin_project] //~ ERROR E0119 | ^^^^^^^^^^^^^^ conflicting implementation for `Struct<_>` ... -13 | impl<T> Unpin for Struct<T> {} +14 | impl<T> Unpin for Struct<T> {} | --------------------------- first implementation here | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/marker_trait_attr.rs b/tests/ui/unstable-features/marker_trait_attr.rs index d6eab21..9c8e664 100644 --- a/tests/ui/unstable-features/marker_trait_attr.rs +++ b/tests/ui/unstable-features/marker_trait_attr.rs @@ -6,9 +6,10 @@ // See https://github.com/taiki-e/pin-project/issues/105#issuecomment-535355974 -use pin_project::pin_project; use std::marker::PhantomPinned; +use pin_project::pin_project; + #[pin_project] //~ ERROR E0119 struct Struct<T> { #[pin] diff --git a/tests/ui/unstable-features/marker_trait_attr.stderr b/tests/ui/unstable-features/marker_trait_attr.stderr index 9b3ec57..8893fb2 100644 --- a/tests/ui/unstable-features/marker_trait_attr.stderr +++ b/tests/ui/unstable-features/marker_trait_attr.stderr @@ -1,10 +1,10 @@ -error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Struct<_>`: - --> $DIR/marker_trait_attr.rs:12:1 +error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Struct<_>` + --> $DIR/marker_trait_attr.rs:13:1 | -12 | #[pin_project] //~ ERROR E0119 +13 | #[pin_project] //~ ERROR E0119 | ^^^^^^^^^^^^^^ conflicting implementation for `Struct<_>` ... -19 | impl<T> Unpin for Struct<T> {} +20 | impl<T> Unpin for Struct<T> {} | --------------------------- first implementation here | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs index 9d1b8b8..012c870 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs +++ b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.rs @@ -1,8 +1,9 @@ // Note: If you change this test, change 'overlapping_marker_traits.rs' at the same time. -use pin_project::pin_project; use std::marker::PhantomPinned; +use pin_project::pin_project; + #[pin_project] //~ ERROR E0119 struct Struct<T> { #[pin] diff --git a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr index 4a8e238..64a0596 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr +++ b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr @@ -1,10 +1,10 @@ -error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Struct<_>`: - --> $DIR/overlapping_marker_traits-feature-gate.rs:6:1 +error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Struct<_>` + --> $DIR/overlapping_marker_traits-feature-gate.rs:7:1 | -6 | #[pin_project] //~ ERROR E0119 +7 | #[pin_project] //~ ERROR E0119 | ^^^^^^^^^^^^^^ conflicting implementation for `Struct<_>` ... -13 | impl<T> Unpin for Struct<T> {} +14 | impl<T> Unpin for Struct<T> {} | --------------------------- first implementation here | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/overlapping_marker_traits.rs b/tests/ui/unstable-features/overlapping_marker_traits.rs index 0e0cddd..8dc27c1 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits.rs +++ b/tests/ui/unstable-features/overlapping_marker_traits.rs @@ -3,16 +3,17 @@ // This feature could break the guarantee for Unpin provided by pin-project, // but was removed in https://github.com/rust-lang/rust/pull/68544 (nightly-2020-02-06). // Refs: -// * https://github.com/rust-lang/rust/issues/29864#issuecomment-515780867. -// * https://github.com/taiki-e/pin-project/issues/105 +// - https://github.com/rust-lang/rust/issues/29864#issuecomment-515780867 +// - https://github.com/taiki-e/pin-project/issues/105 // overlapping_marker_traits // Tracking issue: https://github.com/rust-lang/rust/issues/29864 #![feature(overlapping_marker_traits)] -use pin_project::pin_project; use std::marker::PhantomPinned; +use pin_project::pin_project; + #[pin_project] struct Struct<T> { #[pin] diff --git a/tests/ui/unstable-features/overlapping_marker_traits.stderr b/tests/ui/unstable-features/overlapping_marker_traits.stderr index 91aaf6c..ffa50c7 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits.stderr +++ b/tests/ui/unstable-features/overlapping_marker_traits.stderr @@ -6,13 +6,13 @@ error[E0557]: feature has been removed | = note: removed in favor of `#![feature(marker_trait_attr)]` -error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Struct<_>`: - --> $DIR/overlapping_marker_traits.rs:16:1 +error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Struct<_>` + --> $DIR/overlapping_marker_traits.rs:17:1 | -16 | #[pin_project] +17 | #[pin_project] | ^^^^^^^^^^^^^^ conflicting implementation for `Struct<_>` ... -23 | impl<T> Unpin for Struct<T> {} +24 | impl<T> Unpin for Struct<T> {} | --------------------------- first implementation here | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/trivial_bounds-bug.stderr b/tests/ui/unstable-features/trivial_bounds-bug.stderr index fff09f9..f2407d0 100644 --- a/tests/ui/unstable-features/trivial_bounds-bug.stderr +++ b/tests/ui/unstable-features/trivial_bounds-bug.stderr @@ -3,3 +3,5 @@ error[E0277]: `PhantomPinned` cannot be unpinned | 13 | impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR E0277 | ^^^^^ the trait `Unpin` is not implemented for `PhantomPinned` + | + = note: consider using `Box::pin` diff --git a/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr b/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr index dd151b0..fa81083 100644 --- a/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr +++ b/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr @@ -4,6 +4,7 @@ error[E0277]: `PhantomPinned` cannot be unpinned 8 | impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR E0277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unpin` is not implemented for `PhantomPinned` | + = note: consider using `Box::pin` = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -12,6 +13,8 @@ error[E0277]: `PhantomPinned` cannot be unpinned | 8 | impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR E0277 | ^^^^^ the trait `Unpin` is not implemented for `PhantomPinned` + | + = note: consider using `Box::pin` error[E0277]: `PhantomPinned` cannot be unpinned --> $DIR/trivial_bounds-feature-gate.rs:16:5 @@ -19,6 +22,7 @@ error[E0277]: `PhantomPinned` cannot be unpinned 16 | impl Unpin for B where Wrapper<PhantomPinned>: Unpin {} //~ ERROR E0277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unpin` is not implemented for `PhantomPinned` | + = note: consider using `Box::pin` = note: required because of the requirements on the impl of `Unpin` for `phantom_pinned::Wrapper<PhantomPinned>` = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -29,7 +33,12 @@ error[E0277]: `PhantomPinned` cannot be unpinned 34 | impl Unpin for A where Inner: Unpin {} //~ ERROR E0277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `Inner`, the trait `Unpin` is not implemented for `PhantomPinned` | - = note: required because it appears within the type `Inner` + = note: consider using `Box::pin` +note: required because it appears within the type `Inner` + --> $DIR/trivial_bounds-feature-gate.rs:30:12 + | +30 | struct Inner(PhantomPinned); + | ^^^^^ = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -39,7 +48,12 @@ error[E0277]: `PhantomPinned` cannot be unpinned 42 | impl Unpin for B where Wrapper<Inner>: Unpin {} //~ ERROR E0277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `Inner`, the trait `Unpin` is not implemented for `PhantomPinned` | - = note: required because it appears within the type `Inner` + = note: consider using `Box::pin` +note: required because it appears within the type `Inner` + --> $DIR/trivial_bounds-feature-gate.rs:30:12 + | +30 | struct Inner(PhantomPinned); + | ^^^^^ = note: required because of the requirements on the impl of `Unpin` for `inner::Wrapper<Inner>` = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable |