From b6324433b4bf72be9582b20b5e8484209efcfe88 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Sun, 18 Jul 2021 13:13:46 -0700 Subject: [PATCH] Remove faulty 'glob' arg in codegen UI tests. --- .../codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr | 6 ++++++ .../tests/ui-fail-nightly/typed-uris-bad-params.stderr | 6 ++++++ core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr | 6 ++++++ .../tests/ui-fail-stable/typed-uris-bad-params.stderr | 6 ++++++ core/codegen/tests/ui-fail.rs | 6 +----- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr index 80f0077c..9f527cdf 100644 --- a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr @@ -1,3 +1,9 @@ +error[E0271]: type mismatch resolving `>::Error == &str` + --> $DIR/typed-uri-bad-type.rs:22:37 + | +22 | fn optionals(id: Option, name: Result) { } + | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str` + error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:45:22 | diff --git a/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr index 59ebe538..bb655f68 100644 --- a/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr @@ -280,3 +280,9 @@ error: route expects 1 parameter but 0 were supplied | ^^^^^^^ | = note: route `has_one` has uri "/" + +error[E0271]: type mismatch resolving `>::Error == &str` + --> $DIR/typed-uris-bad-params.rs:15:37 + | +15 | fn optionals(id: Option, name: Result) { } + | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str` diff --git a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr index c80c51b5..6d6348ac 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr @@ -1,3 +1,9 @@ +error[E0271]: type mismatch resolving `>::Error == &str` + --> $DIR/typed-uri-bad-type.rs:22:37 + | +22 | fn optionals(id: Option, name: Result) { } + | ^^^^^^ expected enum `Infallible`, found `&str` + error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> $DIR/typed-uri-bad-type.rs:45:22 | diff --git a/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr index ae95f4f0..aad543f3 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr @@ -271,3 +271,9 @@ error: route expects 1 parameter but 0 were supplied | 21 | uri!(has_one); | ^^^^^^^ + +error[E0271]: type mismatch resolving `>::Error == &str` + --> $DIR/typed-uris-bad-params.rs:15:37 + | +15 | fn optionals(id: Option, name: Result) { } + | ^^^^^^ expected enum `Infallible`, found `&str` diff --git a/core/codegen/tests/ui-fail.rs b/core/codegen/tests/ui-fail.rs index 666ec6fe..1cd5552a 100644 --- a/core/codegen/tests/ui-fail.rs +++ b/core/codegen/tests/ui-fail.rs @@ -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)); }