fix(nix-compat-derive-tests): Get rid of compile-tests flag

Because we are now using mkCargoBuild to build this crate in CI we can
get rid of the compile-tests flag and always run the compile tests.
This is because the trybuild crate works when using the the same build
method we used for rustdoc an clippy.

Change-Id: I3f168a987a09bf6f3e3e7c1ab3aaa1acd9d010cf
Reviewed-on: https://cl.snix.dev/c/snix/+/30651
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Brian Olsen <brian@maven-group.org>
Tested-by: besadii
This commit is contained in:
Brian Olsen 2025-07-22 17:28:34 +02:00 committed by clbot
parent 9743771f1a
commit a1cfdeb0ef
6 changed files with 8 additions and 13 deletions

View file

@ -8489,8 +8489,7 @@ rec {
packageId = "trybuild";
}
];
features = { };
resolvedDefaultFeatures = [ "compile-tests" ];
};
"nix-daemon" = rec {
crateName = "nix-daemon";

View file

@ -3,9 +3,6 @@ name = "nix-compat-derive-tests"
version = "0.1.0"
edition = "2024"
[features]
compile-tests = []
[dev-dependencies]
hex-literal.workspace = true
pretty_assertions.workspace = true

View file

@ -1,4 +1,3 @@
#[cfg(feature = "compile-tests")]
#[test]
fn ui() {
let t = trybuild::TestCases::new();

View file

@ -5,14 +5,14 @@ error[E0277]: the trait bound `BadType: NixDeserialize` is not satisfied
| ^^^^^^^ the trait `NixDeserialize` is not implemented for `BadType`
|
= help: the following other types implement trait `NixDeserialize`:
AddToStoreNarRequest
BTreeMap<K, V>
CAHash
ClientSettings
IgnoredZero
NarHash
Operation
StorePath<String>
String
Test
Vec<T>
Option<CAHash>
and $N others
note: required by a bound in `try_read_value`
--> $WORKSPACE/nix-compat/src/wire/de/mod.rs

View file

@ -5,12 +5,12 @@ error[E0277]: the trait bound `Test: FromStr` is not satisfied
| ^^^^^^^^ the trait `FromStr` is not implemented for `Test`
|
= help: the following other types implement trait `FromStr`:
ByteString
CString
IpAddr
Ipv4Addr
Ipv6Addr
NonZero<i128>
NonZero<i16>
NonZero<i32>
NonZero<i64>
NonZero<i8>
and $N others

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Test: From<u64>` is not satisfied
--> tests/ui/deserialize_try_from_missing.rs:4:18
|
4 | #[nix(try_from = "u64")]
| ^^^^^ the trait `From<u64>` is not implemented for `Test`, which is required by `Test: TryFrom<u64>`
| ^^^^^ the trait `From<u64>` is not implemented for `Test`
|
= note: required for `u64` to implement `Into<Test>`
= note: required for `Test` to implement `TryFrom<u64>`