summaryrefslogtreecommitdiffstats
path: root/tests/ui/test-attrs/test-on-not-fn.stderr
blob: 7a9913fbcfa11ad46bcb8b923d6809a7b6191999 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:3:1
   |
LL | #[test]
   | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | mod test {}
   | ----------- expected a non-associated function, found a module
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:6:1
   |
LL |   #[test]
   |   ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | / mod loooooooooooooong_teeeeeeeeeest {
LL | |     /*
LL | |     this is a comment
LL | |     this comment goes on for a very long time
...  |
LL | |     */
LL | | }
   | |_- expected a non-associated function, found a module
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:20:1
   |
LL | #[test]
   | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | extern "C" {}
   | ------------- expected a non-associated function, found an extern block
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:23:1
   |
LL | #[test]
   | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | trait Foo {}
   | ------------ expected a non-associated function, found a trait
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:26:1
   |
LL | #[test]
   | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | impl Foo for i32 {}
   | ------------------- expected a non-associated function, found an implementation
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:29:1
   |
LL | #[test]
   | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | const FOO: i32 = -1_i32;
   | ------------------------ expected a non-associated function, found a constant item
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:32:1
   |
LL | #[test]
   | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | static BAR: u64 = 10_000_u64;
   | ----------------------------- expected a non-associated function, found a static item
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:35:1
   |
LL |   #[test]
   |   ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | / enum MyUnit {
LL | |     Unit,
LL | | }
   | |_- expected a non-associated function, found an enum
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:40:1
   |
LL | #[test]
   | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | struct NewI32(i32);
   | ------------------- expected a non-associated function, found a struct
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:43:1
   |
LL |   #[test]
   |   ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | / union Spooky {
LL | |     x: i32,
LL | |     y: u32,
LL | | }
   | |_- expected a non-associated function, found a union
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:50:1
   |
LL |   #[test]
   |   ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL |   #[derive(Copy, Clone, Debug)]
LL | / struct MoreAttrs {
LL | |     a: i32,
LL | |     b: u64,
LL | | }
   | |_- expected a non-associated function, found a struct
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

warning: the `#[test]` attribute may only be used on a non-associated function
  --> $DIR/test-on-not-fn.rs:61:1
   |
LL | #[test]
   | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions
LL | foo!();
   | ------- expected a non-associated function, found an item macro invocation
   |
help: replace with conditional compilation to make the item only exist when tests are being run
   |
LL | #[cfg(test)]
   | ~~~~~~~~~~~~

error: aborting due to 11 previous errors; 1 warning emitted