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,32 @@
// Copyright 2022 The Fuchsia Authors
//
// Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
// <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
// license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
// This file may not be copied, modified, or distributed except according to
// those terms.
// Since some macros from `macros.rs` are unused.
#![allow(unused)]
extern crate zerocopy;
extern crate zerocopy_derive;
include!("../../../src/util/macros.rs");
use zerocopy::*;
use zerocopy_derive::*;
fn main() {}
#[derive(FromBytes, IntoBytes, Unaligned)]
#[repr(transparent)]
struct Foo<T>(T);
const _: () = unsafe {
impl_or_verify!(T => TryFromBytes for Foo<T>);
impl_or_verify!(T => FromZeros for Foo<T>);
impl_or_verify!(T => FromBytes for Foo<T>);
impl_or_verify!(T => IntoBytes for Foo<T>);
impl_or_verify!(T => Unaligned for Foo<T>);
};

View File

@@ -0,0 +1,139 @@
error[E0277]: the trait bound `T: zerocopy::TryFromBytes` is not satisfied
--> tests/ui-stable/invalid-impls/invalid-impls.rs:27:43
|
27 | impl_or_verify!(T => TryFromBytes for Foo<T>);
| ^^^^^^ the trait `zerocopy::TryFromBytes` is not implemented for `T`
|
= note: Consider adding `#[derive(TryFromBytes)]` to `T`
note: required for `Foo<T>` to implement `zerocopy::TryFromBytes`
--> tests/ui-stable/invalid-impls/invalid-impls.rs:22:10
|
22 | #[derive(FromBytes, IntoBytes, Unaligned)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
note: required by a bound in `_::Subtrait`
--> tests/ui-stable/invalid-impls/../../../src/util/macros.rs
|
| trait Subtrait: $trait {}
| ^^^^^^ required by this bound in `Subtrait`
|
::: tests/ui-stable/invalid-impls/invalid-impls.rs:27:5
|
27 | impl_or_verify!(T => TryFromBytes for Foo<T>);
| --------------------------------------------- in this macro invocation
= note: this error originates in the derive macro `FromBytes` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T` with trait `TryFromBytes`
|
27 | impl_or_verify!(T: zerocopy::TryFromBytes => TryFromBytes for Foo<T>);
| ++++++++++++++++++++++++
error[E0277]: the trait bound `T: zerocopy::FromZeros` is not satisfied
--> tests/ui-stable/invalid-impls/invalid-impls.rs:28:40
|
28 | impl_or_verify!(T => FromZeros for Foo<T>);
| ^^^^^^ the trait `zerocopy::FromZeros` is not implemented for `T`
|
= note: Consider adding `#[derive(FromZeros)]` to `T`
note: required for `Foo<T>` to implement `zerocopy::FromZeros`
--> tests/ui-stable/invalid-impls/invalid-impls.rs:22:10
|
22 | #[derive(FromBytes, IntoBytes, Unaligned)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
note: required by a bound in `_::Subtrait`
--> tests/ui-stable/invalid-impls/../../../src/util/macros.rs
|
| trait Subtrait: $trait {}
| ^^^^^^ required by this bound in `Subtrait`
|
::: tests/ui-stable/invalid-impls/invalid-impls.rs:28:5
|
28 | impl_or_verify!(T => FromZeros for Foo<T>);
| ------------------------------------------ in this macro invocation
= note: this error originates in the derive macro `FromBytes` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T` with trait `FromZeros`
|
28 | impl_or_verify!(T: zerocopy::FromZeros => FromZeros for Foo<T>);
| +++++++++++++++++++++
error[E0277]: the trait bound `T: zerocopy::FromBytes` is not satisfied
--> tests/ui-stable/invalid-impls/invalid-impls.rs:29:40
|
29 | impl_or_verify!(T => FromBytes for Foo<T>);
| ^^^^^^ the trait `zerocopy::FromBytes` is not implemented for `T`
|
= note: Consider adding `#[derive(FromBytes)]` to `T`
note: required for `Foo<T>` to implement `zerocopy::FromBytes`
--> tests/ui-stable/invalid-impls/invalid-impls.rs:22:10
|
22 | #[derive(FromBytes, IntoBytes, Unaligned)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
note: required by a bound in `_::Subtrait`
--> tests/ui-stable/invalid-impls/../../../src/util/macros.rs
|
| trait Subtrait: $trait {}
| ^^^^^^ required by this bound in `Subtrait`
|
::: tests/ui-stable/invalid-impls/invalid-impls.rs:29:5
|
29 | impl_or_verify!(T => FromBytes for Foo<T>);
| ------------------------------------------ in this macro invocation
= note: this error originates in the derive macro `FromBytes` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T` with trait `FromBytes`
|
29 | impl_or_verify!(T: zerocopy::FromBytes => FromBytes for Foo<T>);
| +++++++++++++++++++++
error[E0277]: the trait bound `T: zerocopy::IntoBytes` is not satisfied
--> tests/ui-stable/invalid-impls/invalid-impls.rs:30:40
|
30 | impl_or_verify!(T => IntoBytes for Foo<T>);
| ^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `T`
|
= note: Consider adding `#[derive(IntoBytes)]` to `T`
note: required for `Foo<T>` to implement `zerocopy::IntoBytes`
--> tests/ui-stable/invalid-impls/invalid-impls.rs:22:21
|
22 | #[derive(FromBytes, IntoBytes, Unaligned)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
note: required by a bound in `_::Subtrait`
--> tests/ui-stable/invalid-impls/../../../src/util/macros.rs
|
| trait Subtrait: $trait {}
| ^^^^^^ required by this bound in `Subtrait`
|
::: tests/ui-stable/invalid-impls/invalid-impls.rs:30:5
|
30 | impl_or_verify!(T => IntoBytes for Foo<T>);
| ------------------------------------------ in this macro invocation
= note: this error originates in the derive macro `IntoBytes` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T` with trait `IntoBytes`
|
30 | impl_or_verify!(T: zerocopy::IntoBytes => IntoBytes for Foo<T>);
| +++++++++++++++++++++
error[E0277]: the trait bound `T: zerocopy::Unaligned` is not satisfied
--> tests/ui-stable/invalid-impls/invalid-impls.rs:31:40
|
31 | impl_or_verify!(T => Unaligned for Foo<T>);
| ^^^^^^ the trait `zerocopy::Unaligned` is not implemented for `T`
|
= note: Consider adding `#[derive(Unaligned)]` to `T`
note: required for `Foo<T>` to implement `zerocopy::Unaligned`
--> tests/ui-stable/invalid-impls/invalid-impls.rs:22:32
|
22 | #[derive(FromBytes, IntoBytes, Unaligned)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
note: required by a bound in `_::Subtrait`
--> tests/ui-stable/invalid-impls/../../../src/util/macros.rs
|
| trait Subtrait: $trait {}
| ^^^^^^ required by this bound in `Subtrait`
|
::: tests/ui-stable/invalid-impls/invalid-impls.rs:31:5
|
31 | impl_or_verify!(T => Unaligned for Foo<T>);
| ------------------------------------------ in this macro invocation
= note: this error originates in the derive macro `Unaligned` which comes from the expansion of the macro `impl_or_verify` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T` with trait `Unaligned`
|
31 | impl_or_verify!(T: zerocopy::Unaligned => Unaligned for Foo<T>);
| +++++++++++++++++++++