1
Fork 0

Fix parser test

This commit is contained in:
Niko Matsakis 2013-05-30 21:01:25 -04:00
parent 21951e503d
commit ce5fd30270
4 changed files with 3 additions and 26 deletions

View file

@ -485,7 +485,7 @@ mod test {
#[test] fn parse_ident_pat () {
let parser = string_to_parser(@~"b");
assert_eq!(parser.parse_pat(false),
assert_eq!(parser.parse_pat(),
@ast::pat{id:1, // fixme
node: ast::pat_ident(ast::bind_infer,
@ast::Path{

View file

@ -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>) {
match *v {
Some(copy i) => process(i),
Some(i) => process(i),
None => ()
}
}

View file

@ -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!()
}
}
}

View file

@ -14,7 +14,7 @@ enum opts {
fn matcher1(x: opts) {
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(_) => {}
}
}