Avoid mixing error patterns with error annotations

When both error patterns and error annotations are present in an ui
test, only error patterns are validated against the output.

Replace the error pattern with an error annotation to avoid silently
ignoring the other error annotation.
This commit is contained in:
Tomasz Miąsko 2019-10-24 00:00:00 +00:00
parent dae4c6e722
commit 23ada9495f
3 changed files with 6 additions and 8 deletions

View file

@ -3,8 +3,8 @@ error[E0601]: `main` function not found in crate `continue_after_missing_main`
|
LL | / #![allow(dead_code)]
LL | |
LL | | // error-pattern:`main` function not found in crate
LL | |
LL | | struct Tableau<'a, MP> {
LL | | provider: &'a MP,
... |
LL | |
LL | | }

View file

@ -1,6 +1,4 @@
#![allow(dead_code)]
// error-pattern:`main` function not found in crate
#![allow(dead_code)] //~ ERROR `main` function not found in crate
struct Tableau<'a, MP> {
provider: &'a MP,

View file

@ -3,15 +3,15 @@ error[E0601]: `main` function not found in crate `continue_after_missing_main`
|
LL | / #![allow(dead_code)]
LL | |
LL | | // error-pattern:`main` function not found in crate
LL | |
LL | | struct Tableau<'a, MP> {
LL | | provider: &'a MP,
... |
LL | |
LL | | }
| |_^ consider adding a `main` function to `$DIR/continue-after-missing-main.rs`
error[E0623]: lifetime mismatch
--> $DIR/continue-after-missing-main.rs:30:56
--> $DIR/continue-after-missing-main.rs:28:56
|
LL | tableau: Tableau<'data_provider, AdaptedMatrixProvider<'original_data, MP>>,
| ------------------------------------------------------------------ these two types are declared with different lifetimes...