mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 00:21:04 +00:00
Switch ui tests to trybuild
This commit is contained in:
@@ -26,8 +26,6 @@ matrix:
|
|||||||
- cargo build --no-default-features --features alloc
|
- cargo build --no-default-features --features alloc
|
||||||
- cargo build --no-default-features --features rc,alloc
|
- cargo build --no-default-features --features rc,alloc
|
||||||
- cargo test --features derive,rc,unstable
|
- cargo test --features derive,rc,unstable
|
||||||
- cd "${TRAVIS_BUILD_DIR}/test_suite/deps"
|
|
||||||
- cargo build
|
|
||||||
- cd "${TRAVIS_BUILD_DIR}/test_suite"
|
- cd "${TRAVIS_BUILD_DIR}/test_suite"
|
||||||
- cargo test --features unstable
|
- cargo test --features unstable
|
||||||
- cd "${TRAVIS_BUILD_DIR}/test_suite/no_std"
|
- cd "${TRAVIS_BUILD_DIR}/test_suite/no_std"
|
||||||
|
|||||||
@@ -35,7 +35,5 @@ for:
|
|||||||
- cargo build --no-default-features --features alloc
|
- cargo build --no-default-features --features alloc
|
||||||
- cargo build --no-default-features --features rc,alloc
|
- cargo build --no-default-features --features rc,alloc
|
||||||
- cargo test --features derive,rc,unstable
|
- cargo test --features derive,rc,unstable
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%\test_suite\deps
|
|
||||||
- cargo build
|
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%\test_suite
|
- cd %APPVEYOR_BUILD_FOLDER%\test_suite
|
||||||
- cargo test --features unstable
|
- cargo test --features unstable
|
||||||
|
|||||||
@@ -7,14 +7,12 @@ publish = false
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
unstable = ["serde/unstable"]
|
unstable = ["serde/unstable"]
|
||||||
compiletest = ["compiletest_rs"]
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
rustc-serialize = "0.3.16"
|
rustc-serialize = "0.3.16"
|
||||||
|
select-rustc = "0.1"
|
||||||
serde = { path = "../serde", features = ["rc", "derive"] }
|
serde = { path = "../serde", features = ["rc", "derive"] }
|
||||||
serde_derive = { path = "../serde_derive", features = ["deserialize_in_place"] }
|
serde_derive = { path = "../serde_derive", features = ["deserialize_in_place"] }
|
||||||
serde_test = { path = "../serde_test" }
|
serde_test = { path = "../serde_test" }
|
||||||
|
trybuild = "1.0"
|
||||||
[dependencies]
|
|
||||||
compiletest_rs = { version = "0.3", optional = true, features = ["stable"] }
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "serde_test_suite_deps"
|
|
||||||
version = "0.0.0"
|
|
||||||
authors = ["David Tolnay <dtolnay@gmail.com>"]
|
|
||||||
publish = false
|
|
||||||
|
|
||||||
[workspace]
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
serde = { path = "../../serde" }
|
|
||||||
serde_derive = { path = "../../serde_derive" }
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#![feature(/*=============================================]
|
|
||||||
#![=== Serde test suite requires a nightly compiler. ===]
|
|
||||||
#![====================================================*/)]
|
|
||||||
@@ -1,21 +1,6 @@
|
|||||||
#![cfg(feature = "compiletest")]
|
#[rustc::attr(not(nightly), ignore)]
|
||||||
|
|
||||||
use compiletest_rs as compiletest;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn ui() {
|
fn ui() {
|
||||||
compiletest::run_tests(&compiletest::Config {
|
let t = trybuild::TestCases::new();
|
||||||
mode: compiletest::common::Mode::Ui,
|
t.compile_fail("tests/ui/**/*.rs");
|
||||||
src_base: std::path::PathBuf::from("tests/ui"),
|
|
||||||
target_rustcflags: Some(String::from(
|
|
||||||
"\
|
|
||||||
--edition=2018 \
|
|
||||||
-L deps/target/debug/deps \
|
|
||||||
-Z unstable-options \
|
|
||||||
--extern serde_derive \
|
|
||||||
",
|
|
||||||
)),
|
|
||||||
build_base: std::path::PathBuf::from("../target/ui"),
|
|
||||||
..Default::default()
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: failed to parse borrowed lifetimes: "zzz"
|
|||||||
|
|
|
|
||||||
5 | #[serde(borrow = "zzz")]
|
5 | #[serde(borrow = "zzz")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: duplicate borrowed lifetime `'a`
|
|||||||
|
|
|
|
||||||
5 | #[serde(borrow = "'a + 'a")]
|
5 | #[serde(borrow = "'a + 'a")]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: duplicate serde attribute `borrow`
|
|||||||
|
|
|
|
||||||
8 | #[serde(borrow)]
|
8 | #[serde(borrow)]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: at least one lifetime must be borrowed
|
|||||||
|
|
|
|
||||||
5 | #[serde(borrow = "")]
|
5 | #[serde(borrow = "")]
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: field `s` has no lifetimes to borrow
|
|||||||
5 | / #[serde(borrow)]
|
5 | / #[serde(borrow)]
|
||||||
6 | | s: String,
|
6 | | s: String,
|
||||||
| |_____________^
|
| |_____________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: #[serde(borrow)] may only be used on newtype variants
|
|||||||
8 | / #[serde(borrow)]
|
8 | / #[serde(borrow)]
|
||||||
9 | | S { s: Str<'a> },
|
9 | | S { s: Str<'a> },
|
||||||
| |____________________^
|
| |____________________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: field `s` does not have lifetime 'b
|
|||||||
5 | / #[serde(borrow = "'b")]
|
5 | / #[serde(borrow = "'b")]
|
||||||
6 | | s: &'a str,
|
6 | | s: &'a str,
|
||||||
| |______________^
|
| |______________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,3 @@ error: enum tags `conflict` for type and content conflict with each other
|
|||||||
7 | | B,
|
7 | | B,
|
||||||
8 | | }
|
8 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(flatten)] cannot be used on newtype structs
|
|||||||
|
|
|
|
||||||
6 | struct Foo(#[serde(flatten)] HashMap<String, String>);
|
6 | struct Foo(#[serde(flatten)] HashMap<String, String>);
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(flatten)] cannot be used on tuple structs
|
|||||||
|
|
|
|
||||||
6 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
|
6 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ error: variant field name `conflict` conflicts with internal tag
|
|||||||
9 | | },
|
9 | | },
|
||||||
10 | | }
|
10 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ error: variant field name `conflict` conflicts with internal tag
|
|||||||
9 | | },
|
9 | | },
|
||||||
10 | | }
|
10 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(default)] can only be used on structs with named fields
|
|||||||
|
|
|
|
||||||
5 | enum E {
|
5 | enum E {
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(default = "...")] can only be used on structs with named fields
|
|||||||
|
|
|
|
||||||
5 | enum E {
|
5 | enum E {
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(default)] can only be used on structs with named fields
|
|||||||
|
|
|
|
||||||
5 | struct T(u8, u8);
|
5 | struct T(u8, u8);
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(default = "...")] can only be used on structs with named fields
|
|||||||
|
|
|
|
||||||
5 | struct T(u8, u8);
|
5 | struct T(u8, u8);
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unknown serde field attribute `serialize`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename = "x", serialize = "y")]
|
5 | #[serde(rename = "x", serialize = "y")]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: duplicate serde attribute `rename`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename(serialize = "x"), rename(serialize = "y"))]
|
5 | #[serde(rename(serialize = "x"), rename(serialize = "y"))]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: duplicate serde attribute `rename`
|
|||||||
|
|
|
|
||||||
6 | #[serde(rename = "y")]
|
6 | #[serde(rename = "y")]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: duplicate serde attribute `rename`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename(serialize = "x", serialize = "y"))]
|
5 | #[serde(rename(serialize = "x", serialize = "y"))]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: duplicate serde attribute `rename`
|
|||||||
|
|
|
|
||||||
6 | #[serde(rename(serialize = "y"))]
|
6 | #[serde(rename(serialize = "y"))]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: duplicate serde attribute `serialize_with`
|
|||||||
|
|
|
|
||||||
5 | #[serde(with = "w", serialize_with = "s")]
|
5 | #[serde(with = "w", serialize_with = "s")]
|
||||||
| ^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(tag = "...", content = "...")] must be used together
|
|||||||
|
|
|
|
||||||
4 | #[serde(content = "c")]
|
4 | #[serde(content = "c")]
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(tag = "...")] cannot be used with tuple variants
|
|||||||
|
|
|
|
||||||
6 | Tuple(u8, u8),
|
6 | Tuple(u8, u8),
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,3 @@ error: untagged enum cannot have #[serde(tag = "...", content = "...")]
|
|||||||
|
|
|
|
||||||
5 | #[serde(tag = "t", content = "c")]
|
5 | #[serde(tag = "t", content = "c")]
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ error: untagged enum cannot have #[serde(content = "...")]
|
|||||||
|
|
|
|
||||||
5 | #[serde(content = "c")]
|
5 | #[serde(content = "c")]
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ error: enum cannot be both untagged and internally tagged
|
|||||||
|
|
|
|
||||||
5 | #[serde(tag = "type")]
|
5 | #[serde(tag = "type")]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(untagged)] can only be used on enums
|
|||||||
|
|
|
|
||||||
5 | struct S;
|
5 | struct S;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: expected serde rename attribute to be a string: `rename = "..."`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename = true)]
|
5 | #[serde(rename = true)]
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: expected serde rename attribute to be a string: `rename = "..."`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename = b'a')]
|
5 | #[serde(rename = b'a')]
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: expected serde rename attribute to be a string: `rename = "..."`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename = b"byte string")]
|
5 | #[serde(rename = b"byte string")]
|
||||||
| ^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: expected serde rename attribute to be a string: `rename = "..."`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename = 'a')]
|
5 | #[serde(rename = 'a')]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: expected serde rename attribute to be a string: `rename = "..."`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename = 3.14)]
|
5 | #[serde(rename = 3.14)]
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: expected serde rename attribute to be a string: `rename = "..."`
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename = 100)]
|
5 | #[serde(rename = 100)]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both b
|
|||||||
|
|
|
|
||||||
4 | #[serde(field_identifier, variant_identifier)]
|
4 | #[serde(field_identifier, variant_identifier)]
|
||||||
| ^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(field_identifier)] can only be used on an enum
|
|||||||
|
|
|
|
||||||
5 | struct S;
|
5 | struct S;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(field_identifier)] may only contain unit variants
|
|||||||
|
|
|
|
||||||
7 | B(u8, u8),
|
7 | B(u8, u8),
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: `Other` must be the last variant
|
|||||||
|
|
|
|
||||||
7 | Other(String),
|
7 | Other(String),
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: #[serde(other)] must be on a unit variant
|
|||||||
7 | / #[serde(other)]
|
7 | / #[serde(other)]
|
||||||
8 | | Other(u8, u8),
|
8 | | Other(u8, u8),
|
||||||
| |_________________^
|
| |_________________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: #[serde(other)] must be on the last variant
|
|||||||
7 | / #[serde(other)]
|
7 | / #[serde(other)]
|
||||||
8 | | Other,
|
8 | | Other,
|
||||||
| |_________^
|
| |_________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: #[serde(other)] cannot appear on untagged enum
|
|||||||
6 | / #[serde(other)]
|
6 | / #[serde(other)]
|
||||||
7 | | Other,
|
7 | | Other,
|
||||||
| |_________^
|
| |_________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: #[serde(other)] may not be used on a variant identifier
|
|||||||
6 | / #[serde(other)]
|
6 | / #[serde(other)]
|
||||||
7 | | Other,
|
7 | | Other,
|
||||||
| |_________^
|
| |_________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(variant_identifier)] can only be used on an enum
|
|||||||
|
|
|
|
||||||
5 | struct S;
|
5 | struct S;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(variant_identifier)] may only contain unit variants
|
|||||||
|
|
|
|
||||||
7 | B(u8, u8),
|
7 | B(u8, u8),
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: malformed bound attribute, expected `bound(serialize = ..., deserialize =
|
|||||||
|
|
|
|
||||||
5 | #[serde(bound(unknown))]
|
5 | #[serde(bound(unknown))]
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: malformed rename attribute, expected `rename(serialize = ..., deserialize
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename(unknown))]
|
5 | #[serde(rename(unknown))]
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: cannot deserialize when there is a lifetime parameter called 'de
|
|||||||
|
|
|
|
||||||
4 | struct S<'de> {
|
4 | struct S<'de> {
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,3 @@ error: cannot deserialize a dynamically sized struct
|
|||||||
6 | | slice: [u8],
|
6 | | slice: [u8],
|
||||||
7 | | }
|
7 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,3 @@ error: field identifiers cannot be serialized
|
|||||||
7 | | B,
|
7 | | B,
|
||||||
8 | | }
|
8 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,3 @@ error: variant identifiers cannot be serialized
|
|||||||
7 | | B,
|
7 | | B,
|
||||||
8 | | }
|
8 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: failed to parse path: "~~~"
|
|||||||
|
|
|
|
||||||
12 | #[serde(getter = "~~~")]
|
12 | #[serde(getter = "~~~")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: failed to parse path: "~~~"
|
|||||||
|
|
|
|
||||||
10 | #[serde(remote = "~~~")]
|
10 | #[serde(remote = "~~~")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ error: #[serde(getter = "...")] is not allowed in an enum
|
|||||||
15 | | },
|
15 | | },
|
||||||
16 | | }
|
16 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,4 @@ error[E0063]: missing field `b` in initializer of `remote::S`
|
|||||||
11 | #[serde(remote = "remote::S")]
|
11 | #[serde(remote = "remote::S")]
|
||||||
| ^^^^^^^^^^^ missing `b`
|
| ^^^^^^^^^^^ missing `b`
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0063`.
|
For more information about this error, try `rustc --explain E0063`.
|
||||||
|
|||||||
@@ -6,6 +6,3 @@ error: #[serde(getter = "...")] can only be used in structs that have #[serde(re
|
|||||||
6 | | a: u8,
|
6 | | a: u8,
|
||||||
7 | | }
|
7 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,5 @@ error[E0560]: struct `remote::S` has no field named `b`
|
|||||||
12 | b: u8,
|
12 | b: u8,
|
||||||
| ^ help: a field with a similar name exists: `a`
|
| ^ help: a field with a similar name exists: `a`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
|
||||||
|
|
||||||
Some errors have detailed explanations: E0560, E0609.
|
Some errors have detailed explanations: E0560, E0609.
|
||||||
For more information about an error, try `rustc --explain E0560`.
|
For more information about an error, try `rustc --explain E0560`.
|
||||||
|
|||||||
@@ -3,11 +3,5 @@ error[E0308]: mismatched types
|
|||||||
|
|
|
|
||||||
7 | #[derive(Deserialize)]
|
7 | #[derive(Deserialize)]
|
||||||
| ^^^^^^^^^^^ expected u16, found u8
|
| ^^^^^^^^^^^ expected u16, found u8
|
||||||
help: you can cast an `u8` to `u16`, which will zero-extend the source value
|
|
||||||
|
|
|
||||||
7 | #[derive(Deserialize.into())]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0308`.
|
For more information about this error, try `rustc --explain E0308`.
|
||||||
|
|||||||
@@ -7,6 +7,4 @@ error[E0308]: mismatched types
|
|||||||
= note: expected type `&u8`
|
= note: expected type `&u8`
|
||||||
found type `&u16`
|
found type `&u16`
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0308`.
|
For more information about this error, try `rustc --explain E0308`.
|
||||||
|
|||||||
@@ -7,6 +7,4 @@ error[E0308]: mismatched types
|
|||||||
= note: expected type `&u8`
|
= note: expected type `&u8`
|
||||||
found type `&u16`
|
found type `&u16`
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0308`.
|
For more information about this error, try `rustc --explain E0308`.
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unknown rename rule for #[serde(rename_all = "abc")]
|
|||||||
|
|
|
|
||||||
4 | #[serde(rename_all = "abc")]
|
4 | #[serde(rename_all = "abc")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unknown rename rule for #[serde(rename_all = "abc")]
|
|||||||
|
|
|
|
||||||
5 | #[serde(rename_all = "abc")]
|
5 | #[serde(rename_all = "abc")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(tag = "...")] can only be used on enums and structs with named fi
|
|||||||
|
|
|
|
||||||
5 | struct S(u8, u8);
|
5 | struct S(u8, u8);
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: #[serde(tag = "...")] can only be used on enums and structs with named fi
|
|||||||
|
|
|
|
||||||
3 | #[derive(Serialize)]
|
3 | #[derive(Serialize)]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,3 @@ error: #[serde(transparent)] requires struct to have at most one transparent fie
|
|||||||
7 | | b: u8,
|
7 | | b: u8,
|
||||||
8 | | }
|
8 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ error: #[serde(transparent)] requires at least one field that is neither skipped
|
|||||||
9 | | b: u8,
|
9 | | b: u8,
|
||||||
10 | | }
|
10 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: #[serde(transparent)] is not allowed on an enum
|
|||||||
4 | / #[serde(transparent)]
|
4 | / #[serde(transparent)]
|
||||||
5 | | enum E {}
|
5 | | enum E {}
|
||||||
| |_________^
|
| |_________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,3 @@ error: #[serde(transparent)] requires at least one field that is not skipped
|
|||||||
7 | | a: u8,
|
7 | | a: u8,
|
||||||
8 | | }
|
8 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: #[serde(transparent)] is not allowed on a unit struct
|
|||||||
4 | / #[serde(transparent)]
|
4 | / #[serde(transparent)]
|
||||||
5 | | struct S;
|
5 | | struct S;
|
||||||
| |_________^
|
| |_________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,3 @@ error: #[serde(transparent)] is not allowed with #[serde(from = "...")]
|
|||||||
6 | | a: u8,
|
6 | | a: u8,
|
||||||
7 | | }
|
7 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,3 @@ error: #[serde(transparent)] is not allowed with #[serde(into = "...")]
|
|||||||
6 | | a: u8,
|
6 | | a: u8,
|
||||||
7 | | }
|
7 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: failed to parse type: from = "Option<T"
|
|||||||
|
|
|
|
||||||
4 | #[serde(from = "Option<T")]
|
4 | #[serde(from = "Option<T")]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: failed to parse type: into = "Option<T"
|
|||||||
|
|
|
|
||||||
4 | #[serde(into = "Option<T")]
|
4 | #[serde(into = "Option<T")]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unexpected literal in serde container attribute
|
|||||||
|
|
|
|
||||||
4 | #[serde("literal")]
|
4 | #[serde("literal")]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unexpected literal in serde field attribute
|
|||||||
|
|
|
|
||||||
5 | #[serde("literal")]
|
5 | #[serde("literal")]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unexpected literal in serde variant attribute
|
|||||||
|
|
|
|
||||||
5 | #[serde("literal")]
|
5 | #[serde("literal")]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unknown serde container attribute `abc`
|
|||||||
|
|
|
|
||||||
4 | #[serde(abc = "xyz")]
|
4 | #[serde(abc = "xyz")]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unknown serde field attribute `abc`
|
|||||||
|
|
|
|
||||||
5 | #[serde(abc = "xyz")]
|
5 | #[serde(abc = "xyz")]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ error: unknown serde variant attribute `abc`
|
|||||||
|
|
|
|
||||||
5 | #[serde(abc = "xyz")]
|
5 | #[serde(abc = "xyz")]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,3 @@ error: Serde does not support derive for unions
|
|||||||
6 | | y: (),
|
6 | | y: (),
|
||||||
7 | | }
|
7 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,3 @@ error: Serde does not support derive for unions
|
|||||||
6 | | y: (),
|
6 | | y: (),
|
||||||
7 | | }
|
7 | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
|
||||||
# file at the top-level directory of this distribution and at
|
|
||||||
# http://rust-lang.org/COPYRIGHT.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
||||||
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
||||||
# option. This file may not be copied, modified, or distributed
|
|
||||||
# except according to those terms.
|
|
||||||
|
|
||||||
# A script to update the references for particular tests. The idea is
|
|
||||||
# that you do a run, which will generate files in the build directory
|
|
||||||
# containing the (normalized) actual output of the compiler. This
|
|
||||||
# script will then copy that output and replace the "expected output"
|
|
||||||
# files. You can then commit the changes.
|
|
||||||
#
|
|
||||||
# If you find yourself manually editing a foo.stderr file, you're
|
|
||||||
# doing it wrong.
|
|
||||||
|
|
||||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
||||||
BUILD_DIR="../../../target/ui"
|
|
||||||
|
|
||||||
for testcase in */*.rs; do
|
|
||||||
STDERR_NAME="${testcase/%.rs/.stderr}"
|
|
||||||
STDOUT_NAME="${testcase/%.rs/.stdout}"
|
|
||||||
if [ -f "$BUILD_DIR/$STDOUT_NAME" ] && \
|
|
||||||
! (diff "$BUILD_DIR/$STDOUT_NAME" "$STDOUT_NAME" >& /dev/null); then
|
|
||||||
echo "updating $STDOUT_NAME"
|
|
||||||
cp "$BUILD_DIR/$STDOUT_NAME" "$STDOUT_NAME"
|
|
||||||
fi
|
|
||||||
if [ -f "$BUILD_DIR/$STDERR_NAME" ] && \
|
|
||||||
! (diff "$BUILD_DIR/$STDERR_NAME" "$STDERR_NAME" >& /dev/null); then
|
|
||||||
echo "updating $STDERR_NAME"
|
|
||||||
cp "$BUILD_DIR/$STDERR_NAME" "$STDERR_NAME"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
@@ -4,6 +4,3 @@ error: variant `Newtype` cannot have both #[serde(deserialize_with)] and a field
|
|||||||
5 | / #[serde(deserialize_with = "deserialize_some_newtype_variant")]
|
5 | / #[serde(deserialize_with = "deserialize_some_newtype_variant")]
|
||||||
6 | | Newtype(#[serde(skip_deserializing)] String),
|
6 | | Newtype(#[serde(skip_deserializing)] String),
|
||||||
| |________________________________________________^
|
| |________________________________________________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,3 @@ error: variant `Struct` cannot have both #[serde(deserialize_with)] and a field
|
|||||||
9 | | f2: u8,
|
9 | | f2: u8,
|
||||||
10 | | },
|
10 | | },
|
||||||
| |_____^
|
| |_____^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: variant `Tuple` cannot have both #[serde(deserialize_with)] and a field #
|
|||||||
5 | / #[serde(deserialize_with = "deserialize_some_other_variant")]
|
5 | / #[serde(deserialize_with = "deserialize_some_other_variant")]
|
||||||
6 | | Tuple(#[serde(skip_deserializing)] String, u8),
|
6 | | Tuple(#[serde(skip_deserializing)] String, u8),
|
||||||
| |__________________________________________________^
|
| |__________________________________________________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,3 @@ error: variant `Unit` cannot have both #[serde(deserialize_with)] and #[serde(sk
|
|||||||
6 | | #[serde(skip_deserializing)]
|
6 | | #[serde(skip_deserializing)]
|
||||||
7 | | Unit,
|
7 | | Unit,
|
||||||
| |________^
|
| |________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: variant `Newtype` cannot have both #[serde(serialize_with)] and a field #
|
|||||||
5 | / #[serde(serialize_with = "serialize_some_newtype_variant")]
|
5 | / #[serde(serialize_with = "serialize_some_newtype_variant")]
|
||||||
6 | | Newtype(#[serde(skip_serializing)] String),
|
6 | | Newtype(#[serde(skip_serializing)] String),
|
||||||
| |______________________________________________^
|
| |______________________________________________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: variant `Newtype` cannot have both #[serde(serialize_with)] and a field #
|
|||||||
5 | / #[serde(serialize_with = "serialize_some_newtype_variant")]
|
5 | / #[serde(serialize_with = "serialize_some_newtype_variant")]
|
||||||
6 | | Newtype(#[serde(skip_serializing_if = "always")] String),
|
6 | | Newtype(#[serde(skip_serializing_if = "always")] String),
|
||||||
| |____________________________________________________________^
|
| |____________________________________________________________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,3 @@ error: variant `Struct` cannot have both #[serde(serialize_with)] and a field `f
|
|||||||
9 | | f2: u8,
|
9 | | f2: u8,
|
||||||
10 | | },
|
10 | | },
|
||||||
| |_____^
|
| |_____^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,3 @@ error: variant `Struct` cannot have both #[serde(serialize_with)] and a field `f
|
|||||||
9 | | f2: u8,
|
9 | | f2: u8,
|
||||||
10 | | },
|
10 | | },
|
||||||
| |_____^
|
| |_____^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: variant `Tuple` cannot have both #[serde(serialize_with)] and a field #0
|
|||||||
5 | / #[serde(serialize_with = "serialize_some_other_variant")]
|
5 | / #[serde(serialize_with = "serialize_some_other_variant")]
|
||||||
6 | | Tuple(#[serde(skip_serializing)] String, u8),
|
6 | | Tuple(#[serde(skip_serializing)] String, u8),
|
||||||
| |________________________________________________^
|
| |________________________________________________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,3 @@ error: variant `Tuple` cannot have both #[serde(serialize_with)] and a field #0
|
|||||||
5 | / #[serde(serialize_with = "serialize_some_other_variant")]
|
5 | / #[serde(serialize_with = "serialize_some_other_variant")]
|
||||||
6 | | Tuple(#[serde(skip_serializing_if = "always")] String, u8),
|
6 | | Tuple(#[serde(skip_serializing_if = "always")] String, u8),
|
||||||
| |______________________________________________________________^
|
| |______________________________________________________________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,3 @@ error: variant `Unit` cannot have both #[serde(serialize_with)] and #[serde(skip
|
|||||||
6 | | #[serde(skip_serializing)]
|
6 | | #[serde(skip_serializing)]
|
||||||
7 | | Unit,
|
7 | | Unit,
|
||||||
| |________^
|
| |________^
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user