diff --git a/Cargo.toml b/Cargo.toml index 0a16ebc..0b9f0f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/rust-num/num-derive" version = "0.3.3" readme = "README.md" exclude = ["/bors.toml", "/ci/*", "/.github/*"] -edition = "2018" +edition = "2021" rust-version = "1.56.0" [dependencies] @@ -28,13 +28,21 @@ name = "num_derive" proc-macro = true test = false -# Most of the tests are left implicily detected, compiled for Rust 2018, -# but let's try a few of them with the old 2015 edition too. +# Most of the tests are left implicily detected, compiled for Rust 2021, +# but let's try a few of them with the older editions too. [[test]] name = "newtype-2015" edition = "2015" +[[test]] +name = "newtype-2018" +edition = "2018" + [[test]] name = "trivial-2015" edition = "2015" + +[[test]] +name = "trivial-2018" +edition = "2018" diff --git a/tests/newtype-2018.rs b/tests/newtype-2018.rs new file mode 100644 index 0000000..814529e --- /dev/null +++ b/tests/newtype-2018.rs @@ -0,0 +1,2 @@ +// Same source, just compiled for 2018 edition +include!("newtype.rs"); diff --git a/tests/trivial-2018.rs b/tests/trivial-2018.rs new file mode 100644 index 0000000..92b971b --- /dev/null +++ b/tests/trivial-2018.rs @@ -0,0 +1,2 @@ +// Same source, just compiled for 2018 edition +include!("trivial.rs");