Fix parser test
This commit is contained in:
parent
21951e503d
commit
ce5fd30270
4 changed files with 3 additions and 26 deletions
|
@ -485,7 +485,7 @@ mod test {
|
||||||
|
|
||||||
#[test] fn parse_ident_pat () {
|
#[test] fn parse_ident_pat () {
|
||||||
let parser = string_to_parser(@~"b");
|
let parser = string_to_parser(@~"b");
|
||||||
assert_eq!(parser.parse_pat(false),
|
assert_eq!(parser.parse_pat(),
|
||||||
@ast::pat{id:1, // fixme
|
@ast::pat{id:1, // fixme
|
||||||
node: ast::pat_ident(ast::bind_infer,
|
node: ast::pat_ident(ast::bind_infer,
|
||||||
@ast::Path{
|
@ast::Path{
|
||||||
|
|
|
@ -36,7 +36,7 @@ fn match_const_opt_by_imm_ref(v: &const Option<int>) {
|
||||||
|
|
||||||
fn match_const_opt_by_value(v: &const Option<int>) {
|
fn match_const_opt_by_value(v: &const Option<int>) {
|
||||||
match *v {
|
match *v {
|
||||||
Some(copy i) => process(i),
|
Some(i) => process(i),
|
||||||
None => ()
|
None => ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
// Copyright 2012 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.
|
|
||||||
|
|
||||||
use std::unstable;
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
unsafe {
|
|
||||||
let x = Some(unstable::sync::exclusive(false));
|
|
||||||
match x {
|
|
||||||
Some(copy z) => { //~ ERROR copying a value of non-copyable type
|
|
||||||
do z.with |b| { assert!(!*b); }
|
|
||||||
}
|
|
||||||
None => fail!()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -14,7 +14,7 @@ enum opts {
|
||||||
|
|
||||||
fn matcher1(x: opts) {
|
fn matcher1(x: opts) {
|
||||||
match x {
|
match x {
|
||||||
a(ref i) | b(copy i) => {} //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
|
a(ref i) | b(i) => {} //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
|
||||||
c(_) => {}
|
c(_) => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue