Support general warnings and errors in lint pass via flags and attrs. Close #1543.

This commit is contained in:
Graydon Hoare 2012-04-12 17:30:52 -07:00
parent 7b3cb05311
commit 8a7fd4a04f
11 changed files with 273 additions and 130 deletions

View file

@ -1,5 +1,5 @@
// error-pattern:unused import
// compile-flags:--warn-unused-imports
// compile-flags:-W unused-imports
import cal = bar::c::cc;
mod foo {

View file

@ -0,0 +1,10 @@
// error-pattern:found rust type
#[warn(err_ctypes)];
#[nolink]
native mod libc {
fn malloc(size: int) -> *u8;
}
fn main() {
}

View file

@ -0,0 +1,9 @@
// compile-flags:-W err-ctypes
// error-pattern:found rust type
#[nolink]
native mod libc {
fn malloc(size: int) -> *u8;
}
fn main() {
}