mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
rustup (fixes #28)
This commit is contained in:
parent
538db34e60
commit
f428b18c47
5 changed files with 20 additions and 20 deletions
|
@ -1,12 +1,12 @@
|
|||
#![feature(phase)]
|
||||
#![feature(plugin)]
|
||||
|
||||
#[phase(plugin)]
|
||||
#[plugin]
|
||||
extern crate clippy;
|
||||
|
||||
pub fn test(foo: Box<Vec<uint>>) {
|
||||
println!("{}", foo)
|
||||
pub fn test(foo: Box<Vec<bool>>) {
|
||||
println!("{:?}", foo.get(0))
|
||||
}
|
||||
|
||||
fn main(){
|
||||
test(box Vec::new());
|
||||
test(Box::new(Vec::new()));
|
||||
}
|
|
@ -1,12 +1,13 @@
|
|||
#![feature(phase)]
|
||||
#![feature(plugin)]
|
||||
|
||||
#[phase(plugin)]
|
||||
#[plugin]
|
||||
extern crate clippy;
|
||||
|
||||
extern crate collections;
|
||||
use collections::dlist::DList;
|
||||
|
||||
pub fn test(foo: DList<uint>) {
|
||||
println!("{}", foo)
|
||||
println!("{:?}", foo)
|
||||
}
|
||||
|
||||
fn main(){
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
#![feature(phase)]
|
||||
#![feature(plugin)]
|
||||
|
||||
#[phase(plugin)]
|
||||
#[plugin]
|
||||
extern crate clippy;
|
||||
|
||||
|
||||
fn main(){
|
||||
let x = Some(1u);
|
||||
match x {
|
||||
Some(y) => println!("{}", y),
|
||||
Some(y) => println!("{:?}", y),
|
||||
_ => ()
|
||||
}
|
||||
// Not linted
|
||||
match x {
|
||||
Some(y) => println!("{}", y),
|
||||
Some(y) => println!("{:?}", y),
|
||||
None => ()
|
||||
}
|
||||
let z = (1u,1u);
|
||||
match z {
|
||||
(2...3, 7...9) => println!("{}", z),
|
||||
(2...3, 7...9) => println!("{:?}", z),
|
||||
_ => {}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
#![feature(phase)]
|
||||
#![feature(plugin)]
|
||||
|
||||
#[phase(plugin)]
|
||||
#[plugin]
|
||||
extern crate clippy;
|
||||
|
||||
fn the_answer(ref mut x: u8) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![feature(globs, phase, plugin_registrar)]
|
||||
#![feature(plugin_registrar, box_syntax)]
|
||||
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_imports, unstable)]
|
||||
|
||||
#[phase(plugin, link)]
|
||||
#[macro_use]
|
||||
extern crate syntax;
|
||||
#[phase(plugin, link)]
|
||||
#[macro_use]
|
||||
extern crate rustc;
|
||||
|
||||
// Only for the compile time checking of paths
|
||||
|
|
Loading…
Reference in a new issue