Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
use std::pin::Pin;
#[cfg_attr(any(), pin_project::pin_project)]
struct Foo<T> {
f: T,
}
fn main() {
let mut x = Foo { f: 0_u8 };
let _ = Pin::new(&mut x).project(); //~ ERROR E0599
}

View File

@@ -0,0 +1,5 @@
error[E0599]: no method named `project` found for struct `Pin<&mut Foo<u8>>` in the current scope
--> tests/ui/cfg/cfg_attr-resolve.rs:12:30
|
12 | let _ = Pin::new(&mut x).project(); //~ ERROR E0599
| ^^^^^^^ method not found in `Pin<&mut Foo<u8>>`

View File

@@ -0,0 +1,27 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
use std::pin::Pin;
use pin_project::pin_project;
#[cfg_attr(not(any()), pin_project)]
struct Foo<T> {
#[cfg_attr(any(), pin)]
f: T,
}
#[cfg_attr(not(any()), pin_project)]
struct Bar<T> {
#[cfg_attr(not(any()), pin)]
f: T,
}
fn main() {
let mut x = Foo { f: 0_u8 };
let x = Pin::new(&mut x).project();
let _: Pin<&mut u8> = x.f; //~ ERROR E0308
let mut x = Bar { f: 0_u8 };
let x = Pin::new(&mut x).project();
let _: &mut u8 = x.f; //~ ERROR E0308
}

View File

@@ -0,0 +1,25 @@
error[E0308]: mismatched types
--> tests/ui/cfg/cfg_attr-type-mismatch.rs:22:27
|
22 | let _: Pin<&mut u8> = x.f; //~ ERROR E0308
| ------------ ^^^ expected `Pin<&mut u8>`, found `&mut u8`
| |
| expected due to this
|
= note: expected struct `Pin<&mut u8>`
found mutable reference `&mut u8`
error[E0308]: mismatched types
--> tests/ui/cfg/cfg_attr-type-mismatch.rs:26:22
|
26 | let _: &mut u8 = x.f; //~ ERROR E0308
| ------- ^^^ expected `&mut u8`, found `Pin<&mut u8>`
| |
| expected due to this
|
= note: expected mutable reference `&mut u8`
found struct `Pin<&mut u8>`
help: consider mutably borrowing here
|
26 | let _: &mut u8 = &mut x.f; //~ ERROR E0308
| ++++

View File

@@ -0,0 +1,17 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
use auxiliary_macro::hidden_repr;
use pin_project::pin_project;
#[pin_project]
#[hidden_repr(packed)] //~ ERROR may not be used on #[repr(packed)] types
struct S {
#[cfg(not(any()))]
#[pin]
f: u32,
#[cfg(any())]
#[pin]
f: u8,
}
fn main() {}

View File

@@ -0,0 +1,5 @@
error: #[pin_project] attribute may not be used on #[repr(packed)] types
--> tests/ui/cfg/packed_sneaky-span-issue-1.rs:7:15
|
7 | #[hidden_repr(packed)] //~ ERROR may not be used on #[repr(packed)] types
| ^^^^^^

View File

@@ -0,0 +1,17 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
use auxiliary_macro::hidden_repr;
use pin_project::pin_project;
#[pin_project]
#[hidden_repr(packed)] //~ ERROR may not be used on #[repr(packed)] types
struct S {
#[cfg(any())]
#[pin]
f: u32,
#[cfg(not(any()))]
#[pin]
f: u8,
}
fn main() {}

View File

@@ -0,0 +1,5 @@
error: #[pin_project] attribute may not be used on #[repr(packed)] types
--> tests/ui/cfg/packed_sneaky-span-issue-2.rs:7:15
|
7 | #[hidden_repr(packed)] //~ ERROR may not be used on #[repr(packed)] types
| ^^^^^^

View File

@@ -0,0 +1,14 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
use auxiliary_macro::hidden_repr_cfg_not_any;
use pin_project::pin_project;
// `#[hidden_repr_cfg_not_any(packed)]` generates `#[cfg_attr(not(any()), repr(packed))]`.
#[pin_project]
#[hidden_repr_cfg_not_any(packed)] //~ ERROR may not be used on #[repr(packed)] types
struct S {
#[pin]
f: u32,
}
fn main() {}

View File

@@ -0,0 +1,5 @@
error: #[pin_project] attribute may not be used on #[repr(packed)] types
--> tests/ui/cfg/packed_sneaky.rs:8:27
|
8 | #[hidden_repr_cfg_not_any(packed)] //~ ERROR may not be used on #[repr(packed)] types
| ^^^^^^

View File

@@ -0,0 +1,13 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
use pin_project::pin_project;
#[pin_project]
struct S {
//~^ ERROR may not be used on structs with zero fields
#[cfg(any())]
#[pin]
f: u8,
}
fn main() {}

View File

@@ -0,0 +1,11 @@
error: #[pin_project] attribute may not be used on structs with zero fields
--> tests/ui/cfg/unsupported.rs:6:10
|
6 | struct S {
| __________^
7 | | //~^ ERROR may not be used on structs with zero fields
8 | | #[cfg(any())]
9 | | #[pin]
10 | | f: u8,
11 | | }
| |_^