about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorr0cky <mu001999@outlook.com>2024-02-07 10:42:01 +0800
committerr0cky <mu001999@outlook.com>2024-02-07 10:42:01 +0800
commitc7519d42c2664828c98fdb98acab73e9a39b0b97 (patch)
tree87e875c88b08158761df546ea4e88902fbb08d6a /tests/ui/parser
parent40878ca6ea79d6e55e430846a2de3350a76cd08f (diff)
downloadrust-c7519d42c2664828c98fdb98acab73e9a39b0b97.tar.gz
rust-c7519d42c2664828c98fdb98acab73e9a39b0b97.zip
Update tests
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/parse-assoc-type-lt.rs2
-rw-r--r--tests/ui/parser/suggest-assoc-const.fixed1
-rw-r--r--tests/ui/parser/suggest-assoc-const.rs1
-rw-r--r--tests/ui/parser/suggest-assoc-const.stderr2
-rw-r--r--tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed1
-rw-r--r--tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs1
-rw-r--r--tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr2
7 files changed, 7 insertions, 3 deletions
diff --git a/tests/ui/parser/parse-assoc-type-lt.rs b/tests/ui/parser/parse-assoc-type-lt.rs
index d3fe6079a5d..913fcd920bd 100644
--- a/tests/ui/parser/parse-assoc-type-lt.rs
+++ b/tests/ui/parser/parse-assoc-type-lt.rs
@@ -1,4 +1,4 @@
-// run-pass
+// check-pass
 // pretty-expanded FIXME #23616
 
 trait Foo {
diff --git a/tests/ui/parser/suggest-assoc-const.fixed b/tests/ui/parser/suggest-assoc-const.fixed
index 259f37b23a5..4229135ebb2 100644
--- a/tests/ui/parser/suggest-assoc-const.fixed
+++ b/tests/ui/parser/suggest-assoc-const.fixed
@@ -1,5 +1,6 @@
 // Issue: 101797, Suggest associated const for incorrect use of let in traits
 // run-rustfix
+#![allow(dead_code)]
 trait Trait {
     const _X: i32;
     //~^ ERROR non-item in item list
diff --git a/tests/ui/parser/suggest-assoc-const.rs b/tests/ui/parser/suggest-assoc-const.rs
index c7be712ec07..0cf695bd40a 100644
--- a/tests/ui/parser/suggest-assoc-const.rs
+++ b/tests/ui/parser/suggest-assoc-const.rs
@@ -1,5 +1,6 @@
 // Issue: 101797, Suggest associated const for incorrect use of let in traits
 // run-rustfix
+#![allow(dead_code)]
 trait Trait {
     let _X: i32;
     //~^ ERROR non-item in item list
diff --git a/tests/ui/parser/suggest-assoc-const.stderr b/tests/ui/parser/suggest-assoc-const.stderr
index 7ba1dbdff7e..6e29fad98d4 100644
--- a/tests/ui/parser/suggest-assoc-const.stderr
+++ b/tests/ui/parser/suggest-assoc-const.stderr
@@ -1,5 +1,5 @@
 error: non-item in item list
-  --> $DIR/suggest-assoc-const.rs:4:5
+  --> $DIR/suggest-assoc-const.rs:5:5
    |
 LL |     let _X: i32;
    |     ^^^ help: consider using `const` instead of `let` for associated const: `const`
diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed
index 63704735490..81ee6cdf0a7 100644
--- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed
+++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed
@@ -1,4 +1,5 @@
 // run-rustfix
+#![allow(dead_code)]
 
 trait Foo {
     fn bar() {} //~ ERROR non-item in item list
diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs
index 4650b05e20c..c8f525fc4f0 100644
--- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs
+++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs
@@ -1,4 +1,5 @@
 // run-rustfix
+#![allow(dead_code)]
 
 trait Foo {
     fn bar() {}; //~ ERROR non-item in item list
diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr
index c716d5908ea..396c76ac85f 100644
--- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr
+++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr
@@ -1,5 +1,5 @@
 error: non-item in item list
-  --> $DIR/suggest-removing-semicolon-after-impl-trait-items.rs:4:16
+  --> $DIR/suggest-removing-semicolon-after-impl-trait-items.rs:5:16
    |
 LL | trait Foo {
    |           - item list starts here