]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/attr-misuse.stderr
Auto merge of #84589 - In-line:zircon-thread-name, r=JohnTitor
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / attr-misuse.stderr
1 error: attribute should be applied to a trait method with body
2   --> $DIR/attr-misuse.rs:3:1
3    |
4 LL |   #[default_method_body_is_const]
5    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 LL | / trait A {
7 LL | |     #[default_method_body_is_const]
8 LL | |     fn no_body(self);
9 LL | |
10 LL | |     #[default_method_body_is_const]
11 LL | |     fn correct_use(&self) {}
12 LL | | }
13    | |_- not a trait method or missing a body
14
15 error: attribute should be applied to a trait method with body
16   --> $DIR/attr-misuse.rs:12:1
17    |
18 LL | #[default_method_body_is_const]
19    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 LL | fn main() {}
21    | ------------ not a trait method or missing a body
22
23 error: attribute should be applied to a trait method with body
24   --> $DIR/attr-misuse.rs:5:5
25    |
26 LL |     #[default_method_body_is_const]
27    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 LL |     fn no_body(self);
29    |     ----------------- not a trait method or missing a body
30
31 error: aborting due to 3 previous errors
32