about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-04-28 11:56:02 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-04-28 11:56:02 +0000
commit182eee298c05b7259c98209a3d9a87ecac484040 (patch)
tree819520a5bdbb77105de2a235dd88fa9187d54408
parent1f44a24e725bd2fdeccfb91b0daa51788ac761f1 (diff)
downloadrust-182eee298c05b7259c98209a3d9a87ecac484040.tar.gz
rust-182eee298c05b7259c98209a3d9a87ecac484040.zip
fixup tests wrt new normalization
-rw-r--r--tests/ui/const-generics/nested-type.rs6
-rw-r--r--tests/ui/fmt/format-string-error.rs2
-rw-r--r--tests/ui/parser/issues/issue-62913.rs2
3 files changed, 7 insertions, 3 deletions
diff --git a/tests/ui/const-generics/nested-type.rs b/tests/ui/const-generics/nested-type.rs
index 5240f5c3b0b..ff95018065a 100644
--- a/tests/ui/const-generics/nested-type.rs
+++ b/tests/ui/const-generics/nested-type.rs
@@ -3,7 +3,7 @@
 #![cfg_attr(full, feature(adt_const_params))]
 #![cfg_attr(full, allow(incomplete_features))]
 
-struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
+struct Foo<const N: [u8; {
     struct Foo<const N: usize>;
 
     impl<const N: usize> Foo<N> {
@@ -15,5 +15,9 @@ struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
     Foo::<17>::value()
     //~^ ERROR cannot call non-const fn
 }]>;
+//[min]~^^^^^^^^^^^^ ERROR `[u8; {
+
+// N.B. it is important that the comment above is not inside the array length,
+//      otherwise it may check for itself, instead of the actual error
 
 fn main() {}
diff --git a/tests/ui/fmt/format-string-error.rs b/tests/ui/fmt/format-string-error.rs
index eae4f3cb547..9b436e2c479 100644
--- a/tests/ui/fmt/format-string-error.rs
+++ b/tests/ui/fmt/format-string-error.rs
@@ -17,7 +17,7 @@ fn main() {
     let _ = format!("}");
     //~^ ERROR invalid format string: unmatched `}` found
     let _ = format!("{\\}");
-    //~^ ERROR invalid format string: expected `'}'`, found `'\\'`
+    //~^ ERROR invalid format string: expected `'}'`, found `'\'`
     let _ = format!("\n\n\n{\n\n\n");
     //~^ ERROR invalid format string
     let _ = format!(r###"
diff --git a/tests/ui/parser/issues/issue-62913.rs b/tests/ui/parser/issues/issue-62913.rs
index 0db06f636c3..a55ef5ac710 100644
--- a/tests/ui/parser/issues/issue-62913.rs
+++ b/tests/ui/parser/issues/issue-62913.rs
@@ -1,4 +1,4 @@
 "\u\\"
 //~^ ERROR incorrect unicode escape sequence
 //~| ERROR invalid trailing slash in literal
-//~| ERROR expected item, found `"\u\\"`
+//~| ERROR expected item, found `"\u\"`