mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 02:27:39 +03:00
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:
@@ -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 | | }
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user