Skip to content

Commit 76a4952

Browse files
committed
Add test for updated parser error
1 parent 317258c commit 76a4952

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// Tests that two closures cannot simultaneously have mutable
12+
// access to the variable, whether that mutable access be used
13+
// for direct assignment or for taking mutable ref. Issue #6801.
14+
15+
#![feature(on_unimplemented)]
16+
17+
#[rustc_on_unimplemented(
18+
message="the message"
19+
label="the label"
20+
)]
21+
trait T {}
22+
//~^^^ ERROR expected one of `)` or `,`, found `label`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: expected one of `)` or `,`, found `label`
2+
--> $DIR/expected-comma-found-token.rs:19:5
3+
|
4+
LL | message="the message"
5+
| - expected one of `)` or `,` here
6+
LL | label="the label"
7+
| ^^^^^ unexpected token
8+
9+
error: aborting due to previous error
10+

0 commit comments

Comments
 (0)