diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-07-12 03:56:19 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-07-13 04:50:35 +0000 |
| commit | 57fac56cb51d1a8ca0f6d76f869ccbb0a67b0f45 (patch) | |
| tree | 7e8a057437d2774e71c4a58cb3c923423d8ff0e2 /src/test | |
| parent | c1b850d3041e5c36dc133c22b59319b179f5ddc6 (diff) | |
| download | rust-57fac56cb51d1a8ca0f6d76f869ccbb0a67b0f45.tar.gz rust-57fac56cb51d1a8ca0f6d76f869ccbb0a67b0f45.zip | |
Start a best-effort warning cycle.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/missing-semicolon-warning.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/compile-fail/missing-semicolon-warning.rs b/src/test/compile-fail/missing-semicolon-warning.rs new file mode 100644 index 00000000000..bbc958b87a5 --- /dev/null +++ b/src/test/compile-fail/missing-semicolon-warning.rs @@ -0,0 +1,22 @@ +// Copyright 2016 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. + +#![feature(rustc_attrs)] +#![allow(unused)] + +macro_rules! m { + ($($e1:expr),*; $($e2:expr),*) => { + $( let x = $e1 )*; //~ WARN expected `;` + $( println!("{}", $e2) )*; //~ WARN expected `;` + } +} + +#[rustc_error] +fn main() { m!(0, 0; 0, 0); } //~ ERROR compilation successful |
