Remove faulty 'glob' arg in codegen UI tests.

This commit is contained in:
Sergio Benitez 2021-07-18 13:13:46 -07:00
parent 5b1a04deab
commit b6324433b4
5 changed files with 25 additions and 5 deletions

View File

@ -1,3 +1,9 @@
error[E0271]: type mismatch resolving `<std::string::String as FromParam<'_>>::Error == &str`
--> $DIR/typed-uri-bad-type.rs:22:37
|
22 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:45:22
|

View File

@ -280,3 +280,9 @@ error: route expects 1 parameter but 0 were supplied
| ^^^^^^^
|
= note: route `has_one` has uri "/<id>"
error[E0271]: type mismatch resolving `<std::string::String as FromParam<'_>>::Error == &str`
--> $DIR/typed-uris-bad-params.rs:15:37
|
15 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str`

View File

@ -1,3 +1,9 @@
error[E0271]: type mismatch resolving `<std::string::String as FromParam<'_>>::Error == &str`
--> $DIR/typed-uri-bad-type.rs:22:37
|
22 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^ expected enum `Infallible`, found `&str`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:45:22
|

View File

@ -271,3 +271,9 @@ error: route expects 1 parameter but 0 were supplied
|
21 | uri!(has_one);
| ^^^^^^^
error[E0271]: type mismatch resolving `<std::string::String as FromParam<'_>>::Error == &str`
--> $DIR/typed-uris-bad-params.rs:15:37
|
15 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^ expected enum `Infallible`, found `&str`

View File

@ -5,10 +5,6 @@ fn ui() {
_ => "ui-fail-stable"
};
let glob = std::env::args().last()
.map(|arg| format!("*{}*.rs", arg))
.unwrap_or_else(|| "*.rs".into());
let t = trybuild::TestCases::new();
t.compile_fail(format!("tests/{}/{}", path, glob));
t.compile_fail(format!("tests/{}/*.rs", path));
}