Vendor dependencies
Let's see how I like this workflow.
This commit is contained in:
parent
34d1830413
commit
9c435dc440
7500 changed files with 1665121 additions and 99 deletions
17
vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs
vendored
Normal file
17
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 };
|
||||
}
|
||||
22
vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr
vendored
Normal file
22
vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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);
|
||||
| ^^^^^^^^^^^^ ---- argument unexpected
|
||||
|
|
||||
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` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: remove the extra argument
|
||||
|
|
||||
10 | __drop_inner();
|
||||
| ~~~~~~~~~~~~~~
|
||||
26
vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs
vendored
Normal file
26
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() {}
|
||||
38
vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr
vendored
Normal file
38
vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
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> {
|
||||
6 | | f: T,
|
||||
7 | | }
|
||||
| |_^
|
||||
|
||||
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` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
Loading…
Add table
Add a link
Reference in a new issue