compiletest: Trim the value of dont-require-annotations

This commit is contained in:
Vadim Petrochenkov 2025-04-10 23:39:05 +03:00
parent ad72ba2e2c
commit 06dd9e2d20
10 changed files with 10 additions and 10 deletions

View File

@ -580,7 +580,7 @@ impl TestProps {
config.parse_name_value_directive(ln, DONT_REQUIRE_ANNOTATIONS)
{
self.dont_require_annotations
.insert(ErrorKind::expect_from_user_str(&err_kind));
.insert(ErrorKind::expect_from_user_str(err_kind.trim()));
}
},
);

View File

@ -1,5 +1,5 @@
//@ edition:2018
//@ dont-require-annotations:SUGGESTION
//@ dont-require-annotations: SUGGESTION
fn take_u32(_x: u32) {}

View File

@ -1,4 +1,4 @@
//@ dont-require-annotations:SUGGESTION
//@ dont-require-annotations: SUGGESTION
fn main() {
let u = 5 as bool; //~ ERROR cannot cast `i32` as `bool`

View File

@ -1,6 +1,6 @@
// Error, the linked empty library is `no_std` and doesn't provide a panic handler.
//@ dont-require-annotations:ERROR
//@ dont-require-annotations: ERROR
//@ dont-check-compiler-stderr
//@ aux-build: cfg_false_lib_no_std_before.rs

View File

@ -1,6 +1,6 @@
// ignore-tidy-linelength
//@ build-fail
//@ dont-require-annotations:ERROR
//@ dont-require-annotations: ERROR
//@ dont-check-compiler-stderr
//@ aux-build:panic-runtime-unwind.rs
//@ aux-build:panic-runtime-unwind2.rs

View File

@ -1,6 +1,6 @@
// ignore-tidy-linelength
//@ build-fail
//@ dont-require-annotations:ERROR
//@ dont-require-annotations: ERROR
//@ dont-check-compiler-stderr
//@ aux-build:panic-runtime-unwind.rs
//@ compile-flags:-C panic=abort

View File

@ -1,6 +1,6 @@
// ignore-tidy-linelength
//@ build-fail
//@ dont-require-annotations:ERROR
//@ dont-require-annotations: ERROR
//@ dont-check-compiler-stderr
//@ aux-build:panic-runtime-unwind.rs
//@ aux-build:wants-panic-runtime-unwind.rs

View File

@ -1,4 +1,4 @@
//@ dont-require-annotations:SUGGESTION
//@ dont-require-annotations: SUGGESTION
struct S;

View File

@ -1,4 +1,4 @@
//@ dont-require-annotations:SUGGESTION
//@ dont-require-annotations: SUGGESTION
struct X(usize);

View File

@ -1,5 +1,5 @@
//@ edition:2018
//@ dont-require-annotations:SUGGESTION
//@ dont-require-annotations: SUGGESTION
async fn hello() { //~ HELP try adding a return type
0