diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-24 01:18:58 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-24 01:18:58 +0000 |
commit | 3ab8d7a9ae1b8c5e421a4666f6693ae7278a7a3c (patch) | |
tree | f1ce0582f85b1612e369681dc981df7ec575ae9a /crates/syntax/test_data/parser/err | |
parent | a7a1bb444d59732e3973b7b2d5b27413c5a1ca81 (diff) | |
parent | 70d43c3faf6cc4e6fe4833c6375d05e54874ca0d (diff) |
Merge #7414
7414: Add validation for mutable const items r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/syntax/test_data/parser/err')
-rw-r--r-- | crates/syntax/test_data/parser/err/0047_mutable_const_item.rast | 22 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/err/0047_mutable_const_item.rs | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/crates/syntax/test_data/parser/err/0047_mutable_const_item.rast b/crates/syntax/test_data/parser/err/0047_mutable_const_item.rast new file mode 100644 index 000000000..c7eb312c9 --- /dev/null +++ b/crates/syntax/test_data/parser/err/0047_mutable_const_item.rast | |||
@@ -0,0 +1,22 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "const" | ||
4 | [email protected] " " | ||
5 | [email protected] "mut" | ||
6 | [email protected] " " | ||
7 | [email protected] | ||
8 | [email protected] "FOO" | ||
9 | [email protected] ":" | ||
10 | [email protected] " " | ||
11 | [email protected] | ||
12 | [email protected] "(" | ||
13 | [email protected] ")" | ||
14 | [email protected] " " | ||
15 | [email protected] "=" | ||
16 | [email protected] " " | ||
17 | [email protected] | ||
18 | [email protected] "(" | ||
19 | [email protected] ")" | ||
20 | [email protected] ";" | ||
21 | [email protected] "\n" | ||
22 | error 6..9: const globals cannot be mutable | ||
diff --git a/crates/syntax/test_data/parser/err/0047_mutable_const_item.rs b/crates/syntax/test_data/parser/err/0047_mutable_const_item.rs new file mode 100644 index 000000000..b34336f3f --- /dev/null +++ b/crates/syntax/test_data/parser/err/0047_mutable_const_item.rs | |||
@@ -0,0 +1 @@ | |||
const mut FOO: () = (); | |||