diff --git a/src/test/run-fail/args-panic.rs b/src/test/run-fail/args-panic.rs index 47831f1af737b..b8fb03faf0802 100644 --- a/src/test/run-fail/args-panic.rs +++ b/src/test/run-fail/args-panic.rs @@ -14,6 +14,10 @@ #![allow(unknown_features)] #![feature(box_syntax)] -fn f(_a: isize, _b: isize, _c: Box) { panic!("moop"); } +fn f(_a: isize, _b: isize, _c: Box) { + panic!("moop"); +} -fn main() { f(1, panic!("meep"), box 42); } +fn main() { + f(1, panic!("meep"), box 42); +} diff --git a/src/test/run-fail/assert-eq-macro-panic.rs b/src/test/run-fail/assert-eq-macro-panic.rs index 0b35062b186e9..a3e0a1f904faa 100644 --- a/src/test/run-fail/assert-eq-macro-panic.rs +++ b/src/test/run-fail/assert-eq-macro-panic.rs @@ -11,5 +11,5 @@ // error-pattern:assertion failed: `(left == right)` (left: `14`, right: `15`) fn main() { - assert_eq!(14,15); + assert_eq!(14, 15); } diff --git a/src/test/run-fail/binop-fail-3.rs b/src/test/run-fail/binop-fail-3.rs index 8cabd3b326296..5be9cd4a9bc34 100644 --- a/src/test/run-fail/binop-fail-3.rs +++ b/src/test/run-fail/binop-fail-3.rs @@ -9,7 +9,9 @@ // except according to those terms. // error-pattern:quux -fn foo() -> ! { panic!("quux"); } +fn foo() -> ! { + panic!("quux"); +} fn main() { foo() == foo(); // these types wind up being defaulted to () } diff --git a/src/test/run-fail/binop-panic.rs b/src/test/run-fail/binop-panic.rs index 159c33198a6e4..fb2db7ea9985c 100644 --- a/src/test/run-fail/binop-panic.rs +++ b/src/test/run-fail/binop-panic.rs @@ -9,5 +9,10 @@ // except according to those terms. // error-pattern:quux -fn my_err(s: String) -> ! { println!("{}", s); panic!("quux"); } -fn main() { 3_usize == my_err("bye".to_string()); } +fn my_err(s: String) -> ! { + println!("{}", s); + panic!("quux"); +} +fn main() { + 3_usize == my_err("bye".to_string()); +} diff --git a/src/test/run-fail/bug-2470-bounds-check-overflow.rs b/src/test/run-fail/bug-2470-bounds-check-overflow.rs index 5e3da8476af3f..4a294d8fabc38 100644 --- a/src/test/run-fail/bug-2470-bounds-check-overflow.rs +++ b/src/test/run-fail/bug-2470-bounds-check-overflow.rs @@ -20,7 +20,7 @@ fn main() { // address of the 0th cell in the array (even though the index is // huge). - let x = vec!(1_usize,2_usize,3_usize); + let x = vec![1_usize, 2_usize, 3_usize]; let base = x.as_ptr() as usize; let idx = base / mem::size_of::(); @@ -28,7 +28,7 @@ fn main() { println!("ov1 idx = 0x{:x}", idx); println!("ov1 sizeof::() = 0x{:x}", mem::size_of::()); println!("ov1 idx * sizeof::() = 0x{:x}", - idx * mem::size_of::()); + idx * mem::size_of::()); // This should panic. println!("ov1 0x{:x}", x[idx]); diff --git a/src/test/run-fail/bug-811.rs b/src/test/run-fail/bug-811.rs index fc64d7c1ba356..c0e02ccd61be2 100644 --- a/src/test/run-fail/bug-811.rs +++ b/src/test/run-fail/bug-811.rs @@ -12,7 +12,9 @@ use std::marker::PhantomData; -fn test00_start(ch: chan_t, message: isize) { send(ch, message); } +fn test00_start(ch: chan_t, message: isize) { + send(ch, message); +} type task_id = isize; type port_id = isize; @@ -23,6 +25,10 @@ struct chan_t { marker: PhantomData<*mut T>, } -fn send(_ch: chan_t, _data: T) { panic!(); } +fn send(_ch: chan_t, _data: T) { + panic!(); +} -fn main() { panic!("quux"); } +fn main() { + panic!("quux"); +} diff --git a/src/test/run-fail/doublepanic.rs b/src/test/run-fail/doublepanic.rs index 3835a16a5c263..936ebd9689737 100644 --- a/src/test/run-fail/doublepanic.rs +++ b/src/test/run-fail/doublepanic.rs @@ -10,7 +10,7 @@ #![allow(unreachable_code)] -//error-pattern:One +// error-pattern:One fn main() { panic!("One"); panic!("Two"); diff --git a/src/test/run-fail/explicit-panic-msg.rs b/src/test/run-fail/explicit-panic-msg.rs index c9c04e5f2daab..907fae02b419b 100644 --- a/src/test/run-fail/explicit-panic-msg.rs +++ b/src/test/run-fail/explicit-panic-msg.rs @@ -14,6 +14,8 @@ // error-pattern:wooooo fn main() { let mut a = 1; - if 1 == 1 { a = 2; } + if 1 == 1 { + a = 2; + } panic!(format!("woooo{}", "o")); } diff --git a/src/test/run-fail/explicit-panic.rs b/src/test/run-fail/explicit-panic.rs index 4699897bf8abe..928e7326b66cd 100644 --- a/src/test/run-fail/explicit-panic.rs +++ b/src/test/run-fail/explicit-panic.rs @@ -12,4 +12,6 @@ // error-pattern:explicit -fn main() { panic!(); } +fn main() { + panic!(); +} diff --git a/src/test/run-fail/expr-fn-panic.rs b/src/test/run-fail/expr-fn-panic.rs index 8cf018fb7702d..f7a889754257b 100644 --- a/src/test/run-fail/expr-fn-panic.rs +++ b/src/test/run-fail/expr-fn-panic.rs @@ -10,6 +10,10 @@ // error-pattern:explicit panic -fn f() -> ! { panic!() } +fn f() -> ! { + panic!() +} -fn main() { f(); } +fn main() { + f(); +} diff --git a/src/test/run-fail/expr-if-panic-fn.rs b/src/test/run-fail/expr-if-panic-fn.rs index e9f493c16f171..a8ec8f3f41462 100644 --- a/src/test/run-fail/expr-if-panic-fn.rs +++ b/src/test/run-fail/expr-if-panic-fn.rs @@ -10,8 +10,19 @@ // error-pattern:explicit panic -fn f() -> ! { panic!() } +fn f() -> ! { + panic!() +} -fn g() -> isize { let x = if true { f() } else { 10 }; return x; } +fn g() -> isize { + let x = if true { + f() + } else { + 10 + }; + return x; +} -fn main() { g(); } +fn main() { + g(); +} diff --git a/src/test/run-fail/expr-if-panic.rs b/src/test/run-fail/expr-if-panic.rs index b6791271a11ba..25bf43751f0b3 100644 --- a/src/test/run-fail/expr-if-panic.rs +++ b/src/test/run-fail/expr-if-panic.rs @@ -10,4 +10,12 @@ // error-pattern:explicit panic -fn main() { let _x = if false { 0 } else if true { panic!() } else { 10 }; } +fn main() { + let _x = if false { + 0 + } else if true { + panic!() + } else { + 10 + }; +} diff --git a/src/test/run-fail/expr-match-panic-fn.rs b/src/test/run-fail/expr-match-panic-fn.rs index 0269eb0af9c34..6758ac6c4d4d8 100644 --- a/src/test/run-fail/expr-match-panic-fn.rs +++ b/src/test/run-fail/expr-match-panic-fn.rs @@ -10,8 +10,18 @@ // error-pattern:explicit panic -fn f() -> ! { panic!() } +fn f() -> ! { + panic!() +} -fn g() -> isize { let x = match true { true => { f() } false => { 10 } }; return x; } +fn g() -> isize { + let x = match true { + true => f(), + false => 10, + }; + return x; +} -fn main() { g(); } +fn main() { + g(); +} diff --git a/src/test/run-fail/expr-match-panic.rs b/src/test/run-fail/expr-match-panic.rs index 3a6bd59b3acaa..8876fb1f49b82 100644 --- a/src/test/run-fail/expr-match-panic.rs +++ b/src/test/run-fail/expr-match-panic.rs @@ -10,4 +10,9 @@ // error-pattern:explicit panic -fn main() { let _x = match true { false => { 0 } true => { panic!() } }; } +fn main() { + let _x = match true { + false => 0, + true => panic!(), + }; +} diff --git a/src/test/run-fail/for-each-loop-panic.rs b/src/test/run-fail/for-each-loop-panic.rs index a1a760c040c75..a462d83601921 100644 --- a/src/test/run-fail/for-each-loop-panic.rs +++ b/src/test/run-fail/for-each-loop-panic.rs @@ -10,4 +10,8 @@ // error-pattern:moop -fn main() { for _ in 0_usize..10_usize { panic!("moop"); } } +fn main() { + for _ in 0_usize..10_usize { + panic!("moop"); + } +} diff --git a/src/test/run-fail/if-check-panic.rs b/src/test/run-fail/if-check-panic.rs index 8c4caccdb6597..f8b2d11cb646d 100644 --- a/src/test/run-fail/if-check-panic.rs +++ b/src/test/run-fail/if-check-panic.rs @@ -12,7 +12,11 @@ fn even(x: usize) -> bool { if x < 2 { return false; - } else if x == 2 { return true; } else { return even(x - 2); } + } else if x == 2 { + return true; + } else { + return even(x - 2); + } } fn foo(x: usize) { @@ -23,4 +27,6 @@ fn foo(x: usize) { } } -fn main() { foo(3); } +fn main() { + foo(3); +} diff --git a/src/test/run-fail/if-cond-bot.rs b/src/test/run-fail/if-cond-bot.rs index f38b00ab46d90..203bc8fc65ff8 100644 --- a/src/test/run-fail/if-cond-bot.rs +++ b/src/test/run-fail/if-cond-bot.rs @@ -9,5 +9,11 @@ // except according to those terms. // error-pattern:quux -fn my_err(s: String) -> ! { println!("{}", s); panic!("quux"); } -fn main() { if my_err("bye".to_string()) { } } +fn my_err(s: String) -> ! { + println!("{}", s); + panic!("quux"); +} +fn main() { + if my_err("bye".to_string()) { + } +} diff --git a/src/test/run-fail/issue-12920.rs b/src/test/run-fail/issue-12920.rs index cbc92c640d2ca..39a819f3d5204 100644 --- a/src/test/run-fail/issue-12920.rs +++ b/src/test/run-fail/issue-12920.rs @@ -11,5 +11,6 @@ // error-pattern:explicit panic pub fn main() { - panic!(); println!("{}", 1); + panic!(); + println!("{}", 1); } diff --git a/src/test/run-fail/issue-18576.rs b/src/test/run-fail/issue-18576.rs index e326949458ebf..88fb8f1b0c4cc 100644 --- a/src/test/run-fail/issue-18576.rs +++ b/src/test/run-fail/issue-18576.rs @@ -20,4 +20,4 @@ fn main() { let pointer = other; pointer(); } -extern fn other() {} +extern "C" fn other() {} diff --git a/src/test/run-fail/issue-20971.rs b/src/test/run-fail/issue-20971.rs index 818f0e1394196..e433a45731f95 100644 --- a/src/test/run-fail/issue-20971.rs +++ b/src/test/run-fail/issue-20971.rs @@ -19,16 +19,13 @@ pub trait Parser { impl Parser for () { type Input = (); - fn parse(&mut self, input: ()) { - - } + fn parse(&mut self, input: ()) {} } -pub fn many() -> Box::Input> + 'static> { +pub fn many() -> Box::Input> + 'static> { panic!("Hello, world!") } fn main() { - many() - .parse(()); + many().parse(()); } diff --git a/src/test/run-fail/issue-2444.rs b/src/test/run-fail/issue-2444.rs index ce91af95d96b0..f55b1ba03dee8 100644 --- a/src/test/run-fail/issue-2444.rs +++ b/src/test/run-fail/issue-2444.rs @@ -12,10 +12,14 @@ use std::sync::Arc; -enum e { ee(Arc) } +enum e { + ee(Arc), +} -fn foo() -> e {panic!();} +fn foo() -> e { + panic!(); +} fn main() { - let _f = foo(); + let _f = foo(); } diff --git a/src/test/run-fail/issue-28934.rs b/src/test/run-fail/issue-28934.rs index 2f437c7a81479..b32a504cb6bee 100644 --- a/src/test/run-fail/issue-28934.rs +++ b/src/test/run-fail/issue-28934.rs @@ -17,9 +17,14 @@ struct Parser<'i: 't, 't>(&'i u8, &'t u8); impl<'i, 't> Parser<'i, 't> { fn parse_nested_block(&mut self, parse: F) -> Result - where for<'tt> F: FnOnce(&mut Parser<'i, 'tt>) -> T { panic!() } + where for<'tt> F: FnOnce(&mut Parser<'i, 'tt>) -> T + { + panic!() + } - fn expect_exhausted(&mut self) -> Result<(), ()> { Ok(()) } + fn expect_exhausted(&mut self) -> Result<(), ()> { + Ok(()) + } } fn main() { diff --git a/src/test/run-fail/issue-3029.rs b/src/test/run-fail/issue-3029.rs index 4d048fe0fcf4b..1ada7771cd66c 100644 --- a/src/test/run-fail/issue-3029.rs +++ b/src/test/run-fail/issue-3029.rs @@ -16,7 +16,7 @@ // error-pattern:so long fn main() { let mut x = Vec::new(); - let y = vec!(3); + let y = vec![3]; panic!("so long"); x.extend(y.into_iter()); } diff --git a/src/test/run-fail/issue-6458-1.rs b/src/test/run-fail/issue-6458-1.rs index 631517f6a3ca6..7da27bd15f24a 100644 --- a/src/test/run-fail/issue-6458-1.rs +++ b/src/test/run-fail/issue-6458-1.rs @@ -11,4 +11,6 @@ // error-pattern:explicit panic fn foo(t: T) {} -fn main() { foo(panic!()) } +fn main() { + foo(panic!()) +} diff --git a/src/test/run-fail/issue-948.rs b/src/test/run-fail/issue-948.rs index 272d85d7b508b..4a1bc856a39c3 100644 --- a/src/test/run-fail/issue-948.rs +++ b/src/test/run-fail/issue-948.rs @@ -12,9 +12,12 @@ #![allow(unused_variables)] -struct Point { x: isize, y: isize } +struct Point { + x: isize, + y: isize, +} fn main() { - let origin = Point {x: 0, y: 0}; - let f: Point = Point {x: (panic!("beep boop")),.. origin}; + let origin = Point { x: 0, y: 0 }; + let f: Point = Point { x: (panic!("beep boop")), ..origin }; } diff --git a/src/test/run-fail/match-bot-panic.rs b/src/test/run-fail/match-bot-panic.rs index c1f90bb8f2b3c..5a6eedb4863a9 100644 --- a/src/test/run-fail/match-bot-panic.rs +++ b/src/test/run-fail/match-bot-panic.rs @@ -13,10 +13,12 @@ #![allow(unreachable_code)] #![allow(unused_variables)] -fn foo(s: String) { } +fn foo(s: String) {} fn main() { - let i = - match Some::(3) { None:: => { panic!() } Some::(_) => { panic!() } }; + let i = match Some::(3) { + None:: => panic!(), + Some::(_) => panic!(), + }; foo(i); } diff --git a/src/test/run-fail/match-disc-bot.rs b/src/test/run-fail/match-disc-bot.rs index 90b729a6dd271..a369a9889cc59 100644 --- a/src/test/run-fail/match-disc-bot.rs +++ b/src/test/run-fail/match-disc-bot.rs @@ -9,6 +9,15 @@ // except according to those terms. // error-pattern:quux -fn f() -> ! { panic!("quux") } -fn g() -> isize { match f() { true => { 1 } false => { 0 } } } -fn main() { g(); } +fn f() -> ! { + panic!("quux") +} +fn g() -> isize { + match f() { + true => 1, + false => 0, + } +} +fn main() { + g(); +} diff --git a/src/test/run-fail/match-wildcards.rs b/src/test/run-fail/match-wildcards.rs index 54e24de316531..61bfd38c5f4c8 100644 --- a/src/test/run-fail/match-wildcards.rs +++ b/src/test/run-fail/match-wildcards.rs @@ -11,10 +11,18 @@ // error-pattern:squirrelcupcake fn cmp() -> isize { match (Some('a'), None::) { - (Some(_), _) => { panic!("squirrelcupcake"); } - (_, Some(_)) => { panic!(); } - _ => { panic!("wat"); } + (Some(_), _) => { + panic!("squirrelcupcake"); + } + (_, Some(_)) => { + panic!(); + } + _ => { + panic!("wat"); + } } } -fn main() { println!("{}", cmp()); } +fn main() { + println!("{}", cmp()); +} diff --git a/src/test/run-fail/meta-revision-bad.rs b/src/test/run-fail/meta-revision-bad.rs index bf521d4b4e5e4..0b7c464800aa8 100644 --- a/src/test/run-fail/meta-revision-bad.rs +++ b/src/test/run-fail/meta-revision-bad.rs @@ -16,7 +16,15 @@ //[foo] error-pattern:bar //[bar] error-pattern:foo -#[cfg(foo)] fn die() {panic!("foo");} -#[cfg(bar)] fn die() {panic!("bar");} +#[cfg(foo)] +fn die() { + panic!("foo"); +} +#[cfg(bar)] +fn die() { + panic!("bar"); +} -fn main() { die(); } +fn main() { + die(); +} diff --git a/src/test/run-fail/meta-revision-ok.rs b/src/test/run-fail/meta-revision-ok.rs index f74ec39fdf27a..99dd332c558b0 100644 --- a/src/test/run-fail/meta-revision-ok.rs +++ b/src/test/run-fail/meta-revision-ok.rs @@ -15,7 +15,15 @@ //[foo] error-pattern:foo //[bar] error-pattern:bar -#[cfg(foo)] fn die() {panic!("foo");} -#[cfg(bar)] fn die() {panic!("bar");} +#[cfg(foo)] +fn die() { + panic!("foo"); +} +#[cfg(bar)] +fn die() { + panic!("bar"); +} -fn main() { die(); } +fn main() { + die(); +} diff --git a/src/test/run-fail/mir_dynamic_drops_1.rs b/src/test/run-fail/mir_dynamic_drops_1.rs index 590b9fbe43cf5..16160a1496ff9 100644 --- a/src/test/run-fail/mir_dynamic_drops_1.rs +++ b/src/test/run-fail/mir_dynamic_drops_1.rs @@ -27,7 +27,7 @@ impl<'a> Drop for Droppable<'a> { } #[rustc_mir] -fn mir(){ +fn mir() { let (mut xv, mut yv) = (false, false); let x = Droppable(&mut xv, 1); let y = Droppable(&mut yv, 2); diff --git a/src/test/run-fail/mir_dynamic_drops_2.rs b/src/test/run-fail/mir_dynamic_drops_2.rs index eafd3d351fb93..803ca53bf7a84 100644 --- a/src/test/run-fail/mir_dynamic_drops_2.rs +++ b/src/test/run-fail/mir_dynamic_drops_2.rs @@ -26,7 +26,7 @@ impl<'a> Drop for Droppable<'a> { } #[rustc_mir] -fn mir<'a>(d: Droppable<'a>){ +fn mir<'a>(d: Droppable<'a>) { loop { let x = d; break; diff --git a/src/test/run-fail/mir_dynamic_drops_3.rs b/src/test/run-fail/mir_dynamic_drops_3.rs index 730d9c8f22681..afc037f48aa43 100644 --- a/src/test/run-fail/mir_dynamic_drops_3.rs +++ b/src/test/run-fail/mir_dynamic_drops_3.rs @@ -33,7 +33,7 @@ fn may_panic<'a>() -> Droppable<'a> { } #[rustc_mir] -fn mir<'a>(d: Droppable<'a>){ +fn mir<'a>(d: Droppable<'a>) { let (mut a, mut b) = (false, false); let y = Droppable(&mut a, 2); let x = [Droppable(&mut b, 1), y, d, may_panic()]; diff --git a/src/test/run-fail/panic-arg.rs b/src/test/run-fail/panic-arg.rs index 0e029b6ecbc85..9023784050f2f 100644 --- a/src/test/run-fail/panic-arg.rs +++ b/src/test/run-fail/panic-arg.rs @@ -9,6 +9,10 @@ // except according to those terms. // error-pattern:woe -fn f(a: isize) { println!("{}", a); } +fn f(a: isize) { + println!("{}", a); +} -fn main() { f(panic!("woe")); } +fn main() { + f(panic!("woe")); +} diff --git a/src/test/run-fail/panic-macro-any.rs b/src/test/run-fail/panic-macro-any.rs index ce6a5d46cc740..7ca45565d854b 100644 --- a/src/test/run-fail/panic-macro-any.rs +++ b/src/test/run-fail/panic-macro-any.rs @@ -14,5 +14,5 @@ #![feature(box_syntax)] fn main() { - panic!(box 413 as Box<::std::any::Any+Send>); + panic!(box 413 as Box<::std::any::Any + Send>); } diff --git a/src/test/run-fail/panic-main.rs b/src/test/run-fail/panic-main.rs index 877ea9cd0a430..fd2919bfe12fc 100644 --- a/src/test/run-fail/panic-main.rs +++ b/src/test/run-fail/panic-main.rs @@ -9,4 +9,6 @@ // except according to those terms. // error-pattern:moop -fn main() { panic!("moop"); } +fn main() { + panic!("moop"); +} diff --git a/src/test/run-fail/panic-parens.rs b/src/test/run-fail/panic-parens.rs index 06655e4c68132..1917a7e2a7ff1 100644 --- a/src/test/run-fail/panic-parens.rs +++ b/src/test/run-fail/panic-parens.rs @@ -13,11 +13,15 @@ // error-pattern:oops fn bigpanic() { - while (panic!("oops")) { if (panic!()) { - match (panic!()) { () => { + while (panic!("oops")) { + if (panic!()) { + match (panic!()) { + () => {} + } } - } - }}; + } } -fn main() { bigpanic(); } +fn main() { + bigpanic(); +} diff --git a/src/test/run-fail/panic-task-name-none.rs b/src/test/run-fail/panic-task-name-none.rs index 3a5ac5a100957..ab50503830534 100644 --- a/src/test/run-fail/panic-task-name-none.rs +++ b/src/test/run-fail/panic-task-name-none.rs @@ -13,8 +13,9 @@ use std::thread; fn main() { - let r: Result<(),_> = thread::spawn(move|| { - panic!("test"); - }).join(); + let r: Result<(), _> = thread::spawn(move || { + panic!("test"); + }) + .join(); assert!(r.is_ok()); } diff --git a/src/test/run-fail/panic-task-name-owned.rs b/src/test/run-fail/panic-task-name-owned.rs index 561f141100ca7..2d2371f5ce77c 100644 --- a/src/test/run-fail/panic-task-name-owned.rs +++ b/src/test/run-fail/panic-task-name-owned.rs @@ -13,9 +13,14 @@ use std::thread::Builder; fn main() { - let r: () = Builder::new().name("owned name".to_string()).spawn(move|| { - panic!("test"); - () - }).unwrap().join().unwrap(); + let r: () = Builder::new() + .name("owned name".to_string()) + .spawn(move || { + panic!("test"); + () + }) + .unwrap() + .join() + .unwrap(); panic!(); } diff --git a/src/test/run-fail/panic.rs b/src/test/run-fail/panic.rs index 6773c6b9b5184..f59e6001794eb 100644 --- a/src/test/run-fail/panic.rs +++ b/src/test/run-fail/panic.rs @@ -9,4 +9,6 @@ // except according to those terms. // error-pattern:1 == 2 -fn main() { assert!(1 == 2); } +fn main() { + assert!(1 == 2); +} diff --git a/src/test/run-fail/result-get-panic.rs b/src/test/run-fail/result-get-panic.rs index dbded1075442c..6378b4ec79540 100644 --- a/src/test/run-fail/result-get-panic.rs +++ b/src/test/run-fail/result-get-panic.rs @@ -13,5 +13,5 @@ use std::result::Result::Err; fn main() { - println!("{}", Err::("kitty".to_string()).unwrap()); + println!("{}", Err::("kitty".to_string()).unwrap()); } diff --git a/src/test/run-fail/rhs-type.rs b/src/test/run-fail/rhs-type.rs index ff4040ded5f38..e16ce9c8edb85 100644 --- a/src/test/run-fail/rhs-type.rs +++ b/src/test/run-fail/rhs-type.rs @@ -15,9 +15,11 @@ #![allow(unreachable_code)] #![allow(unused_variables)] -struct T { t: String } +struct T { + t: String, +} fn main() { let pth = panic!("bye"); - let _rs: T = T {t: pth}; + let _rs: T = T { t: pth }; } diff --git a/src/test/run-fail/run-unexported-tests.rs b/src/test/run-fail/run-unexported-tests.rs index 0e218740ab1cf..8158333ade818 100644 --- a/src/test/run-fail/run-unexported-tests.rs +++ b/src/test/run-fail/run-unexported-tests.rs @@ -14,8 +14,10 @@ // ignore-pretty: does not work well with `--test` mod m { - pub fn exported() { } + pub fn exported() {} #[test] - fn unexported() { panic!("runned an unexported test"); } + fn unexported() { + panic!("runned an unexported test"); + } } diff --git a/src/test/run-fail/unimplemented-macro-panic.rs b/src/test/run-fail/unimplemented-macro-panic.rs index 7eff1fee62579..e3d8aa2e460af 100644 --- a/src/test/run-fail/unimplemented-macro-panic.rs +++ b/src/test/run-fail/unimplemented-macro-panic.rs @@ -9,4 +9,6 @@ // except according to those terms. // error-pattern:not yet implemented -fn main() { unimplemented!() } +fn main() { + unimplemented!() +} diff --git a/src/test/run-fail/unique-panic.rs b/src/test/run-fail/unique-panic.rs index 83b2bb91f0073..3dc3d0afda10b 100644 --- a/src/test/run-fail/unique-panic.rs +++ b/src/test/run-fail/unique-panic.rs @@ -10,4 +10,6 @@ // error-pattern: panic -fn main() { Box::new(panic!()); } +fn main() { + Box::new(panic!()); +} diff --git a/src/test/run-fail/unreachable-macro-panic.rs b/src/test/run-fail/unreachable-macro-panic.rs index 07e05c6fed954..493fe7ee4f8e7 100644 --- a/src/test/run-fail/unreachable-macro-panic.rs +++ b/src/test/run-fail/unreachable-macro-panic.rs @@ -9,4 +9,6 @@ // except according to those terms. // error-pattern:internal error: entered unreachable code -fn main() { unreachable!() } +fn main() { + unreachable!() +} diff --git a/src/test/run-fail/unreachable-static-msg.rs b/src/test/run-fail/unreachable-static-msg.rs index 25894a885413f..0a9dee3d0b99c 100644 --- a/src/test/run-fail/unreachable-static-msg.rs +++ b/src/test/run-fail/unreachable-static-msg.rs @@ -9,4 +9,6 @@ // except according to those terms. // error-pattern:internal error: entered unreachable code: uhoh -fn main() { unreachable!("uhoh") } +fn main() { + unreachable!("uhoh") +} diff --git a/src/test/run-fail/unreachable.rs b/src/test/run-fail/unreachable.rs index 07e05c6fed954..493fe7ee4f8e7 100644 --- a/src/test/run-fail/unreachable.rs +++ b/src/test/run-fail/unreachable.rs @@ -9,4 +9,6 @@ // except according to those terms. // error-pattern:internal error: entered unreachable code -fn main() { unreachable!() } +fn main() { + unreachable!() +} diff --git a/src/test/run-fail/unwind-interleaved.rs b/src/test/run-fail/unwind-interleaved.rs index 91a33329a4f84..0a7be154d5d15 100644 --- a/src/test/run-fail/unwind-interleaved.rs +++ b/src/test/run-fail/unwind-interleaved.rs @@ -10,13 +10,15 @@ // error-pattern:fail -fn a() { } +fn a() {} -fn b() { panic!(); } +fn b() { + panic!(); +} fn main() { - let _x = vec!(0); + let _x = vec![0]; a(); - let _y = vec!(0); + let _y = vec![0]; b(); } diff --git a/src/test/run-fail/unwind-rec.rs b/src/test/run-fail/unwind-rec.rs index 6df279b047f64..5177b4091d73d 100644 --- a/src/test/run-fail/unwind-rec.rs +++ b/src/test/run-fail/unwind-rec.rs @@ -15,10 +15,10 @@ fn build() -> Vec { panic!(); } -struct Blk { node: Vec } +struct Blk { + node: Vec, +} fn main() { - let _blk = Blk { - node: build() - }; + let _blk = Blk { node: build() }; } diff --git a/src/test/run-fail/unwind-rec2.rs b/src/test/run-fail/unwind-rec2.rs index d5d60d18924d5..3be5036b216e0 100644 --- a/src/test/run-fail/unwind-rec2.rs +++ b/src/test/run-fail/unwind-rec2.rs @@ -12,18 +12,21 @@ fn build1() -> Vec { - vec!(0,0,0,0,0,0,0) + vec![0, 0, 0, 0, 0, 0, 0] } fn build2() -> Vec { panic!(); } -struct Blk { node: Vec , span: Vec } +struct Blk { + node: Vec, + span: Vec, +} fn main() { let _blk = Blk { node: build1(), - span: build2() + span: build2(), }; } diff --git a/src/test/run-fail/vec-overrun.rs b/src/test/run-fail/vec-overrun.rs index da52cd56a1a08..457ae75a451e9 100644 --- a/src/test/run-fail/vec-overrun.rs +++ b/src/test/run-fail/vec-overrun.rs @@ -12,7 +12,7 @@ fn main() { - let v: Vec = vec!(10); + let v: Vec = vec![10]; let x: usize = 0; assert_eq!(v[x], 10); // Bounds-check panic. diff --git a/src/test/run-fail/while-body-panics.rs b/src/test/run-fail/while-body-panics.rs index cfe499f8a4aeb..29482612c24c7 100644 --- a/src/test/run-fail/while-body-panics.rs +++ b/src/test/run-fail/while-body-panics.rs @@ -11,4 +11,11 @@ #![allow(while_true)] // error-pattern:quux -fn main() { let _x: isize = { while true { panic!("quux"); } ; 8 } ; } +fn main() { + let _x: isize = { + while true { + panic!("quux"); + } + 8 + }; +} diff --git a/src/test/run-fail/while-panic.rs b/src/test/run-fail/while-panic.rs index f6081e497bffe..e410684cd349a 100644 --- a/src/test/run-fail/while-panic.rs +++ b/src/test/run-fail/while-panic.rs @@ -12,5 +12,10 @@ // error-pattern:giraffe fn main() { - panic!({ while true { panic!("giraffe") }; "clandestine" }); + panic!({ + while true { + panic!("giraffe") + } + "clandestine" + }); }