Converted fourcc! to loadable syntax extension
This commit is contained in:
parent
c1cc7e5f16
commit
97078d43b2
12 changed files with 225 additions and 118 deletions
|
|
@ -8,6 +8,15 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// xfail-stage1
|
||||
// xfail-pretty
|
||||
// xfail-android
|
||||
|
||||
#[feature(phase)];
|
||||
|
||||
#[phase(syntax)]
|
||||
extern mod fourcc;
|
||||
|
||||
fn main() {
|
||||
let val = fourcc!("foo"); //~ ERROR string literal with len != 4 in fourcc!
|
||||
let val2 = fourcc!("fooba"); //~ ERROR string literal with len != 4 in fourcc!
|
||||
|
|
|
|||
|
|
@ -8,6 +8,15 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// xfail-stage1
|
||||
// xfail-pretty
|
||||
// xfail-android
|
||||
|
||||
#[feature(phase)];
|
||||
|
||||
#[phase(syntax)]
|
||||
extern mod fourcc;
|
||||
|
||||
fn main() {
|
||||
let val = fourcc!("foo ", bork); //~ ERROR invalid endian directive in fourcc!
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,6 +8,15 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// xfail-stage1
|
||||
// xfail-pretty
|
||||
// xfail-android
|
||||
|
||||
#[feature(phase)];
|
||||
|
||||
#[phase(syntax)]
|
||||
extern mod fourcc;
|
||||
|
||||
fn main() {
|
||||
let v = fourcc!("fooλ"); //~ ERROR non-ascii string literal in fourcc!
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,6 +8,15 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// xfail-stage1
|
||||
// xfail-pretty
|
||||
// xfail-android
|
||||
|
||||
#[feature(phase)];
|
||||
|
||||
#[phase(syntax)]
|
||||
extern mod fourcc;
|
||||
|
||||
fn main() {
|
||||
let val = fourcc!(foo); //~ ERROR non-literal in fourcc!
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,6 +8,15 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// xfail-stage1
|
||||
// xfail-pretty
|
||||
// xfail-android
|
||||
|
||||
#[feature(phase)];
|
||||
|
||||
#[phase(syntax)]
|
||||
extern mod fourcc;
|
||||
|
||||
fn main() {
|
||||
let val = fourcc!(45f); //~ ERROR unsupported literal in fourcc!
|
||||
let val = fourcc!(45f32); //~ ERROR unsupported literal in fourcc!
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,6 +8,16 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// xfail-fast Feature gating doesn't work
|
||||
// xfail-stage1
|
||||
// xfail-pretty
|
||||
// xfail-android
|
||||
|
||||
#[feature(phase)];
|
||||
|
||||
#[phase(syntax)]
|
||||
extern mod fourcc;
|
||||
|
||||
static static_val: u32 = fourcc!("foo ");
|
||||
static static_val_le: u32 = fourcc!("foo ", little);
|
||||
static static_val_be: u32 = fourcc!("foo ", big);
|
||||
Loading…
Add table
Add a link
Reference in a new issue