about summary refs log tree commit diff
path: root/src/test/ui/parser/raw
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/parser/raw
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/parser/raw')
-rw-r--r--src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.rs5
-rw-r--r--src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr9
-rw-r--r--src/test/ui/parser/raw/raw-byte-string-eof.rs3
-rw-r--r--src/test/ui/parser/raw/raw-byte-string-eof.stderr13
-rw-r--r--src/test/ui/parser/raw/raw-byte-string-literals.rs7
-rw-r--r--src/test/ui/parser/raw/raw-byte-string-literals.stderr20
-rw-r--r--src/test/ui/parser/raw/raw-literal-keywords.rs25
-rw-r--r--src/test/ui/parser/raw/raw-literal-keywords.stderr39
-rw-r--r--src/test/ui/parser/raw/raw-literal-self.rs4
-rw-r--r--src/test/ui/parser/raw/raw-literal-self.stderr8
-rw-r--r--src/test/ui/parser/raw/raw-literal-underscore.rs4
-rw-r--r--src/test/ui/parser/raw/raw-literal-underscore.stderr8
-rw-r--r--src/test/ui/parser/raw/raw-str-delim.rs3
-rw-r--r--src/test/ui/parser/raw/raw-str-delim.stderr8
-rw-r--r--src/test/ui/parser/raw/raw-str-in-macro-call.rs14
-rw-r--r--src/test/ui/parser/raw/raw-str-unbalanced.rs22
-rw-r--r--src/test/ui/parser/raw/raw-str-unbalanced.stderr36
-rw-r--r--src/test/ui/parser/raw/raw-str-unterminated.rs4
-rw-r--r--src/test/ui/parser/raw/raw-str-unterminated.stderr11
-rw-r--r--src/test/ui/parser/raw/raw-string-2.rs4
-rw-r--r--src/test/ui/parser/raw/raw-string-2.stderr11
-rw-r--r--src/test/ui/parser/raw/raw-string.rs4
-rw-r--r--src/test/ui/parser/raw/raw-string.stderr13
23 files changed, 0 insertions, 275 deletions
diff --git a/src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.rs b/src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.rs
deleted file mode 100644
index bdfc29a3d57..00000000000
--- a/src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// This won't actually panic because of the error comment -- the `"` needs to be
-// the last byte in the file (including not having a trailing newline)
-// Prior to the fix you get the error: 'expected item, found `r" ...`'
-// because the string being unterminated wasn't properly detected.
-r" //~ unterminated raw string
diff --git a/src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr b/src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr
deleted file mode 100644
index 3a7e2a4b14a..00000000000
--- a/src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0748]: unterminated raw string
-  --> $DIR/issue-70677-panic-on-unterminated-raw-str-at-eof.rs:5:1
-   |
-LL | r"
-   | ^ unterminated raw string
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0748`.
diff --git a/src/test/ui/parser/raw/raw-byte-string-eof.rs b/src/test/ui/parser/raw/raw-byte-string-eof.rs
deleted file mode 100644
index b74907b72b0..00000000000
--- a/src/test/ui/parser/raw/raw-byte-string-eof.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-pub fn main() {
-    br##"a"#;  //~ unterminated raw string
-}
diff --git a/src/test/ui/parser/raw/raw-byte-string-eof.stderr b/src/test/ui/parser/raw/raw-byte-string-eof.stderr
deleted file mode 100644
index a76668e8051..00000000000
--- a/src/test/ui/parser/raw/raw-byte-string-eof.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0748]: unterminated raw string
-  --> $DIR/raw-byte-string-eof.rs:2:5
-   |
-LL |     br##"a"#;
-   |     ^      - help: consider terminating the string here: `##`
-   |     |
-   |     unterminated raw string
-   |
-   = note: this raw string should be terminated with `"##`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0748`.
diff --git a/src/test/ui/parser/raw/raw-byte-string-literals.rs b/src/test/ui/parser/raw/raw-byte-string-literals.rs
deleted file mode 100644
index 1b859fee596..00000000000
--- a/src/test/ui/parser/raw/raw-byte-string-literals.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// ignore-tidy-cr
-
-pub fn main() {
-    br"a
"; //~ ERROR bare CR not allowed in raw string
-    br"é";  //~ ERROR non-ASCII character in raw byte string literal
-    br##~"a"~##;  //~ ERROR only `#` is allowed in raw string delimitation
-}
diff --git a/src/test/ui/parser/raw/raw-byte-string-literals.stderr b/src/test/ui/parser/raw/raw-byte-string-literals.stderr
deleted file mode 100644
index a2f27d1ed70..00000000000
--- a/src/test/ui/parser/raw/raw-byte-string-literals.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: bare CR not allowed in raw string
-  --> $DIR/raw-byte-string-literals.rs:4:9
-   |
-LL |     br"a
";
-   |         ^
-
-error: non-ASCII character in raw byte string literal
-  --> $DIR/raw-byte-string-literals.rs:5:8
-   |
-LL |     br"é";
-   |        ^ must be ASCII
-
-error: found invalid character; only `#` is allowed in raw string delimitation: ~
-  --> $DIR/raw-byte-string-literals.rs:6:5
-   |
-LL |     br##~"a"~##;
-   |     ^^^^^
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/parser/raw/raw-literal-keywords.rs b/src/test/ui/parser/raw/raw-literal-keywords.rs
deleted file mode 100644
index a986980fab9..00000000000
--- a/src/test/ui/parser/raw/raw-literal-keywords.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-fn test_if() {
-    r#if true { } //~ ERROR found keyword `true`
-}
-
-fn test_struct() {
-    r#struct Test; //~ ERROR found `Test`
-}
-
-fn test_union() {
-    r#union Test; //~ ERROR found `Test`
-}
-
-fn test_if_2() {
-    let _ = r#if; //~ ERROR cannot find value `r#if` in this scope
-}
-
-fn test_struct_2() {
-    let _ = r#struct; //~ ERROR cannot find value `r#struct` in this scope
-}
-
-fn test_union_2() {
-    let _ = r#union; //~ ERROR cannot find value `union` in this scope
-}
-
-fn main() {}
diff --git a/src/test/ui/parser/raw/raw-literal-keywords.stderr b/src/test/ui/parser/raw/raw-literal-keywords.stderr
deleted file mode 100644
index f7b6c894a90..00000000000
--- a/src/test/ui/parser/raw/raw-literal-keywords.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found keyword `true`
-  --> $DIR/raw-literal-keywords.rs:2:10
-   |
-LL |     r#if true { }
-   |          ^^^^ expected one of 8 possible tokens
-
-error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test`
-  --> $DIR/raw-literal-keywords.rs:6:14
-   |
-LL |     r#struct Test;
-   |              ^^^^ expected one of 8 possible tokens
-
-error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test`
-  --> $DIR/raw-literal-keywords.rs:10:13
-   |
-LL |     r#union Test;
-   |             ^^^^ expected one of 8 possible tokens
-
-error[E0425]: cannot find value `r#if` in this scope
-  --> $DIR/raw-literal-keywords.rs:14:13
-   |
-LL |     let _ = r#if;
-   |             ^^^^ not found in this scope
-
-error[E0425]: cannot find value `r#struct` in this scope
-  --> $DIR/raw-literal-keywords.rs:18:13
-   |
-LL |     let _ = r#struct;
-   |             ^^^^^^^^ not found in this scope
-
-error[E0425]: cannot find value `union` in this scope
-  --> $DIR/raw-literal-keywords.rs:22:13
-   |
-LL |     let _ = r#union;
-   |             ^^^^^^^ not found in this scope
-
-error: aborting due to 6 previous errors
-
-For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/parser/raw/raw-literal-self.rs b/src/test/ui/parser/raw/raw-literal-self.rs
deleted file mode 100644
index a0c9e24c235..00000000000
--- a/src/test/ui/parser/raw/raw-literal-self.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
-    let r#self: ();
-    //~^ ERROR `self` cannot be a raw identifier
-}
diff --git a/src/test/ui/parser/raw/raw-literal-self.stderr b/src/test/ui/parser/raw/raw-literal-self.stderr
deleted file mode 100644
index 2a40dfe200c..00000000000
--- a/src/test/ui/parser/raw/raw-literal-self.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: `self` cannot be a raw identifier
-  --> $DIR/raw-literal-self.rs:2:9
-   |
-LL |     let r#self: ();
-   |         ^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/parser/raw/raw-literal-underscore.rs b/src/test/ui/parser/raw/raw-literal-underscore.rs
deleted file mode 100644
index a9d9e13a9d9..00000000000
--- a/src/test/ui/parser/raw/raw-literal-underscore.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
-    let r#_: ();
-    //~^ ERROR `_` cannot be a raw identifier
-}
diff --git a/src/test/ui/parser/raw/raw-literal-underscore.stderr b/src/test/ui/parser/raw/raw-literal-underscore.stderr
deleted file mode 100644
index d7a364d8579..00000000000
--- a/src/test/ui/parser/raw/raw-literal-underscore.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: `_` cannot be a raw identifier
-  --> $DIR/raw-literal-underscore.rs:2:9
-   |
-LL |     let r#_: ();
-   |         ^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/parser/raw/raw-str-delim.rs b/src/test/ui/parser/raw/raw-str-delim.rs
deleted file mode 100644
index 2f13893cecd..00000000000
--- a/src/test/ui/parser/raw/raw-str-delim.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-static s: &'static str =
-    r#~"#"~# //~ ERROR found invalid character; only `#` is allowed in raw string delimitation
-;
diff --git a/src/test/ui/parser/raw/raw-str-delim.stderr b/src/test/ui/parser/raw/raw-str-delim.stderr
deleted file mode 100644
index 8a04f99a126..00000000000
--- a/src/test/ui/parser/raw/raw-str-delim.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: found invalid character; only `#` is allowed in raw string delimitation: ~
-  --> $DIR/raw-str-delim.rs:2:5
-   |
-LL |     r#~"#"~#
-   |     ^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/parser/raw/raw-str-in-macro-call.rs b/src/test/ui/parser/raw/raw-str-in-macro-call.rs
deleted file mode 100644
index 462c2279f5c..00000000000
--- a/src/test/ui/parser/raw/raw-str-in-macro-call.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// check-pass
-
-macro_rules! m1 {
-    ($tt:tt #) => ()
-}
-
-macro_rules! m2 {
-    ($tt:tt) => ()
-}
-
-fn main() {
-    m1!(r#"abc"##);
-    m2!(r#"abc"#);
-}
diff --git a/src/test/ui/parser/raw/raw-str-unbalanced.rs b/src/test/ui/parser/raw/raw-str-unbalanced.rs
deleted file mode 100644
index 38537f8b31e..00000000000
--- a/src/test/ui/parser/raw/raw-str-unbalanced.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-static s: &'static str =
-    r#""## //~ ERROR too many `#` when terminating raw string
-;
-
-static s2: &'static str =
-    r#"
-      "#### //~ ERROR too many `#` when terminating raw string
-;
-
-const A: &'static str = r"" //~ ERROR expected `;`, found `#`
-
-// Test
-#[test]
-fn test() {}
-
-const B: &'static str = r""## //~ ERROR too many `#` when terminating raw string
-
-// Test
-#[test]
-fn test2() {}
-
-fn main() {}
diff --git a/src/test/ui/parser/raw/raw-str-unbalanced.stderr b/src/test/ui/parser/raw/raw-str-unbalanced.stderr
deleted file mode 100644
index eac8c06c1df..00000000000
--- a/src/test/ui/parser/raw/raw-str-unbalanced.stderr
+++ /dev/null
@@ -1,36 +0,0 @@
-error: too many `#` when terminating raw string
-  --> $DIR/raw-str-unbalanced.rs:2:10
-   |
-LL |     r#""##
-   |     -----^ help: remove the extra `#`
-   |     |
-   |     this raw string started with 1 `#`
-
-error: too many `#` when terminating raw string
-  --> $DIR/raw-str-unbalanced.rs:7:9
-   |
-LL | /     r#"
-LL | |       "####
-   | |        -^^^ help: remove the extra `#`s
-   | |________|
-   |          this raw string started with 1 `#`
-
-error: expected `;`, found `#`
-  --> $DIR/raw-str-unbalanced.rs:10:28
-   |
-LL | const A: &'static str = r""
-   |                            ^ help: add `;` here
-...
-LL | #[test]
-   | - unexpected token
-
-error: too many `#` when terminating raw string
-  --> $DIR/raw-str-unbalanced.rs:16:28
-   |
-LL | const B: &'static str = r""##
-   |                         ---^^ help: remove the extra `#`s
-   |                         |
-   |                         this raw string started with 0 `#`s
-
-error: aborting due to 4 previous errors
-
diff --git a/src/test/ui/parser/raw/raw-str-unterminated.rs b/src/test/ui/parser/raw/raw-str-unterminated.rs
deleted file mode 100644
index fd317295561..00000000000
--- a/src/test/ui/parser/raw/raw-str-unterminated.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-static s: &'static str =
-    r#" string literal goes on
-        and on
-    //~^^ ERROR unterminated raw string
diff --git a/src/test/ui/parser/raw/raw-str-unterminated.stderr b/src/test/ui/parser/raw/raw-str-unterminated.stderr
deleted file mode 100644
index 077f763f154..00000000000
--- a/src/test/ui/parser/raw/raw-str-unterminated.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0748]: unterminated raw string
-  --> $DIR/raw-str-unterminated.rs:2:5
-   |
-LL |     r#" string literal goes on
-   |     ^ unterminated raw string
-   |
-   = note: this raw string should be terminated with `"#`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0748`.
diff --git a/src/test/ui/parser/raw/raw-string-2.rs b/src/test/ui/parser/raw/raw-string-2.rs
deleted file mode 100644
index 067332d2819..00000000000
--- a/src/test/ui/parser/raw/raw-string-2.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
-    let x = r###"here's a long string"# "# "##;
-    //~^ ERROR unterminated raw string
-}
diff --git a/src/test/ui/parser/raw/raw-string-2.stderr b/src/test/ui/parser/raw/raw-string-2.stderr
deleted file mode 100644
index 8bbac9d7bd0..00000000000
--- a/src/test/ui/parser/raw/raw-string-2.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0748]: unterminated raw string
-  --> $DIR/raw-string-2.rs:2:13
-   |
-LL |     let x = r###"here's a long string"# "# "##;
-   |             ^ unterminated raw string       -- help: consider terminating the string here: `###`
-   |
-   = note: this raw string should be terminated with `"###`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0748`.
diff --git a/src/test/ui/parser/raw/raw-string.rs b/src/test/ui/parser/raw/raw-string.rs
deleted file mode 100644
index 84f07c4a941..00000000000
--- a/src/test/ui/parser/raw/raw-string.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
-    let x = r##"lol"#;
-    //~^ ERROR unterminated raw string
-}
diff --git a/src/test/ui/parser/raw/raw-string.stderr b/src/test/ui/parser/raw/raw-string.stderr
deleted file mode 100644
index b2b853a89e7..00000000000
--- a/src/test/ui/parser/raw/raw-string.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0748]: unterminated raw string
-  --> $DIR/raw-string.rs:2:13
-   |
-LL |     let x = r##"lol"#;
-   |             ^       - help: consider terminating the string here: `##`
-   |             |
-   |             unterminated raw string
-   |
-   = note: this raw string should be terminated with `"##`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0748`.