@@ -87,24 +87,18 @@ LL - #[test]
8787LL + #[cfg(test)]
8888 |
8989
90- error: the `#[test ]` attribute may only be used on a non-associated function
90+ error: the `#[bench ]` attribute may only be used on a non-associated function
9191 --> $DIR/gating-of-test-attrs.rs:28:1
9292 |
9393LL | #[bench]
94- | ^^^^^^^^ the `#[test ]` macro causes a function to be run as a test and has no effect on non-functions
94+ | ^^^^^^^^ the `#[bench ]` macro causes a function to be run as a test and has no effect on non-functions
9595LL |
9696LL | / mod bench {
9797LL | | mod inner { #![bench] }
9898... |
9999LL | | impl S { }
100100LL | | }
101101 | |_- expected a non-associated function, found a module
102- |
103- help: replace with conditional compilation to make the item only exist when tests are being run
104- |
105- LL - #[bench]
106- LL + #[cfg(test)]
107- |
108102
109103error[E0658]: inner macro attributes are unstable
110104 --> $DIR/gating-of-test-attrs.rs:31:20
@@ -116,65 +110,41 @@ LL | mod inner { #![bench] }
116110 = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
117111 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
118112
119- error: the `#[test ]` attribute may only be used on a non-associated function
113+ error: the `#[bench ]` attribute may only be used on a non-associated function
120114 --> $DIR/gating-of-test-attrs.rs:31:17
121115 |
122116LL | mod inner { #![bench] }
123117 | ------------^^^^^^^^^--
124118 | | |
125- | | the `#[test ]` macro causes a function to be run as a test and has no effect on non-functions
119+ | | the `#[bench ]` macro causes a function to be run as a test and has no effect on non-functions
126120 | expected a non-associated function, found a module
127- |
128- help: replace with conditional compilation to make the item only exist when tests are being run
129- |
130- LL - mod inner { #![bench] }
131- LL + mod inner { #[cfg(test)] }
132- |
133121
134- error: the `#[test ]` attribute may only be used on a non-associated function
122+ error: the `#[bench ]` attribute may only be used on a non-associated function
135123 --> $DIR/gating-of-test-attrs.rs:35:5
136124 |
137125LL | #[bench]
138- | ^^^^^^^^ the `#[test ]` macro causes a function to be run as a test and has no effect on non-functions
126+ | ^^^^^^^^ the `#[bench ]` macro causes a function to be run as a test and has no effect on non-functions
139127LL |
140128LL | struct S;
141129 | --------- expected a non-associated function, found a struct
142- |
143- help: replace with conditional compilation to make the item only exist when tests are being run
144- |
145- LL - #[bench]
146- LL + #[cfg(test)]
147- |
148130
149- error: the `#[test ]` attribute may only be used on a non-associated function
131+ error: the `#[bench ]` attribute may only be used on a non-associated function
150132 --> $DIR/gating-of-test-attrs.rs:39:5
151133 |
152134LL | #[bench]
153- | ^^^^^^^^ the `#[test ]` macro causes a function to be run as a test and has no effect on non-functions
135+ | ^^^^^^^^ the `#[bench ]` macro causes a function to be run as a test and has no effect on non-functions
154136LL |
155137LL | type T = S;
156138 | ----------- expected a non-associated function, found a type alias
157- |
158- help: replace with conditional compilation to make the item only exist when tests are being run
159- |
160- LL - #[bench]
161- LL + #[cfg(test)]
162- |
163139
164- error: the `#[test ]` attribute may only be used on a non-associated function
140+ error: the `#[bench ]` attribute may only be used on a non-associated function
165141 --> $DIR/gating-of-test-attrs.rs:43:5
166142 |
167143LL | #[bench]
168- | ^^^^^^^^ the `#[test ]` macro causes a function to be run as a test and has no effect on non-functions
144+ | ^^^^^^^^ the `#[bench ]` macro causes a function to be run as a test and has no effect on non-functions
169145LL |
170146LL | impl S { }
171147 | ---------- expected a non-associated function, found an implementation
172- |
173- help: replace with conditional compilation to make the item only exist when tests are being run
174- |
175- LL - #[bench]
176- LL + #[cfg(test)]
177- |
178148
179149error: aborting due to 12 previous errors
180150
0 commit comments