Skip to content

Commit

Permalink
Adjust tests for the lastest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed Dec 22, 2024
1 parent 7c8324e commit 8ef692e
Show file tree
Hide file tree
Showing 26 changed files with 139 additions and 104 deletions.
1 change: 1 addition & 0 deletions fieldx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
num_cpus = { workspace = true }
parking_lot = { workspace = true }
rustc_version = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true, default-features = false, features = ["macros", "rt", "rt-multi-thread", "time"] }
trybuild = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions fieldx/tests/builder_generic_default.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(feature = "serde")]

use fieldx::fxstruct;
use serde::{Deserialize, Serialize};

Expand Down
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/1.77+async/deserialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(deserialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0412]: cannot find type `Foo` in this scope
--> tests/uncompilable/deserialize_off.rs
|
| let _json = serde_json::from_str::<Foo>(r#"{"v": "whatever"}"#);
| ^^^ not found in this scope

warning: unused imports: `Deserialize`, `Serialize`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/1.77+async/serialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(serialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0422]: cannot find struct, variant or union type `Foo` in this scope
--> tests/uncompilable/serialize_off.rs
|
| let foo = Foo { v: "whatever" };
| ^^^ not found in this scope

warning: unused imports: `Deserialize`, `Serialize`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ error[E0277]: the trait bound `Foo: Deserialize<'_>` is not satisfied
i128
and $N others
note: required by a bound in `serde_json::from_str`
--> $CARGO/serde_json-1.0.133/src/de.rs
--> $CARGO/serde_json-1.0.134/src/de.rs
|
| pub fn from_str<'a, T>(s: &'a str) -> Result<T>
| -------- required by a bound in this function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ error[E0277]: the trait bound `Foo: Serialize` is not satisfied
i128
and $N others
note: required by a bound in `serde_json::to_string`
--> $CARGO/serde_json-1.0.133/src/ser.rs
--> $CARGO/serde_json-1.0.134/src/ser.rs
|
| pub fn to_string<T>(value: &T) -> Result<String>
| --------- required by a bound in this function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ error[E0277]: the trait bound `Foo: Deserialize<'_>` is not satisfied
i128
and $N others
note: required by a bound in `serde_json::from_str`
--> $CARGO/serde_json-1.0.133/src/de.rs
--> $CARGO/serde_json-1.0.134/src/de.rs
|
| pub fn from_str<'a, T>(s: &'a str) -> Result<T>
| -------- required by a bound in this function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ error[E0277]: the trait bound `Foo: Serialize` is not satisfied
i128
and $N others
note: required by a bound in `serde_json::to_string`
--> $CARGO/serde_json-1.0.133/src/ser.rs
--> $CARGO/serde_json-1.0.134/src/ser.rs
|
| pub fn to_string<T>(value: &T) -> Result<String>
| --------- required by a bound in this function
Expand Down
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/1.77+sync,async/deserialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(deserialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0412]: cannot find type `Foo` in this scope
--> tests/uncompilable/deserialize_off.rs
|
| let _json = serde_json::from_str::<Foo>(r#"{"v": "whatever"}"#);
| ^^^ not found in this scope

warning: unused imports: `Deserialize`, `Serialize`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/1.77+sync,async/serialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(serialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0422]: cannot find struct, variant or union type `Foo` in this scope
--> tests/uncompilable/serialize_off.rs
|
| let foo = Foo { v: "whatever" };
| ^^^ not found in this scope

warning: unused imports: `Deserialize`, `Serialize`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/1.77+sync/deserialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(deserialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0412]: cannot find type `Foo` in this scope
--> tests/uncompilable/deserialize_off.rs
|
| let _json = serde_json::from_str::<Foo>(r#"{"v": "whatever"}"#);
| ^^^ not found in this scope

warning: unused imports: `Deserialize`, `Serialize`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/1.77+sync/serialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(serialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0422]: cannot find struct, variant or union type `Foo` in this scope
--> tests/uncompilable/serialize_off.rs
|
| let foo = Foo { v: "whatever" };
| ^^^ not found in this scope

warning: unused imports: `Deserialize`, `Serialize`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/1.77/deserialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(deserialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0412]: cannot find type `Foo` in this scope
--> tests/uncompilable/deserialize_off.rs
|
| let _json = serde_json::from_str::<Foo>(r#"{"v": "whatever"}"#);
| ^^^ not found in this scope

warning: unused imports: `Deserialize`, `Serialize`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/1.77/serialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(serialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0422]: cannot find struct, variant or union type `Foo` in this scope
--> tests/uncompilable/serialize_off.rs
|
| let foo = Foo { v: "whatever" };
| ^^^ not found in this scope

warning: unused imports: `Deserialize`, `Serialize`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/stable+async/deserialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(deserialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0412]: cannot find type `Foo` in this scope
--> tests/uncompilable/deserialize_off.rs
|
| let _json = serde_json::from_str::<Foo>(r#"{"v": "whatever"}"#);
| ^^^ not found in this scope

warning: unused imports: `Deserialize` and `Serialize`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/stable+async/serialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(serialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0422]: cannot find struct, variant or union type `Foo` in this scope
--> tests/uncompilable/serialize_off.rs
|
| let foo = Foo { v: "whatever" };
| ^^^ not found in this scope

warning: unused imports: `Deserialize` and `Serialize`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ error[E0277]: the trait bound `Foo: Deserialize<'_>` is not satisfied
(T0, T1, T2, T3)
and $N others
note: required by a bound in `serde_json::from_str`
--> $CARGO/serde_json-1.0.133/src/de.rs
--> $CARGO/serde_json-1.0.134/src/de.rs
|
| pub fn from_str<'a, T>(s: &'a str) -> Result<T>
| -------- required by a bound in this function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ error[E0277]: the trait bound `Foo: Serialize` is not satisfied
(T0, T1, T2, T3, T4)
and $N others
note: required by a bound in `serde_json::to_string`
--> $CARGO/serde_json-1.0.133/src/ser.rs
--> $CARGO/serde_json-1.0.134/src/ser.rs
|
| pub fn to_string<T>(value: &T) -> Result<String>
| --------- required by a bound in this function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ error[E0277]: the trait bound `Foo: Deserialize<'_>` is not satisfied
(T0, T1, T2, T3)
and $N others
note: required by a bound in `serde_json::from_str`
--> $CARGO/serde_json-1.0.133/src/de.rs
--> $CARGO/serde_json-1.0.134/src/de.rs
|
| pub fn from_str<'a, T>(s: &'a str) -> Result<T>
| -------- required by a bound in this function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ error[E0277]: the trait bound `Foo: Serialize` is not satisfied
(T0, T1, T2, T3, T4)
and $N others
note: required by a bound in `serde_json::to_string`
--> $CARGO/serde_json-1.0.133/src/ser.rs
--> $CARGO/serde_json-1.0.134/src/ser.rs
|
| pub fn to_string<T>(value: &T) -> Result<String>
| --------- required by a bound in this function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(deserialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0412]: cannot find type `Foo` in this scope
--> tests/uncompilable/deserialize_off.rs
|
| let _json = serde_json::from_str::<Foo>(r#"{"v": "whatever"}"#);
| ^^^ not found in this scope

warning: unused imports: `Deserialize` and `Serialize`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/stable+sync,async/serialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(serialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0422]: cannot find struct, variant or union type `Foo` in this scope
--> tests/uncompilable/serialize_off.rs
|
| let foo = Foo { v: "whatever" };
| ^^^ not found in this scope

warning: unused imports: `Deserialize` and `Serialize`
--> tests/uncompilable/serialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
14 changes: 8 additions & 6 deletions fieldx/tests/uncompilable/stable+sync/deserialize_off.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ error: feature 'serde' is required
| #[fxstruct(sync, serde(deserialize(off)))]
| ^^^^^

error[E0432]: unresolved import `serde`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^ use of undeclared crate or module `serde`

error[E0412]: cannot find type `Foo` in this scope
--> tests/uncompilable/deserialize_off.rs
|
| let _json = serde_json::from_str::<Foo>(r#"{"v": "whatever"}"#);
| ^^^ not found in this scope

warning: unused imports: `Deserialize` and `Serialize`
--> tests/uncompilable/deserialize_off.rs
|
| use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Loading

0 comments on commit 8ef692e

Please sign in to comment.