Skip to content

Commit

Permalink
Add test for updated parser error
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Jun 19, 2018
1 parent 317258c commit 76a4952
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/ui/parser/expected-comma-found-token.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// Tests that two closures cannot simultaneously have mutable
// access to the variable, whether that mutable access be used
// for direct assignment or for taking mutable ref. Issue #6801.

#![feature(on_unimplemented)]

#[rustc_on_unimplemented(
message="the message"
label="the label"
)]
trait T {}
//~^^^ ERROR expected one of `)` or `,`, found `label`
10 changes: 10 additions & 0 deletions src/test/ui/parser/expected-comma-found-token.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
error: expected one of `)` or `,`, found `label`
--> $DIR/expected-comma-found-token.rs:19:5
|
LL | message="the message"
| - expected one of `)` or `,` here
LL | label="the label"
| ^^^^^ unexpected token

error: aborting due to previous error

0 comments on commit 76a4952

Please sign in to comment.