2019-02-10 08:44:49 +00:00
|
|
|
#![warn(clippy::all)]
|
2018-07-28 15:34:52 +00:00
|
|
|
#![allow(unused, clippy::println_empty_string)]
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
enum MaybeInst {
|
|
|
|
Split,
|
|
|
|
Split1(usize),
|
|
|
|
Split2(usize),
|
|
|
|
}
|
|
|
|
|
|
|
|
struct InstSplit {
|
|
|
|
uiae: usize,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl MaybeInst {
|
|
|
|
fn fill(&mut self) {
|
|
|
|
let filled = match *self {
|
|
|
|
MaybeInst::Split1(goto1) => panic!(1),
|
|
|
|
MaybeInst::Split2(goto2) => panic!(2),
|
|
|
|
_ => unimplemented!(),
|
|
|
|
};
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bla() {
|
|
|
|
let a: i32;
|
|
|
|
let (b, c, d): (i32, i64, i16);
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let cdefg: i32;
|
|
|
|
let blar: i32;
|
|
|
|
}
|
|
|
|
{
|
2017-02-08 13:58:07 +00:00
|
|
|
let e: i32;
|
2017-02-07 20:05:30 +00:00
|
|
|
}
|
|
|
|
{
|
2017-02-08 13:58:07 +00:00
|
|
|
let e: i32;
|
|
|
|
let f: i32;
|
2017-02-07 20:05:30 +00:00
|
|
|
}
|
|
|
|
match 5 {
|
|
|
|
1 => println!(""),
|
2017-02-08 13:58:07 +00:00
|
|
|
e => panic!(),
|
2017-02-07 20:05:30 +00:00
|
|
|
}
|
|
|
|
match 5 {
|
|
|
|
1 => println!(""),
|
|
|
|
_ => panic!(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-11-03 01:01:41 +00:00
|
|
|
|
|
|
|
fn underscores_and_numbers() {
|
|
|
|
let _1 = 1; //~ERROR Consider a more descriptive name
|
|
|
|
let ____1 = 1; //~ERROR Consider a more descriptive name
|
|
|
|
let __1___2 = 12; //~ERROR Consider a more descriptive name
|
2018-12-09 22:26:16 +00:00
|
|
|
let _1_ok = 1;
|
2017-11-03 20:54:33 +00:00
|
|
|
}
|
2018-02-02 06:49:47 +00:00
|
|
|
|
2018-08-15 06:11:07 +00:00
|
|
|
fn issue2927() {
|
2018-12-09 22:26:16 +00:00
|
|
|
let args = 1;
|
|
|
|
format!("{:?}", 2);
|
2018-08-15 06:11:07 +00:00
|
|
|
}
|
|
|
|
|
2018-08-25 12:49:56 +00:00
|
|
|
fn issue3078() {
|
|
|
|
match "a" {
|
|
|
|
stringify!(a) => {},
|
2018-12-09 22:26:16 +00:00
|
|
|
_ => {},
|
2018-08-25 12:49:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-02 06:49:47 +00:00
|
|
|
struct Bar;
|
|
|
|
|
|
|
|
impl Bar {
|
|
|
|
fn bar() {
|
|
|
|
let _1 = 1;
|
|
|
|
let ____1 = 1;
|
|
|
|
let __1___2 = 12;
|
2018-12-09 22:26:16 +00:00
|
|
|
let _1_ok = 1;
|
2018-02-02 06:49:47 +00:00
|
|
|
}
|
|
|
|
}
|
2018-09-07 20:19:12 +00:00
|
|
|
|
2019-02-10 08:44:49 +00:00
|
|
|
fn main() {}
|