Skip to content

Commit d5cba6c

Browse files
committed
Fixing tests
1 parent 053a696 commit d5cba6c

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

src/librustc_parse/lexer/tokentrees.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ impl<'a> TokenTreesReader<'a> {
172172
let mut unclosed_delimiter = None;
173173
let mut candidate = None;
174174

175-
176175
if self.last_unclosed_found_span != Some(self.token.span) {
177176
// do not complain about the same unclosed delimiter multiple times
178177
self.last_unclosed_found_span = Some(self.token.span);

src/test/ui/parser/issue-70583-block-is-empty-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ fn struct_generic(x: Vec<i32>) {
1616
for v in x {
1717
println!("{}", v);
1818
}
19-
}
19+
}
2020
} //~ ERROR unexpected closing delimiter: `}`

src/test/ui/parser/issue-70583-block-is-empty-1.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
error: unexpected closing delimiter: `}`
22
--> $DIR/issue-70583-block-is-empty-1.rs:20:1
33
|
4+
LL | ErrorHandled::Reported => {}
5+
| -- this block is empty, you might have not meant to close it
6+
...
47
LL | }
58
| ^ unexpected closing delimiter
69

src/test/ui/parser/issue-70583-block-is-empty-2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ pub enum ErrorHandled {
66
impl ErrorHandled {
77
pub fn assert_reported(self) {
88
match self {
9-
ErrorHandled::Reported => {}}
10-
//^~ ERROR this block is empty, you might have not mean to close it
9+
ErrorHandled::Reported => {}}
10+
//^~ ERROR this block is empty, you might have not meant to close it
1111
ErrorHandled::TooGeneric => panic!(),
1212
}
1313
}

src/test/ui/parser/issue-70583-block-is-empty-2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: unexpected closing delimiter: `}`
22
--> $DIR/issue-70583-block-is-empty-2.rs:14:1
33
|
4-
LL | ErrorHandled::Reported => {}}
4+
LL | ErrorHandled::Reported => {}}
55
| -- this block is empty, you might have not meant to close it
66
...
77
LL | }

0 commit comments

Comments
 (0)