Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ std = ["alloc"]
# removed at any time.
__internal_use_only_features_that_work_on_stable = ["alloc", "derive", "simd", "std"]

[[test]]
name = "ui"
path = "tests/ui.rs"
harness = false

[dependencies]
zerocopy-derive = { version = "=0.8.29", path = "zerocopy-derive", optional = true }

Expand All @@ -106,10 +111,5 @@ rand = { version = "0.8.5", default-features = false, features = ["small_rng"] }
rustversion = "1.0"
static_assertions = "1.1"
testutil = { path = "testutil" }
# Pinned to a specific version so that the version used for local development
# and the version used in CI are guaranteed to be the same. Future versions
# sometimes change the output format slightly, so a version mismatch can cause
# CI test failures.
trybuild = { version = "=1.0.89", features = ["diff"] }
# In tests, unlike in production, zerocopy-derive is not optional
zerocopy-derive = { version = "=0.8.29", path = "zerocopy-derive" }
2 changes: 2 additions & 0 deletions cargo.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash
#
# Copyright 2024 The Fuchsia Authors
#
# Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
Expand Down
55 changes: 0 additions & 55 deletions tests/trybuild.rs

This file was deleted.

4 changes: 4 additions & 0 deletions tests/ui-msrv/diagnostic-not-implemented-from-bytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ note: required by a bound in `takes_from_bytes`
|
21 | fn takes_from_bytes<T: FromBytes>() {}
| ^^^^^^^^^ required by this bound in `takes_from_bytes`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
4 changes: 4 additions & 0 deletions tests/ui-msrv/diagnostic-not-implemented-from-zeros.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ note: required by a bound in `takes_from_zeros`
|
21 | fn takes_from_zeros<T: FromZeros>() {}
| ^^^^^^^^^ required by this bound in `takes_from_zeros`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
4 changes: 4 additions & 0 deletions tests/ui-msrv/diagnostic-not-implemented-immutable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ note: required by a bound in `takes_immutable`
|
21 | fn takes_immutable<T: Immutable>() {}
| ^^^^^^^^^ required by this bound in `takes_immutable`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
4 changes: 4 additions & 0 deletions tests/ui-msrv/diagnostic-not-implemented-into-bytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ note: required by a bound in `takes_into_bytes`
|
21 | fn takes_into_bytes<T: IntoBytes>() {}
| ^^^^^^^^^ required by this bound in `takes_into_bytes`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
4 changes: 4 additions & 0 deletions tests/ui-msrv/diagnostic-not-implemented-issue-1296.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie
|
52 | Foo.write_obj(NotZerocopy(()));
| ^^^^^^^^^^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
4 changes: 4 additions & 0 deletions tests/ui-msrv/diagnostic-not-implemented-known-layout.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ note: required by a bound in `takes_known_layout`
|
21 | fn takes_known_layout<T: KnownLayout>() {}
| ^^^^^^^^^^^ required by this bound in `takes_known_layout`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ note: required by a bound in `takes_try_from_bytes`
|
21 | fn takes_try_from_bytes<T: TryFromBytes>() {}
| ^^^^^^^^^^^^ required by this bound in `takes_try_from_bytes`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
4 changes: 4 additions & 0 deletions tests/ui-msrv/diagnostic-not-implemented-unaligned.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ note: required by a bound in `takes_unaligned`
|
21 | fn takes_unaligned<T: Unaligned>() {}
| ^^^^^^^^^ required by this bound in `takes_unaligned`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
4 changes: 4 additions & 0 deletions tests/ui-msrv/include_value_not_from_bytes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ note: required by a bound in `NOT_FROM_BYTES::transmute`
| required by a bound in this
| required by this bound in `NOT_FROM_BYTES::transmute`
= note: this error originates in the macro `$crate::transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
4 changes: 4 additions & 0 deletions tests/ui-msrv/include_value_wrong_size.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-
= note: source type: `[u8; 4]` (32 bits)
= note: target type: `u64` (64 bits)
= note: this error originates in the macro `$crate::transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0512`.
Loading
Loading