diff --git a/contrib/codegen/Cargo.toml b/contrib/codegen/Cargo.toml index 6742b01d..9320ff05 100644 --- a/contrib/codegen/Cargo.toml +++ b/contrib/codegen/Cargo.toml @@ -26,6 +26,6 @@ yansi = "0.5" version_check = "0.9.1" [dev-dependencies] -compiletest_rs = { version = "0.3", features = ["stable"] } rocket = { version = "0.4.5", path = "../../core/lib" } rocket_contrib = { version = "0.4.5", path = "../lib", features = ["diesel_sqlite_pool"] } +trybuild = "1.0" diff --git a/contrib/codegen/tests/compile-test.rs b/contrib/codegen/tests/compile-test.rs deleted file mode 100644 index d0d9cfda..00000000 --- a/contrib/codegen/tests/compile-test.rs +++ /dev/null @@ -1,102 +0,0 @@ -extern crate compiletest_rs as compiletest; - -use std::path::{Path, PathBuf}; -use std::{io, fs::Metadata, time::SystemTime}; - -#[derive(Copy, Clone)] -enum Kind { - #[allow(dead_code)] - Dynamic, - Static -} - -impl Kind { - fn extension(self) -> &'static str { - match self { - #[cfg(windows)] Kind::Dynamic => ".dll", - #[cfg(all(unix, target_os = "macos"))] Kind::Dynamic => ".dylib", - #[cfg(all(unix, not(target_os = "macos")))] Kind::Dynamic => ".so", - Kind::Static => ".rlib" - } - } -} - -fn target_path() -> PathBuf { - #[cfg(debug_assertions)] const ENVIRONMENT: &str = "debug"; - #[cfg(not(debug_assertions))] const ENVIRONMENT: &str = "release"; - - Path::new(env!("CARGO_MANIFEST_DIR")) - .parent().unwrap().parent().unwrap() - .join("target") - .join(ENVIRONMENT) -} - -fn link_flag(flag: &str, lib: &str, rel_path: &[&str]) -> String { - let mut path = target_path(); - for component in rel_path { - path = path.join(component); - } - - format!("{} {}={}", flag, lib, path.display()) -} - -fn best_time_for(metadata: &Metadata) -> SystemTime { - metadata.created() - .or_else(|_| metadata.modified()) - .or_else(|_| metadata.accessed()) - .unwrap_or_else(|_| SystemTime::now()) -} - -fn extern_dep(name: &str, kind: Kind) -> io::Result { - let deps_root = target_path().join("deps"); - let dep_name = format!("lib{}", name); - - let mut dep_path: Option = None; - for entry in deps_root.read_dir().expect("read_dir call failed") { - let entry = match entry { - Ok(entry) => entry, - Err(_) => continue - }; - - let filename = entry.file_name(); - let filename = filename.to_string_lossy(); - let lib_name = filename.split('.').next().unwrap().split('-').next().unwrap(); - - if lib_name == dep_name && filename.ends_with(kind.extension()) { - if let Some(ref mut existing) = dep_path { - if best_time_for(&entry.metadata()?) > best_time_for(&existing.metadata()?) { - *existing = entry.path().into(); - } - } else { - dep_path = Some(entry.path().into()); - } - } - } - - let dep = dep_path.ok_or_else(|| io::Error::from(io::ErrorKind::NotFound))?; - let filename = dep.file_name().ok_or_else(|| io::Error::from(io::ErrorKind::InvalidData))?; - Ok(link_flag("--extern", name, &["deps", &filename.to_string_lossy()])) -} - -fn run_mode(mode: &'static str, path: &'static str) { - let mut config = compiletest::Config::default(); - config.mode = mode.parse().expect("invalid mode"); - config.src_base = format!("tests/{}", path).into(); - config.clean_rmeta(); - - config.target_rustcflags = Some([ - link_flag("-L", "crate", &[]), - link_flag("-L", "dependency", &["deps"]), - extern_dep("rocket_http", Kind::Static).expect("find http dep"), - extern_dep("rocket", Kind::Static).expect("find core dep"), - extern_dep("rocket_contrib", Kind::Static).expect("find contrib dep"), - ].join(" ")); - - compiletest::run_tests(&config); -} - -#[test] -fn compile_test() { - run_mode("ui", "ui-fail"); - run_mode("compile-fail", "ui-fail"); -} diff --git a/contrib/codegen/tests/ui-fail.rs b/contrib/codegen/tests/ui-fail.rs new file mode 100644 index 00000000..fd7e5325 --- /dev/null +++ b/contrib/codegen/tests/ui-fail.rs @@ -0,0 +1,5 @@ +#[test] +fn ui() { + let t = trybuild::TestCases::new(); + t.compile_fail("tests/ui-fail/*.rs"); +} diff --git a/contrib/codegen/tests/ui-fail/database-syntax.rs b/contrib/codegen/tests/ui-fail/database-syntax.rs index 39b164a8..8d7e2123 100644 --- a/contrib/codegen/tests/ui-fail/database-syntax.rs +++ b/contrib/codegen/tests/ui-fail/database-syntax.rs @@ -1,5 +1,6 @@ #[macro_use] extern crate rocket_contrib; +#[allow(unused_imports)] use rocket_contrib::databases::diesel; #[database] diff --git a/contrib/codegen/tests/ui-fail/database-syntax.stderr b/contrib/codegen/tests/ui-fail/database-syntax.stderr index 90bbb6ba..83556385 100644 --- a/contrib/codegen/tests/ui-fail/database-syntax.stderr +++ b/contrib/codegen/tests/ui-fail/database-syntax.stderr @@ -1,60 +1,264 @@ -error: expected string literal - --> $DIR/database-syntax.rs:5:1 +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 | -5 | #[database] +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + +error: expected string literal + --> $DIR/database-syntax.rs:6:1 + | +6 | #[database] | ^^^^^^^^^^^ | = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected string literal - --> $DIR/database-syntax.rs:9:12 - | -9 | #[database(1)] - | ^ + --> $DIR/database-syntax.rs:10:12 + | +10 | #[database(1)] + | ^ error: expected string literal - --> $DIR/database-syntax.rs:13:12 + --> $DIR/database-syntax.rs:14:12 | -13 | #[database(123)] +14 | #[database(123)] | ^^^ error: expected string literal - --> $DIR/database-syntax.rs:17:12 + --> $DIR/database-syntax.rs:18:12 | -17 | #[database("hello" "hi")] +18 | #[database("hello" "hi")] | ^^^^^^^^^^^^ error: `database` attribute can only be used on structs - --> $DIR/database-syntax.rs:22:1 + --> $DIR/database-syntax.rs:23:1 | -22 | enum Foo { } +23 | enum Foo { } | ^^^^^^^^^^^^^ error: `database` attribute can only be applied to structs with exactly one unnamed field - --> $DIR/database-syntax.rs:26:11 + --> $DIR/database-syntax.rs:27:11 | -26 | struct Bar(diesel::SqliteConnection, diesel::SqliteConnection); +27 | struct Bar(diesel::SqliteConnection, diesel::SqliteConnection); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: example: `struct MyDatabase(diesel::SqliteConnection);` error: `database` attribute can only be used on structs - --> $DIR/database-syntax.rs:30:1 + --> $DIR/database-syntax.rs:31:1 | -30 | union Baz { } +31 | union Baz { } | ^^^^^^^^^^^^^^ error: `database` attribute cannot be applied to structs with generics - --> $DIR/database-syntax.rs:34:9 + --> $DIR/database-syntax.rs:35:9 | -34 | struct E<'r>(&'r str); +35 | struct E<'r>(&'r str); | ^^^^ error: `database` attribute cannot be applied to structs with generics - --> $DIR/database-syntax.rs:38:9 + --> $DIR/database-syntax.rs:39:9 | -38 | struct F(T); +39 | struct F(T); | ^^^ - -error: aborting due to 9 previous errors - diff --git a/contrib/codegen/tests/ui-fail/database-types.stderr b/contrib/codegen/tests/ui-fail/database-types.stderr index 29c55825..2eed4fb4 100644 --- a/contrib/codegen/tests/ui-fail/database-types.stderr +++ b/contrib/codegen/tests/ui-fail/database-types.stderr @@ -1,15 +1,218 @@ -error[E0277]: the trait bound `Unknown: rocket_contrib::databases::Poolable` is not satisfied +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + +error[E0277]: the trait bound `Unknown: Poolable` is not satisfied --> $DIR/database-types.rs:7:10 | 7 | struct A(Unknown); - | ^^^^^^^ the trait `rocket_contrib::databases::Poolable` is not implemented for `Unknown` + | ^^^^^^^ the trait `Poolable` is not implemented for `Unknown` -error[E0277]: the trait bound `std::vec::Vec: rocket_contrib::databases::Poolable` is not satisfied +error[E0277]: the trait bound `Vec: Poolable` is not satisfied --> $DIR/database-types.rs:11:10 | 11 | struct B(Vec); - | ^^^^^^^^ the trait `rocket_contrib::databases::Poolable` is not implemented for `std::vec::Vec` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. + | ^^^^^^^^ the trait `Poolable` is not implemented for `Vec` diff --git a/contrib/codegen/tests/ui-fail/update-references.sh b/contrib/codegen/tests/ui-fail/update-references.sh deleted file mode 100755 index da17d7fa..00000000 --- a/contrib/codegen/tests/ui-fail/update-references.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env 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 or the MIT license -# , 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. - -if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "" || "$2" == "" ]]; then - echo "usage: $0 " - echo "" - echo "For example:" - echo " $0 ../../../build/x86_64-apple-darwin/test/ui *.rs */*.rs" -fi - -MYDIR=$(dirname $0) - -BUILD_DIR="$1" -shift - -shopt -s nullglob - -while [[ "$1" != "" ]]; do - for EXT in "stderr" "fixed"; do - for OUT_NAME in $BUILD_DIR/${1%.rs}.*$EXT; do - OUT_DIR=`dirname "$1"` - OUT_BASE=`basename "$OUT_NAME"` - if ! (diff $OUT_NAME $MYDIR/$OUT_DIR/$OUT_BASE >& /dev/null); then - echo updating $MYDIR/$OUT_DIR/$OUT_BASE - cp $OUT_NAME $MYDIR/$OUT_DIR - fi - done - done - shift -done diff --git a/core/codegen/Cargo.toml b/core/codegen/Cargo.toml index 9c082713..091a2dc1 100644 --- a/core/codegen/Cargo.toml +++ b/core/codegen/Cargo.toml @@ -27,4 +27,4 @@ version_check = "0.9.1" [dev-dependencies] rocket = { version = "0.4.5", path = "../lib" } -compiletest_rs = { version = "0.3", features = ["stable"] } +trybuild = "1.0" diff --git a/core/codegen/tests/compile-test.rs b/core/codegen/tests/compile-test.rs deleted file mode 100644 index 3e41ebc0..00000000 --- a/core/codegen/tests/compile-test.rs +++ /dev/null @@ -1,101 +0,0 @@ -extern crate compiletest_rs as compiletest; - -use std::path::{Path, PathBuf}; -use std::{io, fs::Metadata, time::SystemTime}; - -#[derive(Copy, Clone)] -enum Kind { - #[allow(dead_code)] - Dynamic, - Static -} - -impl Kind { - fn extension(self) -> &'static str { - match self { - #[cfg(windows)] Kind::Dynamic => ".dll", - #[cfg(all(unix, target_os = "macos"))] Kind::Dynamic => ".dylib", - #[cfg(all(unix, not(target_os = "macos")))] Kind::Dynamic => ".so", - Kind::Static => ".rlib" - } - } -} - -fn target_path() -> PathBuf { - #[cfg(debug_assertions)] const ENVIRONMENT: &str = "debug"; - #[cfg(not(debug_assertions))] const ENVIRONMENT: &str = "release"; - - Path::new(env!("CARGO_MANIFEST_DIR")) - .parent().unwrap().parent().unwrap() - .join("target") - .join(ENVIRONMENT) -} - -fn link_flag(flag: &str, lib: &str, rel_path: &[&str]) -> String { - let mut path = target_path(); - for component in rel_path { - path = path.join(component); - } - - format!("{} {}={}", flag, lib, path.display()) -} - -fn best_time_for(metadata: &Metadata) -> SystemTime { - metadata.created() - .or_else(|_| metadata.modified()) - .or_else(|_| metadata.accessed()) - .unwrap_or_else(|_| SystemTime::now()) -} - -fn extern_dep(name: &str, kind: Kind) -> io::Result { - let deps_root = target_path().join("deps"); - let dep_name = format!("lib{}", name); - - let mut dep_path: Option = None; - for entry in deps_root.read_dir().expect("read_dir call failed") { - let entry = match entry { - Ok(entry) => entry, - Err(_) => continue - }; - - let filename = entry.file_name(); - let filename = filename.to_string_lossy(); - let lib_name = filename.split('.').next().unwrap().split('-').next().unwrap(); - - if lib_name == dep_name && filename.ends_with(kind.extension()) { - if let Some(ref mut existing) = dep_path { - if best_time_for(&entry.metadata()?) > best_time_for(&existing.metadata()?) { - *existing = entry.path().into(); - } - } else { - dep_path = Some(entry.path().into()); - } - } - } - - let dep = dep_path.ok_or_else(|| io::Error::from(io::ErrorKind::NotFound))?; - let filename = dep.file_name().ok_or_else(|| io::Error::from(io::ErrorKind::InvalidData))?; - Ok(link_flag("--extern", name, &["deps", &filename.to_string_lossy()])) -} - -fn run_mode(mode: &'static str, path: &'static str) { - let mut config = compiletest::Config::default(); - config.mode = mode.parse().expect("invalid mode"); - config.src_base = format!("tests/{}", path).into(); - config.clean_rmeta(); - - config.target_rustcflags = Some([ - link_flag("-L", "crate", &[]), - link_flag("-L", "dependency", &["deps"]), - extern_dep("rocket_http", Kind::Static).expect("find http dep"), - extern_dep("rocket", Kind::Static).expect("find core dep"), - ].join(" ")); - - compiletest::run_tests(&config); -} - -#[test] -fn compile_test() { - run_mode("ui", "ui-fail"); - run_mode("compile-fail", "ui-fail"); -} diff --git a/core/codegen/tests/ui-fail.rs b/core/codegen/tests/ui-fail.rs new file mode 100644 index 00000000..fd7e5325 --- /dev/null +++ b/core/codegen/tests/ui-fail.rs @@ -0,0 +1,5 @@ +#[test] +fn ui() { + let t = trybuild::TestCases::new(); + t.compile_fail("tests/ui-fail/*.rs"); +} diff --git a/core/codegen/tests/ui-fail/catch.stderr b/core/codegen/tests/ui-fail/catch.stderr index fdae8a59..afb8110e 100644 --- a/core/codegen/tests/ui-fail/catch.stderr +++ b/core/codegen/tests/ui-fail/catch.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: expected `fn` --> $DIR/catch.rs:6:1 | @@ -70,5 +277,10 @@ error: invalid number of arguments: must be zero or one | = help: catchers may optionally take an argument of type `&Request` -error: aborting due to 9 previous errors - +warning: unused import: `rocket::Request` + --> $DIR/catch.rs:3:5 + | +3 | use rocket::Request; + | ^^^^^^^^^^^^^^^ + | + = note: `#[warn(unused_imports)]` on by default diff --git a/core/codegen/tests/ui-fail/catch_type_errors.stderr b/core/codegen/tests/ui-fail/catch_type_errors.stderr index d2d2da7e..a2a93ddf 100644 --- a/core/codegen/tests/ui-fail/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail/catch_type_errors.stderr @@ -1,18 +1,225 @@ -error[E0277]: the trait bound `usize: rocket::response::Responder<'_>` is not satisfied +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + +error[E0277]: the trait bound `usize: Responder<'_>` is not satisfied --> $DIR/catch_type_errors.rs:6:30 | 6 | fn f1(_request: &Request) -> usize { - | ^^^^^ the trait `rocket::response::Responder<'_>` is not implemented for `usize` + | ^^^^^ the trait `Responder<'_>` is not implemented for `usize` | - = note: required by `rocket::response::Responder::respond_to` + = note: required by `respond_to` -error[E0277]: the trait bound `bool: rocket::response::Responder<'_>` is not satisfied +error[E0277]: the trait bound `bool: Responder<'_>` is not satisfied --> $DIR/catch_type_errors.rs:12:30 | 12 | fn f2(_request: &Request) -> bool { - | ^^^^ the trait `rocket::response::Responder<'_>` is not implemented for `bool` + | ^^^^ the trait `Responder<'_>` is not implemented for `bool` | - = note: required by `rocket::response::Responder::respond_to` + = note: required by `respond_to` error[E0308]: mismatched types --> $DIR/catch_type_errors.rs:18:7 @@ -25,15 +232,10 @@ error[E0308]: mismatched types = note: expected fn pointer `for<'r, 's> fn(&'r rocket::Request<'s>) -> _` found fn item `fn(bool) -> usize {f3}` -error[E0277]: the trait bound `usize: rocket::response::Responder<'_>` is not satisfied +error[E0277]: the trait bound `usize: Responder<'_>` is not satisfied --> $DIR/catch_type_errors.rs:24:12 | 24 | fn f4() -> usize { - | ^^^^^ the trait `rocket::response::Responder<'_>` is not implemented for `usize` + | ^^^^^ the trait `Responder<'_>` is not implemented for `usize` | - = note: required by `rocket::response::Responder::respond_to` - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0277, E0308. -For more information about an error, try `rustc --explain E0277`. + = note: required by `respond_to` diff --git a/core/codegen/tests/ui-fail/catchers.stderr b/core/codegen/tests/ui-fail/catchers.stderr index 2029d877..a51b9978 100644 --- a/core/codegen/tests/ui-fail/catchers.stderr +++ b/core/codegen/tests/ui-fail/catchers.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: expected `,` --> $DIR/catchers.rs:6:25 | @@ -17,6 +224,3 @@ error: unexpected end of input, expected identifier | ^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 3 previous errors - diff --git a/core/codegen/tests/ui-fail/from_form.stderr b/core/codegen/tests/ui-fail/from_form.stderr index f81a4755..f159d165 100644 --- a/core/codegen/tests/ui-fail/from_form.stderr +++ b/core/codegen/tests/ui-fail/from_form.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: enums are not supported --> $DIR/from_form.rs:6:1 | @@ -325,6 +532,3 @@ note: error occurred while deriving `FromForm` 161 | #[derive(FromForm)] | ^^^^^^^^ = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 24 previous errors - diff --git a/core/codegen/tests/ui-fail/from_form_type_errors.stderr b/core/codegen/tests/ui-fail/from_form_type_errors.stderr index fe3d6123..821273ef 100644 --- a/core/codegen/tests/ui-fail/from_form_type_errors.stderr +++ b/core/codegen/tests/ui-fail/from_form_type_errors.stderr @@ -1,15 +1,218 @@ -error[E0277]: the trait bound `Unknown: rocket::request::FromFormValue<'_>` is not satisfied +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + +error[E0277]: the trait bound `Unknown: FromFormValue<'_>` is not satisfied --> $DIR/from_form_type_errors.rs:7:5 | 7 | field: Unknown, - | ^^^^^^^^^^^^^^ the trait `rocket::request::FromFormValue<'_>` is not implemented for `Unknown` + | ^^^^^^^^^^^^^^ the trait `FromFormValue<'_>` is not implemented for `Unknown` -error[E0277]: the trait bound `Foo: rocket::request::FromFormValue<'_>` is not satisfied +error[E0277]: the trait bound `Foo: FromFormValue<'_>` is not satisfied --> $DIR/from_form_type_errors.rs:15:5 | 15 | field: Foo, - | ^^^^^^^^^^^^^^^^^ the trait `rocket::request::FromFormValue<'_>` is not implemented for `Foo` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. + | ^^^^^^^^^^^^^^^^^ the trait `FromFormValue<'_>` is not implemented for `Foo` diff --git a/core/codegen/tests/ui-fail/from_form_value.stderr b/core/codegen/tests/ui-fail/from_form_value.stderr index f49e5468..5c5a148c 100644 --- a/core/codegen/tests/ui-fail/from_form_value.stderr +++ b/core/codegen/tests/ui-fail/from_form_value.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: tuple structs are not supported --> $DIR/from_form_value.rs:4:1 | @@ -97,6 +304,3 @@ note: error occurred while deriving `FromFormValue` 40 | #[derive(FromFormValue)] | ^^^^^^^^^^^^^ = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 7 previous errors; 1 warning emitted - diff --git a/core/codegen/tests/ui-fail/responder-types.stderr b/core/codegen/tests/ui-fail/responder-types.stderr index 3cb57ad3..58577613 100644 --- a/core/codegen/tests/ui-fail/responder-types.stderr +++ b/core/codegen/tests/ui-fail/responder-types.stderr @@ -1,10 +1,217 @@ -error[E0277]: the trait bound `u8: rocket::response::Responder<'_>` is not satisfied +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + +error[E0277]: the trait bound `u8: Responder<'_>` is not satisfied --> $DIR/responder-types.rs:11:5 | 11 | thing: u8, - | ^^^^^^^^^ the trait `rocket::response::Responder<'_>` is not implemented for `u8` + | ^^^^^^^^^ the trait `Responder<'_>` is not implemented for `u8` | - = note: required by `rocket::response::Responder::respond_to` + = note: required by `respond_to` error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` is not satisfied --> $DIR/responder-types.rs:18:5 @@ -13,20 +220,20 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` | ^^^^^^^^^ the trait `std::convert::From` is not implemented for `rocket::http::Header<'_>` | = help: the following implementations were found: - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - and $N others - = note: required because of the requirements on the impl of `std::convert::Into>` for `u8` + as std::convert::From<&'a Cookie<'c>>> + as std::convert::From> + as std::convert::From> + as std::convert::From> + and 43 others + = note: required because of the requirements on the impl of `Into>` for `u8` -error[E0277]: the trait bound `u8: rocket::response::Responder<'_>` is not satisfied +error[E0277]: the trait bound `u8: Responder<'_>` is not satisfied --> $DIR/responder-types.rs:24:5 | 24 | thing: u8, - | ^^^^^^^^^ the trait `rocket::response::Responder<'_>` is not implemented for `u8` + | ^^^^^^^^^ the trait `Responder<'_>` is not implemented for `u8` | - = note: required by `rocket::response::Responder::respond_to` + = note: required by `respond_to` error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` is not satisfied --> $DIR/responder-types.rs:26:5 @@ -35,12 +242,12 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` | ^^^^^^^^^ the trait `std::convert::From` is not implemented for `rocket::http::Header<'_>` | = help: the following implementations were found: - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - and $N others - = note: required because of the requirements on the impl of `std::convert::Into>` for `u8` + as std::convert::From<&'a Cookie<'c>>> + as std::convert::From> + as std::convert::From> + as std::convert::From> + and 43 others + = note: required because of the requirements on the impl of `Into>` for `u8` error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` is not satisfied --> $DIR/responder-types.rs:34:5 @@ -49,24 +256,20 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` is not implemented for `rocket::http::Header<'_>` | = help: the following implementations were found: - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - rocket::http::Header<'static> as $TRAIT - and $N others - = note: required because of the requirements on the impl of `std::convert::Into>` for `std::string::String` + as std::convert::From<&'a Cookie<'c>>> + as std::convert::From> + as std::convert::From> + as std::convert::From> + and 43 others + = note: required because of the requirements on the impl of `Into>` for `std::string::String` -error[E0277]: the trait bound `usize: rocket::response::Responder<'_>` is not satisfied +error[E0277]: the trait bound `usize: Responder<'_>` is not satisfied --> $DIR/responder-types.rs:39:13 | 39 | fn foo() -> usize { 0 } - | ^^^^^ the trait `rocket::response::Responder<'_>` is not implemented for `usize` - | - ::: $FILE.rs:202:20 + | ^^^^^ the trait `Responder<'_>` is not implemented for `usize` | -202 | pub fn from>(req: &Request, responder: T) -> Outcome<'r> { - | ------------- required by this bound in `rocket::handler::, rocket::http::Status, rocket::Data>>::from` - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0277`. + ::: $WORKSPACE/core/lib/src/handler.rs + | + | pub fn from>(req: &Request, responder: T) -> Outcome<'r> { + | ------------- required by this bound in `handler::, rocket::http::Status, rocket::Data>>::from` diff --git a/core/codegen/tests/ui-fail/responder.stderr b/core/codegen/tests/ui-fail/responder.stderr deleted file mode 100644 index 95785fde..00000000 --- a/core/codegen/tests/ui-fail/responder.stderr +++ /dev/null @@ -1,158 +0,0 @@ -error: need at least one field - --> $DIR/responder.rs:6:1 - | -6 | struct Thing1; - | ^^^^^^^^^^^^^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:5:10 - | -5 | #[derive(Responder)] - | ^^^^^^^^^ - -error: need at least one field - --> $DIR/responder.rs:10:14 - | -10 | struct Thing2(); - | ^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:9:10 - | -9 | #[derive(Responder)] - | ^^^^^^^^^ - -error: need at least one field - --> $DIR/responder.rs:15:5 - | -15 | Bark, - | ^^^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:13:10 - | -13 | #[derive(Responder)] - | ^^^^^^^^^ - -error: only one lifetime is supported - --> $DIR/responder.rs:20:14 - | -20 | struct Thing4<'a, 'b>(&'a str, &'b str); - | ^^^^^^^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:19:10 - | -19 | #[derive(Responder)] - | ^^^^^^^^^ - -error: type generics are not supported - --> $DIR/responder.rs:24:15 - | -24 | struct Thing5(T); - | ^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:23:10 - | -23 | #[derive(Responder)] - | ^^^^^^^^^ - -error: type generics are not supported - --> $DIR/responder.rs:28:23 - | -28 | struct Thing6<'a, 'b, T>(&'a str, &'b str, T); - | ^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:27:10 - | -27 | #[derive(Responder)] - | ^^^^^^^^^ - -error: invalid or unknown content-type - --> $DIR/responder.rs:33:31 - | -33 | #[response(content_type = "")] - | ^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:31:10 - | -31 | #[derive(Responder)] - | ^^^^^^^^^ - -error: invalid or unknown content-type - --> $DIR/responder.rs:40:31 - | -40 | #[response(content_type = "idk")] - | ^^^^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:38:10 - | -38 | #[derive(Responder)] - | ^^^^^^^^^ - -error: invalid value: expected string - --> $DIR/responder.rs:47:31 - | -47 | #[response(content_type = 100)] - | ^^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:45:10 - | -45 | #[derive(Responder)] - | ^^^^^^^^^ - -error: status must be in range [100, 600) - --> $DIR/responder.rs:54:25 - | -54 | #[response(status = 8)] - | ^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:52:10 - | -52 | #[derive(Responder)] - | ^^^^^^^^^ - -error: invalid value: expected unsigned integer - --> $DIR/responder.rs:61:25 - | -61 | #[response(status = "404")] - | ^^^^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:59:10 - | -59 | #[derive(Responder)] - | ^^^^^^^^^ - -error: invalid value: expected unsigned integer - --> $DIR/responder.rs:68:25 - | -68 | #[response(status = "404", content_type = "html")] - | ^^^^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:66:10 - | -66 | #[derive(Responder)] - | ^^^^^^^^^ - -error: invalid value: expected string - --> $DIR/responder.rs:75:45 - | -75 | #[response(status = 404, content_type = 120)] - | ^^^ - | -note: error occurred while deriving `Responder` - --> $DIR/responder.rs:73:10 - | -73 | #[derive(Responder)] - | ^^^^^^^^^ - -error: aborting due to 13 previous errors - diff --git a/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr b/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr index d2e3f2ed..d3f20652 100644 --- a/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr +++ b/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: missing expected parameter: `path` --> $DIR/route-attribute-general-syntax.rs:7:1 | @@ -214,6 +421,3 @@ error: expected identifier, found integer literal | ^^^ | = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` - -error: aborting due to 32 previous errors - diff --git a/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr b/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr index 8e33d7e6..1a8fffd1 100644 --- a/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr +++ b/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: invalid path URI: expected token '/' but found 'a' at index 0 --> $DIR/route-path-bad-syntax.rs:7:8 | @@ -261,6 +468,3 @@ error: malformed parameter or identifier | = help: parameters must be of the form '' = help: identifiers cannot contain '<' or '>' - -error: aborting due to 30 previous errors - diff --git a/core/codegen/tests/ui-fail/route-type-errors.stderr b/core/codegen/tests/ui-fail/route-type-errors.stderr index 5466c67b..bee80029 100644 --- a/core/codegen/tests/ui-fail/route-type-errors.stderr +++ b/core/codegen/tests/ui-fail/route-type-errors.stderr @@ -1,65 +1,268 @@ -error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + +error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied --> $DIR/route-type-errors.rs:8:7 | 8 | fn f0(foo: Q) {} //~ ERROR FromParam - | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q` + | ^^^^^^ the trait `FromParam<'_>` is not implemented for `Q` -error[E0277]: the trait bound `Q: rocket::request::FromSegments<'_>` is not satisfied +error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied --> $DIR/route-type-errors.rs:11:7 | 11 | fn f1(foo: Q) {} //~ ERROR FromSegments - | ^^^^^^ the trait `rocket::request::FromSegments<'_>` is not implemented for `Q` + | ^^^^^^ the trait `FromSegments<'_>` is not implemented for `Q` -error[E0277]: the trait bound `Q: rocket::request::FromFormValue<'_>` is not satisfied +error[E0277]: the trait bound `Q: FromFormValue<'_>` is not satisfied --> $DIR/route-type-errors.rs:14:7 | 14 | fn f2(foo: Q) {} //~ ERROR FromFormValue - | ^^^^^^ the trait `rocket::request::FromFormValue<'_>` is not implemented for `Q` + | ^^^^^^ the trait `FromFormValue<'_>` is not implemented for `Q` -error[E0277]: the trait bound `Q: rocket::request::FromQuery<'_>` is not satisfied +error[E0277]: the trait bound `Q: FromQuery<'_>` is not satisfied --> $DIR/route-type-errors.rs:17:7 | 17 | fn f3(foo: Q) {} //~ ERROR FromQuery - | ^^^^^^ the trait `rocket::request::FromQuery<'_>` is not implemented for `Q` + | ^^^^^^ the trait `FromQuery<'_>` is not implemented for `Q` -error[E0277]: the trait bound `Q: rocket::data::FromDataSimple` is not satisfied +error[E0277]: the trait bound `Q: FromDataSimple` is not satisfied --> $DIR/route-type-errors.rs:20:7 | 20 | fn f4(foo: Q) {} //~ ERROR FromData - | ^^^^^^ the trait `rocket::data::FromDataSimple` is not implemented for `Q` + | ^^^^^^ the trait `FromDataSimple` is not implemented for `Q` | - = note: required because of the requirements on the impl of `rocket::data::FromData<'_>` for `Q` + = note: required because of the requirements on the impl of `FromData<'_>` for `Q` -error[E0277]: the trait bound `Q: rocket::request::FromRequest<'_, '_>` is not satisfied +error[E0277]: the trait bound `Q: FromRequest<'_, '_>` is not satisfied --> $DIR/route-type-errors.rs:23:7 | 23 | fn f5(a: Q, foo: Q) {} - | ^^^^ the trait `rocket::request::FromRequest<'_, '_>` is not implemented for `Q` + | ^^^^ the trait `FromRequest<'_, '_>` is not implemented for `Q` -error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied +error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied --> $DIR/route-type-errors.rs:23:13 | 23 | fn f5(a: Q, foo: Q) {} - | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q` + | ^^^^^^ the trait `FromParam<'_>` is not implemented for `Q` -error[E0277]: the trait bound `Q: rocket::request::FromRequest<'_, '_>` is not satisfied +error[E0277]: the trait bound `Q: FromRequest<'_, '_>` is not satisfied --> $DIR/route-type-errors.rs:28:7 | 28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} - | ^^^^ the trait `rocket::request::FromRequest<'_, '_>` is not implemented for `Q` + | ^^^^ the trait `FromRequest<'_, '_>` is not implemented for `Q` -error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied +error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied --> $DIR/route-type-errors.rs:28:13 | 28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} - | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q` + | ^^^^^^ the trait `FromParam<'_>` is not implemented for `Q` -error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied +error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied --> $DIR/route-type-errors.rs:28:34 | 28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} - | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q` - -error: aborting due to 10 previous errors - -For more information about this error, try `rustc --explain E0277`. + | ^^^^^^ the trait `FromParam<'_>` is not implemented for `Q` diff --git a/core/codegen/tests/ui-fail/route-warnings.rs b/core/codegen/tests/ui-fail/route-warnings.rs index 0a147416..2ee646a9 100644 --- a/core/codegen/tests/ui-fail/route-warnings.rs +++ b/core/codegen/tests/ui-fail/route-warnings.rs @@ -23,4 +23,6 @@ fn g0(_foo: rocket::Data) {} #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method fn g1(_foo: rocket::Data) {} -fn main() { } +fn main() { + compile_error!("checking for warnings!") +} diff --git a/core/codegen/tests/ui-fail/route-warnings.stderr b/core/codegen/tests/ui-fail/route-warnings.stderr index 487b53aa..64a75d7f 100644 --- a/core/codegen/tests/ui-fail/route-warnings.stderr +++ b/core/codegen/tests/ui-fail/route-warnings.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + warning: 'application/x-custom' is not a known media type --> $DIR/route-warnings.rs:9:21 | @@ -42,5 +249,8 @@ note: 'HEAD' does not typically support payloads | ^^^^ = note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) -warning: 5 warnings emitted - +error: checking for warnings! + --> $DIR/route-warnings.rs:27:5 + | +27 | compile_error!("checking for warnings!") + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/core/codegen/tests/ui-fail/routes.stderr b/core/codegen/tests/ui-fail/routes.stderr index 17779157..b6a2d38a 100644 --- a/core/codegen/tests/ui-fail/routes.stderr +++ b/core/codegen/tests/ui-fail/routes.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: expected `,` --> $DIR/routes.rs:6:23 | @@ -17,6 +224,3 @@ error: unexpected end of input, expected identifier | ^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 3 previous errors - diff --git a/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr index 17476024..34e870b2 100644 --- a/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr @@ -1,145 +1,348 @@ -error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam` is not satisfied +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + +error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:50:23 | 50 | uri!(simple: id = "hi"); - | ^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `usize` + | ^^^^ the trait `FromUriParam` is not implemented for `usize` | = help: the following implementations were found: - usize as $TRAIT - usize as $TRAIT - usize as $TRAIT - = note: required by `rocket::http::uri::FromUriParam::from_uri_param` + > + > + > + = note: required by `from_uri_param` -error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam` is not satisfied +error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:53:18 | 53 | uri!(simple: "hello"); - | ^^^^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `usize` + | ^^^^^^^ the trait `FromUriParam` is not implemented for `usize` | = help: the following implementations were found: - usize as $TRAIT - usize as $TRAIT - usize as $TRAIT - = note: required by `rocket::http::uri::FromUriParam::from_uri_param` + > + > + > + = note: required by `from_uri_param` -error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam` is not satisfied +error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:56:23 | 56 | uri!(simple: id = 239239i64); - | ^^^^^^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `usize` + | ^^^^^^^^^ the trait `FromUriParam` is not implemented for `usize` | = help: the following implementations were found: - usize as $TRAIT - usize as $TRAIT - usize as $TRAIT - = note: required by `rocket::http::uri::FromUriParam::from_uri_param` + > + > + > + = note: required by `from_uri_param` -error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam` is not satisfied +error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:59:31 | 59 | uri!(not_uri_display: 10, S); - | ^ the trait `rocket::http::uri::FromUriParam` is not implemented for `S` + | ^ the trait `FromUriParam` is not implemented for `S` -error[E0277]: the trait bound `i32: rocket::http::uri::FromUriParam>` is not satisfied +error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied --> $DIR/typed-uri-bad-type.rs:65:26 | 65 | uri!(optionals: id = Some(10), name = Ok("bob".into())); - | ^^^^ the trait `rocket::http::uri::FromUriParam>` is not implemented for `i32` + | ^^^^ the trait `FromUriParam>` is not implemented for `i32` | = help: the following implementations were found: - i32 as $TRAIT - i32 as $TRAIT - i32 as $TRAIT - = note: required because of the requirements on the impl of `rocket::http::uri::FromUriParam>` for `std::option::Option` + > + > + > + = note: required because of the requirements on the impl of `FromUriParam>` for `Option` -error[E0277]: the trait bound `std::string::String: rocket::http::uri::FromUriParam>` is not satisfied +error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied --> $DIR/typed-uri-bad-type.rs:65:43 | 65 | uri!(optionals: id = Some(10), name = Ok("bob".into())); - | ^^ the trait `rocket::http::uri::FromUriParam>` is not implemented for `std::string::String` + | ^^ the trait `FromUriParam>` is not implemented for `std::string::String` | = help: the following implementations were found: - std::string::String as $TRAIT - std::string::String as $TRAIT - std::string::String as $TRAIT - std::string::String as $TRAIT - and $N others - = note: required because of the requirements on the impl of `rocket::http::uri::FromUriParam>` for `std::result::Result` + > + > + > + > + and 2 others + = note: required because of the requirements on the impl of `FromUriParam>` for `std::result::Result` -error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam` is not satisfied +error[E0277]: the trait bound `isize: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:69:20 | 69 | uri!(simple_q: "hi"); - | ^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `isize` + | ^^^^ the trait `FromUriParam` is not implemented for `isize` | = help: the following implementations were found: - isize as $TRAIT - isize as $TRAIT - isize as $TRAIT - = note: required by `rocket::http::uri::FromUriParam::from_uri_param` + > + > + > + = note: required by `from_uri_param` -error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam` is not satisfied +error[E0277]: the trait bound `isize: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:72:25 | 72 | uri!(simple_q: id = "hi"); - | ^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `isize` + | ^^^^ the trait `FromUriParam` is not implemented for `isize` | = help: the following implementations were found: - isize as $TRAIT - isize as $TRAIT - isize as $TRAIT - = note: required by `rocket::http::uri::FromUriParam::from_uri_param` + > + > + > + = note: required by `from_uri_param` -error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam` is not satisfied +error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:75:24 | 75 | uri!(other_q: 100, S); - | ^ the trait `rocket::http::uri::FromUriParam` is not implemented for `S` + | ^ the trait `FromUriParam` is not implemented for `S` -error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam` is not satisfied +error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:78:26 | 78 | uri!(other_q: rest = S, id = 100); - | ^ the trait `rocket::http::uri::FromUriParam` is not implemented for `S` + | ^ the trait `FromUriParam` is not implemented for `S` -error[E0277]: the trait bound `S: rocket::http::uri::Ignorable` is not satisfied +error[E0277]: the trait bound `S: Ignorable` is not satisfied --> $DIR/typed-uri-bad-type.rs:42:29 | 42 | fn other_q(id: usize, rest: S) { } - | ^ the trait `rocket::http::uri::Ignorable` is not implemented for `S` + | ^ the trait `Ignorable` is not implemented for `S` ... 81 | uri!(other_q: rest = _, id = 100); | ---------------------------------- in this macro invocation - | - ::: $FILE.rs:469:40 | -469 | pub fn assert_ignorable>() { } - | ------------ required by this bound in `rocket::http::uri::assert_ignorable` + ::: $WORKSPACE/core/http/src/uri/uri_display.rs + | + | pub fn assert_ignorable>() { } + | ------------ required by this bound in `assert_ignorable` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `usize: rocket::http::uri::Ignorable` is not satisfied +error[E0277]: the trait bound `usize: Ignorable` is not satisfied --> $DIR/typed-uri-bad-type.rs:42:16 | 42 | fn other_q(id: usize, rest: S) { } - | ^^^^^ the trait `rocket::http::uri::Ignorable` is not implemented for `usize` + | ^^^^^ the trait `Ignorable` is not implemented for `usize` ... 83 | uri!(other_q: rest = S, id = _); | -------------------------------- in this macro invocation - | - ::: $FILE.rs:469:40 | -469 | pub fn assert_ignorable>() { } - | ------------ required by this bound in `rocket::http::uri::assert_ignorable` + ::: $WORKSPACE/core/http/src/uri/uri_display.rs + | + | pub fn assert_ignorable>() { } + | ------------ required by this bound in `assert_ignorable` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam` is not satisfied +error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:83:26 | 83 | uri!(other_q: rest = S, id = _); - | ^ the trait `rocket::http::uri::FromUriParam` is not implemented for `S` - -error: aborting due to 13 previous errors - -For more information about this error, try `rustc --explain E0277`. + | ^ the trait `FromUriParam` is not implemented for `S` diff --git a/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr index 6ca80e67..b210ca69 100644 --- a/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: `has_one` route uri expects 1 parameter but 0 were supplied --> $DIR/typed-uris-bad-params.rs:22:10 | @@ -237,5 +444,10 @@ error: path parameters cannot be ignored 79 | uri!(optionals: id = 10, name = _); | ^ -error: aborting due to 21 previous errors - +warning: unused import: `std::fmt` + --> $DIR/typed-uris-bad-params.rs:5:5 + | +5 | use std::fmt; + | ^^^^^^^^ + | + = note: `#[warn(unused_imports)]` on by default diff --git a/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr b/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr index 13b42eea..394d4ed4 100644 --- a/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr +++ b/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: named and unnamed parameters cannot be mixed --> $DIR/typed-uris-invalid-syntax.rs:9:18 | @@ -63,6 +270,3 @@ error: unexpected end of input, expected expression | ^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 10 previous errors - diff --git a/core/codegen/tests/ui-fail/update-references.sh b/core/codegen/tests/ui-fail/update-references.sh deleted file mode 100755 index da17d7fa..00000000 --- a/core/codegen/tests/ui-fail/update-references.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env 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 or the MIT license -# , 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. - -if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "" || "$2" == "" ]]; then - echo "usage: $0 " - echo "" - echo "For example:" - echo " $0 ../../../build/x86_64-apple-darwin/test/ui *.rs */*.rs" -fi - -MYDIR=$(dirname $0) - -BUILD_DIR="$1" -shift - -shopt -s nullglob - -while [[ "$1" != "" ]]; do - for EXT in "stderr" "fixed"; do - for OUT_NAME in $BUILD_DIR/${1%.rs}.*$EXT; do - OUT_DIR=`dirname "$1"` - OUT_BASE=`basename "$OUT_NAME"` - if ! (diff $OUT_NAME $MYDIR/$OUT_DIR/$OUT_BASE >& /dev/null); then - echo updating $MYDIR/$OUT_DIR/$OUT_BASE - cp $OUT_NAME $MYDIR/$OUT_DIR - fi - done - done - shift -done diff --git a/core/codegen/tests/ui-fail/uri_display.stderr b/core/codegen/tests/ui-fail/uri_display.stderr index ad52c626..c7cda987 100644 --- a/core/codegen/tests/ui-fail/uri_display.stderr +++ b/core/codegen/tests/ui-fail/uri_display.stderr @@ -1,3 +1,210 @@ +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + error: fieldless structs or variants are not supported --> $DIR/uri_display.rs:9:1 | @@ -131,360 +338,356 @@ note: error occurred while deriving `UriDisplay` | ^^^^^^^^^^^^^^ = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo1: UriDisplay` is not satisfied --> $DIR/uri_display.rs:5:10 | 5 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo1` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo1` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo1: UriDisplay` is not satisfied --> $DIR/uri_display.rs:5:10 | 5 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo1` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo1` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo1` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo1` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo1: UriDisplay` is not satisfied --> $DIR/uri_display.rs:5:10 | 5 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo1` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo1` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo1` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&mut Foo1` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo2: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo2: UriDisplay` is not satisfied --> $DIR/uri_display.rs:12:10 | 12 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo2` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo2` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo2: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo2: UriDisplay` is not satisfied --> $DIR/uri_display.rs:12:10 | 12 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo2` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo2` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo2` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo2` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo2: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo2: UriDisplay` is not satisfied --> $DIR/uri_display.rs:12:10 | 12 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo2` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo2` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo2` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&mut Foo2` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo3: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo3: UriDisplay` is not satisfied --> $DIR/uri_display.rs:19:10 | 19 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo3` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo3` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo3: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo3: UriDisplay` is not satisfied --> $DIR/uri_display.rs:19:10 | 19 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo3` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo3` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo3` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo3` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo3: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo3: UriDisplay` is not satisfied --> $DIR/uri_display.rs:19:10 | 19 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo3` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo3` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo3` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&mut Foo3` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo4: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo4: UriDisplay` is not satisfied --> $DIR/uri_display.rs:26:10 | 26 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo4` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo4` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo4: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo4: UriDisplay` is not satisfied --> $DIR/uri_display.rs:26:10 | 26 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo4` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo4` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo4` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo4` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo4: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo4: UriDisplay` is not satisfied --> $DIR/uri_display.rs:26:10 | 26 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo4` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo4` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo4` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&mut Foo4` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo5: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo5: UriDisplay` is not satisfied --> $DIR/uri_display.rs:35:10 | 35 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo5` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo5` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo5: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo5: UriDisplay` is not satisfied --> $DIR/uri_display.rs:35:10 | 35 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo5` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo5` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo5` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo5` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo5: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo5: UriDisplay` is not satisfied --> $DIR/uri_display.rs:35:10 | 35 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo5` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo5` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo5` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&mut Foo5` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo6: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo6: UriDisplay` is not satisfied --> $DIR/uri_display.rs:42:10 | 42 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo6` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo6` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo6: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo6: UriDisplay` is not satisfied --> $DIR/uri_display.rs:42:10 | 42 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo6` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo6` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo6` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo6` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo6: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo6: UriDisplay` is not satisfied --> $DIR/uri_display.rs:42:10 | 42 | #[derive(UriDisplayQuery)] - | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo6` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo6` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo6` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&mut Foo6` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo7: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo7: UriDisplay` is not satisfied --> $DIR/uri_display.rs:52:10 | 52 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo7` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo7` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo7: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo7: UriDisplay` is not satisfied --> $DIR/uri_display.rs:52:10 | 52 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo7` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo7` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo7` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo7` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo8: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo8: UriDisplay` is not satisfied --> $DIR/uri_display.rs:58:10 | 58 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo8` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo8` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo8: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo8: UriDisplay` is not satisfied --> $DIR/uri_display.rs:58:10 | 58 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo8` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo8` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo8` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo8` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo9: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo9: UriDisplay` is not satisfied --> $DIR/uri_display.rs:64:10 | 64 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo9` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo9` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo9: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo9: UriDisplay` is not satisfied --> $DIR/uri_display.rs:64:10 | 64 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo9` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo9` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo9` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo9` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo10: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo10: UriDisplay` is not satisfied --> $DIR/uri_display.rs:70:10 | 70 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo10` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo10` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs + | + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo10: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `Foo10: UriDisplay` is not satisfied --> $DIR/uri_display.rs:70:10 | 70 | #[derive(UriDisplayPath)] - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `Foo10` - | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `Foo10` | -196 | type Target: UriDisplay

; - | ------------- required by this bound in `rocket::http::uri::FromUriParam` + ::: $WORKSPACE/core/http/src/uri/from_uri_param.rs | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo10` + | type Target: UriDisplay

; + | ------------- required by this bound in `FromUriParam` + | + = note: required because of the requirements on the impl of `UriDisplay` for `&Foo10` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 36 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/core/codegen/tests/ui-fail/uri_display_type_errors.stderr b/core/codegen/tests/ui-fail/uri_display_type_errors.stderr index af6c53f9..f44f9de7 100644 --- a/core/codegen/tests/ui-fail/uri_display_type_errors.stderr +++ b/core/codegen/tests/ui-fail/uri_display_type_errors.stderr @@ -1,62 +1,265 @@ -error[E0277]: the trait bound `BadType: rocket::http::uri::UriDisplay` is not satisfied +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/uri_display.rs:299:43 + | +299 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay

{ + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay

` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:12 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:24 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:36 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/checkers.rs:9:48 + | +9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\'' + | ^^^ help: use `..=` for an inclusive range + +warning: 6 warnings emitted + +warning: 6 warnings emitted + +warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lib.rs:1:12 + | +1 | #![feature(specialization)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #31844 for more information + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:563:27 + | +563 | body: Option>>, + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + | + = note: `#[warn(bare_trait_objects)]` on by default + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:892:48 + | +892 | pub fn body(&mut self) -> Option> { + | ^^^^^^^^ help: use `dyn`: `dyn io::Read` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/response.rs:969:52 + | +969 | pub fn take_body(&mut self) -> Option>> { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read + 'r` + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:12 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + | + = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:24 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: `...` range patterns are deprecated + --> $DIR/toml_ext.rs:27:36 + | +27 | '0'...'9' | 'A'...'Z' | 'a'...'z' | '_' | '-' => true, + | ^^^ help: use `..=` for an inclusive range + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:18:63 + | +18 | self::HttpReader<&'a mut hyper::buffer::BufReader<&'b mut NetworkStream>>; + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/data.rs:108:41 + | +108 | fn concrete_stream(stream: &mut NetworkStream) -> Option { + | ^^^^^^^^^^^^^ help: use `dyn`: `dyn NetworkStream` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:155:36 + | +155 | fn clone_handler(&self) -> Box; + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:160:36 + | +160 | fn clone_handler(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:165:20 + | +165 | impl Clone for Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/handler.rs:167:28 + | +167 | fn clone(&self) -> Box { + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:8:27 + | +8 | all_fairings: Vec>, + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:22:43 + | +22 | pub fn attach(&mut self, fairing: Box, mut rocket: Rocket) -> Rocket { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/fairings.rs:35:36 + | +35 | fn add(&mut self, fairing: Box) { + | ^^^^^^^ help: use `dyn`: `dyn Fairing` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/error.rs:30:17 + | +30 | Unknown(Box<::std::error::Error + Send + Sync>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ::std::error::Error + Send + Sync` + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/route.rs:22:22 + | +22 | pub handler: Box, + | ^^^^^^^ help: use `dyn`: `dyn Handler` + +warning: 18 warnings emitted + +error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied --> $DIR/uri_display_type_errors.rs:6:13 | 6 | struct Bar1(BadType); - | ^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `BadType` + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` -error[E0277]: the trait bound `BadType: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied --> $DIR/uri_display_type_errors.rs:11:5 | 11 | field: BadType, - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `BadType` + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` -error[E0277]: the trait bound `BadType: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied --> $DIR/uri_display_type_errors.rs:18:5 | 18 | bad: BadType, - | ^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `BadType` + | ^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` -error[E0277]: the trait bound `BadType: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied --> $DIR/uri_display_type_errors.rs:24:11 | 24 | Inner(BadType), - | ^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `BadType` + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&BadType` - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` -error[E0277]: the trait bound `BadType: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied --> $DIR/uri_display_type_errors.rs:31:9 | 31 | field: BadType, - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `BadType` + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&BadType` - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` -error[E0277]: the trait bound `BadType: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied --> $DIR/uri_display_type_errors.rs:40:9 | 40 | other: BadType, - | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `BadType` + | ^^^^^^^^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&BadType` - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` -error[E0277]: the trait bound `BadType: rocket::http::uri::UriDisplay` is not satisfied +error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied --> $DIR/uri_display_type_errors.rs:46:12 | 46 | struct Baz(BadType); - | ^^^^^^^ the trait `rocket::http::uri::UriDisplay` is not implemented for `BadType` + | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` | - = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&BadType` - -error: aborting due to 7 previous errors - -For more information about this error, try `rustc --explain E0277`. + = note: required because of the requirements on the impl of `UriDisplay` for `&BadType`