diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 68bc82d2..fb97a0fc 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rocket-benchmarks" version = "0.0.0" -edition = "2018" +edition = "2021" publish = false [workspace] diff --git a/contrib/db_pools/codegen/Cargo.toml b/contrib/db_pools/codegen/Cargo.toml index 770388c7..cdae7fce 100644 --- a/contrib/db_pools/codegen/Cargo.toml +++ b/contrib/db_pools/codegen/Cargo.toml @@ -7,7 +7,8 @@ repository = "https://github.com/SergioBenitez/Rocket/contrib/db_pools" readme = "../README.md" keywords = ["rocket", "framework", "database", "pools"] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" +rust-version = "1.56" [lib] proc-macro = true diff --git a/contrib/db_pools/lib/Cargo.toml b/contrib/db_pools/lib/Cargo.toml index ecad3c7e..8767824b 100644 --- a/contrib/db_pools/lib/Cargo.toml +++ b/contrib/db_pools/lib/Cargo.toml @@ -7,7 +7,8 @@ repository = "https://github.com/SergioBenitez/Rocket/contrib/db_pools" readme = "../README.md" keywords = ["rocket", "framework", "database", "pools"] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" +rust-version = "1.56" [package.metadata.docs.rs] all-features = true diff --git a/contrib/dyn_templates/Cargo.toml b/contrib/dyn_templates/Cargo.toml index d6dd21f8..8bf15c9d 100644 --- a/contrib/dyn_templates/Cargo.toml +++ b/contrib/dyn_templates/Cargo.toml @@ -9,7 +9,8 @@ repository = "https://github.com/SergioBenitez/Rocket/tree/master/contrib/dyn_te readme = "README.md" keywords = ["rocket", "framework", "templates", "templating", "engine"] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" +rust-version = "1.56" [features] tera = ["tera_"] diff --git a/contrib/sync_db_pools/codegen/Cargo.toml b/contrib/sync_db_pools/codegen/Cargo.toml index 86b794dd..a7bd2388 100644 --- a/contrib/sync_db_pools/codegen/Cargo.toml +++ b/contrib/sync_db_pools/codegen/Cargo.toml @@ -7,7 +7,8 @@ repository = "https://github.com/SergioBenitez/Rocket/contrib/sync_db_pools" readme = "../README.md" keywords = ["rocket", "framework", "database", "pools"] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" +rust-version = "1.56" [lib] proc-macro = true diff --git a/contrib/sync_db_pools/lib/Cargo.toml b/contrib/sync_db_pools/lib/Cargo.toml index 73c4d3d1..0d37acfc 100644 --- a/contrib/sync_db_pools/lib/Cargo.toml +++ b/contrib/sync_db_pools/lib/Cargo.toml @@ -7,7 +7,8 @@ repository = "https://github.com/SergioBenitez/Rocket/tree/v0.5-rc/contrib/sync_ readme = "../README.md" keywords = ["rocket", "framework", "database", "pools"] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" +rust-version = "1.56" [features] diesel_sqlite_pool = ["diesel/sqlite", "diesel/r2d2"] diff --git a/contrib/sync_db_pools/lib/src/poolable.rs b/contrib/sync_db_pools/lib/src/poolable.rs index 9ba895f0..4e7a34c1 100644 --- a/contrib/sync_db_pools/lib/src/poolable.rs +++ b/contrib/sync_db_pools/lib/src/poolable.rs @@ -60,7 +60,7 @@ use crate::{Config, Error}; /// # impl self::r2d2::ManageConnection for ConnectionManager { /// # type Connection = Connection; /// # type Error = Error; -/// # fn connect(&self) -> Result { panic!(()) } +/// # fn connect(&self) -> Result { panic!() } /// # fn is_valid(&self, _: &mut Connection) -> Result<()> { panic!() } /// # fn has_broken(&self, _: &mut Connection) -> bool { panic!() } /// # } diff --git a/core/codegen/Cargo.toml b/core/codegen/Cargo.toml index 7d9f67c3..d7deacd8 100644 --- a/core/codegen/Cargo.toml +++ b/core/codegen/Cargo.toml @@ -9,7 +9,8 @@ repository = "https://github.com/SergioBenitez/Rocket" readme = "../../README.md" keywords = ["rocket", "web", "framework", "code", "generation"] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" +rust-version = "1.56" [lib] proc-macro = true diff --git a/core/http/Cargo.toml b/core/http/Cargo.toml index 01dbe513..c021f6f3 100644 --- a/core/http/Cargo.toml +++ b/core/http/Cargo.toml @@ -12,7 +12,8 @@ readme = "../../README.md" keywords = ["rocket", "web", "framework", "http"] license = "MIT OR Apache-2.0" categories = ["web-programming"] -edition = "2018" +edition = "2021" +rust-version = "1.56" [features] default = [] diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index 6deb9445..10f0d8bb 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -13,7 +13,8 @@ keywords = ["rocket", "web", "framework", "server"] license = "MIT OR Apache-2.0" build = "build.rs" categories = ["web-programming::http-server"] -edition = "2018" +edition = "2021" +rust-version = "1.56" [package.metadata.docs.rs] all-features = true @@ -82,7 +83,6 @@ features = ["io"] version = "1.0" [build-dependencies] -yansi = "0.5" version_check = "0.9.1" [dev-dependencies] diff --git a/core/lib/build.rs b/core/lib/build.rs index dd11943b..99369685 100644 --- a/core/lib/build.rs +++ b/core/lib/build.rs @@ -1,23 +1,4 @@ -//! Ensures Rocket isn't compiled with an incompatible version of Rust. - -use yansi::{Paint, Color::{Red, Yellow}}; - fn main() { - const MIN_VERSION: &str = "1.46.0"; - - if let Some(version) = version_check::Version::read() { - if !version.at_least(MIN_VERSION) { - let msg = "Rocket requires a more recent version of rustc."; - eprintln!("{} {}", Red.paint("Error:").bold(), Paint::new(msg).bold()); - eprintln!("Installed version: {}", Yellow.paint(version)); - eprintln!("Minimum required: {}", Yellow.paint(MIN_VERSION)); - panic!("Aborting compilation due to incompatible compiler.") - } - } else { - println!("cargo:warning=Rocket was unable to check rustc compiler compatibility."); - println!("cargo:warning=Build may fail due to incompatible rustc version."); - } - if let Some(true) = version_check::is_feature_flaggable() { println!("cargo:rustc-cfg=nightly"); } diff --git a/core/lib/fuzz/Cargo.toml b/core/lib/fuzz/Cargo.toml index a8334caa..5e12bea4 100644 --- a/core/lib/fuzz/Cargo.toml +++ b/core/lib/fuzz/Cargo.toml @@ -4,7 +4,7 @@ name = "rocket-fuzz" version = "0.0.0" authors = ["Automatically generated"] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/examples/chat/Cargo.toml b/examples/chat/Cargo.toml index 1397141c..24b9768b 100644 --- a/examples/chat/Cargo.toml +++ b/examples/chat/Cargo.toml @@ -2,7 +2,7 @@ name = "chat" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/config/Cargo.toml b/examples/config/Cargo.toml index 20e6ad1b..26ea10d3 100644 --- a/examples/config/Cargo.toml +++ b/examples/config/Cargo.toml @@ -2,7 +2,7 @@ name = "config" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/cookies/Cargo.toml b/examples/cookies/Cargo.toml index 847a0686..a0e1013c 100644 --- a/examples/cookies/Cargo.toml +++ b/examples/cookies/Cargo.toml @@ -2,7 +2,7 @@ name = "cookies" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/databases/Cargo.toml b/examples/databases/Cargo.toml index 1556db32..67810761 100644 --- a/examples/databases/Cargo.toml +++ b/examples/databases/Cargo.toml @@ -2,7 +2,7 @@ name = "databases" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/error-handling/Cargo.toml b/examples/error-handling/Cargo.toml index 6075b1f0..c19138a7 100644 --- a/examples/error-handling/Cargo.toml +++ b/examples/error-handling/Cargo.toml @@ -2,7 +2,7 @@ name = "error-handling" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/fairings/Cargo.toml b/examples/fairings/Cargo.toml index 93e939a7..5180b73b 100644 --- a/examples/fairings/Cargo.toml +++ b/examples/fairings/Cargo.toml @@ -2,7 +2,7 @@ name = "fairings" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/forms/Cargo.toml b/examples/forms/Cargo.toml index 6f431e91..68b7ea37 100644 --- a/examples/forms/Cargo.toml +++ b/examples/forms/Cargo.toml @@ -2,7 +2,7 @@ name = "forms" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/hello/Cargo.toml b/examples/hello/Cargo.toml index 9d2442a4..4546b8c8 100644 --- a/examples/hello/Cargo.toml +++ b/examples/hello/Cargo.toml @@ -2,7 +2,7 @@ name = "hello" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/manual-routing/Cargo.toml b/examples/manual-routing/Cargo.toml index fef9e587..271ff9f3 100644 --- a/examples/manual-routing/Cargo.toml +++ b/examples/manual-routing/Cargo.toml @@ -2,7 +2,7 @@ name = "manual_routes" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/pastebin/Cargo.toml b/examples/pastebin/Cargo.toml index b567b25e..382bc409 100644 --- a/examples/pastebin/Cargo.toml +++ b/examples/pastebin/Cargo.toml @@ -2,7 +2,7 @@ name = "pastebin" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/responders/Cargo.toml b/examples/responders/Cargo.toml index 4bcc40f4..5edb74ec 100644 --- a/examples/responders/Cargo.toml +++ b/examples/responders/Cargo.toml @@ -2,7 +2,7 @@ name = "responders" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/serialization/Cargo.toml b/examples/serialization/Cargo.toml index 1175b332..b53b924f 100644 --- a/examples/serialization/Cargo.toml +++ b/examples/serialization/Cargo.toml @@ -2,7 +2,7 @@ name = "serialization" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies.rocket] diff --git a/examples/state/Cargo.toml b/examples/state/Cargo.toml index 41117c6e..c2f518f5 100644 --- a/examples/state/Cargo.toml +++ b/examples/state/Cargo.toml @@ -2,7 +2,7 @@ name = "state" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/static-files/Cargo.toml b/examples/static-files/Cargo.toml index 4fab9ba5..0f5cafb1 100644 --- a/examples/static-files/Cargo.toml +++ b/examples/static-files/Cargo.toml @@ -2,7 +2,7 @@ name = "static-files" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/templating/Cargo.toml b/examples/templating/Cargo.toml index 9d2146ee..1fcee3c3 100644 --- a/examples/templating/Cargo.toml +++ b/examples/templating/Cargo.toml @@ -2,7 +2,7 @@ name = "templating" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/testing/Cargo.toml b/examples/testing/Cargo.toml index 79d053f1..f15eac40 100644 --- a/examples/testing/Cargo.toml +++ b/examples/testing/Cargo.toml @@ -2,7 +2,7 @@ name = "testing" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/tls/Cargo.toml b/examples/tls/Cargo.toml index f179fbfa..50eb6511 100644 --- a/examples/tls/Cargo.toml +++ b/examples/tls/Cargo.toml @@ -2,7 +2,7 @@ name = "tls" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/examples/todo/Cargo.toml b/examples/todo/Cargo.toml index 6e1c0e0a..854570a9 100644 --- a/examples/todo/Cargo.toml +++ b/examples/todo/Cargo.toml @@ -2,7 +2,7 @@ name = "todo" version = "0.0.0" workspace = "../" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/site/tests/Cargo.toml b/site/tests/Cargo.toml index e95491bf..5a01ce73 100644 --- a/site/tests/Cargo.toml +++ b/site/tests/Cargo.toml @@ -2,7 +2,7 @@ name = "rocket_guide_tests" version = "0.5.0-rc.1" workspace = "../../" -edition = "2018" +edition = "2021" publish = false [dependencies]