compiletest: Require //~ annotations even if error-pattern is specified

This commit is contained in:
Vadim Petrochenkov 2025-03-29 02:41:32 +03:00
parent b6d74b5e15
commit 4d64990690
315 changed files with 656 additions and 530 deletions

View file

@ -1,6 +1,7 @@
// test the behavior of the --no-run flag without the --test flag
//@ compile-flags:-Z unstable-options --no-run --test-args=--test-threads=1
//@ error-pattern: the `--test` flag must be passed
pub fn f() {}
//~? ERROR the `--test` flag must be passed to enable `--no-run`

View file

@ -1,3 +1,4 @@
//@ compile-flags:--theme {{src-base}}/invalid-theme-name.rs
//@ error-pattern: invalid argument
//@ error-pattern: must have a .css extension
//~? ERROR invalid argument: "$DIR/invalid-theme-name.rs"

View file

@ -1,3 +1,4 @@
//@ check-pass
//@ compile-flags: --passes list
//@ error-pattern: the `passes` flag no longer functions
//~? WARN the `passes` flag no longer functions

View file

@ -1,6 +1,7 @@
//@ error-pattern: no documentation found
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
#![deny(rustdoc::missing_crate_level_docs)]
//^~ NOTE defined here
pub fn foo() {}
//~? ERROR no documentation found for this crate's top-level module

View file

@ -3,7 +3,7 @@ error: no documentation found for this crate's top-level module
= help: The following guide may be of use:
https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
note: the lint level is defined here
--> $DIR/no-crate-level-doc-lint.rs:3:9
--> $DIR/no-crate-level-doc-lint.rs:2:9
|
LL | #![deny(rustdoc::missing_crate_level_docs)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -8,4 +8,4 @@
struct A;
struct B;
pub const S: A = B;
pub const S: A = B; //~ ERROR mismatched types