about summary refs log tree commit diff
path: root/tests/ui/diagnostic_namespace/multiline_spans.rs
blob: e0876b19df07f0017dfaa5957d16d80c77de74f3 (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
55
#![crate_type = "lib"]
#![deny(unknown_or_malformed_diagnostic_attributes)]


#[diagnostic::on_unimplemented(message = "here is a big \
                                         multiline string \
                                         {unknown}")]
//~^ ERROR there is no parameter `unknown` on trait `MultiLine` [malformed_diagnostic_format_literals]
pub trait MultiLine {}

#[diagnostic::on_unimplemented(message = "here is a big \
                                         multiline string {unknown}")]
//~^ ERROR there is no parameter `unknown` on trait `MultiLine2` [malformed_diagnostic_format_literals]
pub trait MultiLine2 {}

#[diagnostic::on_unimplemented(message = "here is a big \
    multiline string {unknown}")]
//~^ ERROR there is no parameter `unknown` on trait `MultiLine3` [malformed_diagnostic_format_literals]
pub trait MultiLine3 {}


#[diagnostic::on_unimplemented(message = "here is a big \
\
                \
                                \
                                                \
    multiline string {unknown}")]
//~^ ERROR there is no parameter `unknown` on trait `MultiLine4` [malformed_diagnostic_format_literals]
pub trait MultiLine4 {}

#[diagnostic::on_unimplemented(message = "here is a big \
                                         multiline string \
                                         {Self:+}")]
//~^ ERROR invalid format specifier [malformed_diagnostic_format_literals]
pub trait MultiLineFmt {}

#[diagnostic::on_unimplemented(message = "here is a big \
                                         multiline string {Self:X}")]
//~^ ERROR invalid format specifier [malformed_diagnostic_format_literals]
pub trait MultiLineFmt2 {}

#[diagnostic::on_unimplemented(message = "here is a big \
    multiline string {Self:#}")]
//~^ ERROR invalid format specifier [malformed_diagnostic_format_literals]
pub trait MultiLineFmt3 {}


#[diagnostic::on_unimplemented(message = "here is a big \
\
                \
                                \
                                                \
    multiline string {Self:?}")]
//~^ ERROR invalid format specifier [malformed_diagnostic_format_literals]
pub trait MultiLineFmt4 {}