1 error: the `#[test]` attribute may only be used on a non-associated function
2 --> $DIR/test-on-not-fn.rs:3:1
7 | ----------- expected a non-associated function, found a module
9 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
10 help: replace with conditional compilation to make the item only exist when tests are being run
15 error: the `#[test]` attribute may only be used on a non-associated function
16 --> $DIR/test-on-not-fn.rs:6:1
20 LL | / mod loooooooooooooong_teeeeeeeeeest {
22 LL | | this is a comment
23 LL | | this comment goes on for a very long time
27 | |_- expected a non-associated function, found a module
29 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
30 help: replace with conditional compilation to make the item only exist when tests are being run
35 error: the `#[test]` attribute may only be used on a non-associated function
36 --> $DIR/test-on-not-fn.rs:20:1
41 | ------------- expected a non-associated function, found an extern block
43 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
44 help: replace with conditional compilation to make the item only exist when tests are being run
49 error: the `#[test]` attribute may only be used on a non-associated function
50 --> $DIR/test-on-not-fn.rs:23:1
55 | ------------ expected a non-associated function, found a trait
57 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
58 help: replace with conditional compilation to make the item only exist when tests are being run
63 error: the `#[test]` attribute may only be used on a non-associated function
64 --> $DIR/test-on-not-fn.rs:26:1
68 LL | impl Foo for i32 {}
69 | ------------------- expected a non-associated function, found an implementation
71 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
72 help: replace with conditional compilation to make the item only exist when tests are being run
77 error: the `#[test]` attribute may only be used on a non-associated function
78 --> $DIR/test-on-not-fn.rs:29:1
82 LL | const FOO: i32 = -1_i32;
83 | ------------------------ expected a non-associated function, found a constant item
85 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
86 help: replace with conditional compilation to make the item only exist when tests are being run
91 error: the `#[test]` attribute may only be used on a non-associated function
92 --> $DIR/test-on-not-fn.rs:32:1
96 LL | static BAR: u64 = 10_000_u64;
97 | ----------------------------- expected a non-associated function, found a static item
99 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
100 help: replace with conditional compilation to make the item only exist when tests are being run
105 error: the `#[test]` attribute may only be used on a non-associated function
106 --> $DIR/test-on-not-fn.rs:35:1
113 | |_- expected a non-associated function, found an enum
115 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
116 help: replace with conditional compilation to make the item only exist when tests are being run
121 error: the `#[test]` attribute may only be used on a non-associated function
122 --> $DIR/test-on-not-fn.rs:40:1
126 LL | struct NewI32(i32);
127 | ------------------- expected a non-associated function, found a struct
129 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
130 help: replace with conditional compilation to make the item only exist when tests are being run
135 error: the `#[test]` attribute may only be used on a non-associated function
136 --> $DIR/test-on-not-fn.rs:43:1
140 LL | / union Spooky {
144 | |_- expected a non-associated function, found a union
146 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
147 help: replace with conditional compilation to make the item only exist when tests are being run
152 error: the `#[test]` attribute may only be used on a non-associated function
153 --> $DIR/test-on-not-fn.rs:50:1
157 LL | #[derive(Copy, Clone, Debug)]
158 LL | / struct MoreAttrs {
162 | |_- expected a non-associated function, found a struct
164 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
165 help: replace with conditional compilation to make the item only exist when tests are being run
170 error: the `#[test]` attribute may only be used on a non-associated function
171 --> $DIR/test-on-not-fn.rs:61:1
176 | ------- expected a non-associated function, found an item macro invocation
178 = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
179 help: replace with conditional compilation to make the item only exist when tests are being run
184 error: aborting due to 12 previous errors