diff options
Diffstat (limited to 'tests/priv_in_pub.rs')
-rw-r--r-- | tests/priv_in_pub.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/priv_in_pub.rs b/tests/priv_in_pub.rs index f61568a..5f7d874 100644 --- a/tests/priv_in_pub.rs +++ b/tests/priv_in_pub.rs @@ -1,8 +1,12 @@ -// Copyright 2019 The Fuchsia Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright 2019 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. -use zerocopy::{AsBytes, FromBytes, FromZeroes, Unaligned}; +use zerocopy::{AsBytes, FromBytes, FromZeroes, KnownLayout, Unaligned}; // These derives do not result in E0446 as of Rust 1.59.0, because of // https://github.com/rust-lang/rust/pull/90586. @@ -11,10 +15,10 @@ use zerocopy::{AsBytes, FromBytes, FromZeroes, Unaligned}; // bounds for field types (i.e., the emission of E0446 for private field // types). -#[derive(AsBytes, FromZeroes, FromBytes, Unaligned)] +#[derive(KnownLayout, AsBytes, FromZeroes, FromBytes, Unaligned)] #[repr(C)] pub struct Public(Private); -#[derive(AsBytes, FromZeroes, FromBytes, Unaligned)] +#[derive(KnownLayout, AsBytes, FromZeroes, FromBytes, Unaligned)] #[repr(C)] struct Private(()); |