-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (C) 2022 Scott Lamb <[email protected]> | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
#[test] | ||
fn test() { | ||
let t = trybuild::TestCases::new(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (C) 2022 Scott Lamb <[email protected]> | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
use static_xml_derive::Deserialize; | ||
|
||
struct Foo; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
error[E0277]: the trait bound `Foo: ParseText` is not satisfied | ||
--> tests/ui/field-not-parsetext.rs:7:5 | ||
| | ||
5 | #[derive(Deserialize)] | ||
| ----------- this tail expression is of type `&mut Foo` | ||
6 | struct Outer { | ||
7 | foo: Foo, | ||
| ^^^^^^^^ the trait `ParseText` is not implemented for `Foo` | ||
| | ||
= help: the following other types implement trait `ParseText`: | ||
String | ||
bool | ||
f32 | ||
f64 | ||
i128 | ||
i16 | ||
i32 | ||
i64 | ||
and $N others | ||
= note: required for `Foo` to implement `Deserialize` | ||
= note: required for `Foo` to implement `DeserializeElementField` | ||
--> tests/ui/field-not-parsetext.rs:10:5 | ||
| | ||
8 | #[derive(Deserialize)] | ||
| ----------- this tail expression is of type `&mut Foo` | ||
9 | struct Outer { | ||
10 | foo: Foo, | ||
| ^^^^^^^^ the trait `ParseText` is not implemented for `Foo` | ||
| | ||
= help: the following other types implement trait `ParseText`: | ||
String | ||
bool | ||
f32 | ||
f64 | ||
i128 | ||
i16 | ||
i32 | ||
i64 | ||
and $N others | ||
= note: required for `Foo` to implement `Deserialize` | ||
= note: required for `Foo` to implement `DeserializeElementField` | ||
|
||
error[E0277]: the trait bound `Foo: ParseText` is not satisfied | ||
--> tests/ui/field-not-parsetext.rs:7:5 | ||
| | ||
7 | foo: Foo, | ||
| ^^^^^^^^ the trait `ParseText` is not implemented for `Foo` | ||
| | ||
= help: the following other types implement trait `ParseText`: | ||
String | ||
bool | ||
f32 | ||
f64 | ||
i128 | ||
i16 | ||
i32 | ||
i64 | ||
and $N others | ||
= note: required for `Foo` to implement `Deserialize` | ||
= note: required for `Foo` to implement `DeserializeElementField` | ||
--> tests/ui/field-not-parsetext.rs:10:5 | ||
| | ||
10 | foo: Foo, | ||
| ^^^^^^^^ the trait `ParseText` is not implemented for `Foo` | ||
| | ||
= help: the following other types implement trait `ParseText`: | ||
String | ||
bool | ||
f32 | ||
f64 | ||
i128 | ||
i16 | ||
i32 | ||
i64 | ||
and $N others | ||
= note: required for `Foo` to implement `Deserialize` | ||
= note: required for `Foo` to implement `DeserializeElementField` |