summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/reasons-erroneous.rs
blob: cd693ae166cdee02195aebeda050b4de32d66bf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#![feature(lint_reasons)]

#![warn(absolute_paths_not_starting_with_crate, reason = 0)]
//~^ ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| NOTE reason must be a string literal
//~| NOTE reason must be a string literal
#![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
//~^ ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| NOTE reason must be a string literal
//~| NOTE reason must be a string literal
#![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
//~^ ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
#![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
//~^ ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
#![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
//~^ ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
//~| NOTE bad attribute argument
#![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
//~^ ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| NOTE reason in lint attribute must come last
//~| NOTE reason in lint attribute must come last
#![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
//~^ ERROR malformed lint attribute
//~| ERROR malformed lint attribute
//~| NOTE reason in lint attribute must come last
//~| NOTE reason in lint attribute must come last
#![warn(missing_copy_implementations, reason)]
//~^ WARN unknown lint
//~| NOTE `#[warn(unknown_lints)]` on by default

fn main() {}