summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/dead-code/newline-span.rs
blob: 209c3cd937f9e8b5de4414fab448bef0a1b9f0ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![deny(dead_code)]

fn unused() { //~ error: function `unused` is never used
    println!("blah");
}

fn unused2(var: i32) { //~ error: function `unused2` is never used
    println!("foo {}", var);
}

fn unused3( //~ error: function `unused3` is never used
    var: i32,
) {
    println!("bar {}", var);
}

fn main() {
    println!("Hello world!");
}