1 error: attribute should be applied to a trait method with body
2 --> $DIR/attr-misuse.rs:3:1
4 LL | #[default_method_body_is_const]
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 LL | | #[default_method_body_is_const]
8 LL | | fn no_body(self);
10 LL | | #[default_method_body_is_const]
11 LL | | fn correct_use(&self) {}
13 | |_- not a trait method or missing a body
15 error: attribute should be applied to a trait method with body
16 --> $DIR/attr-misuse.rs:12:1
18 LL | #[default_method_body_is_const]
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 | ------------ not a trait method or missing a body
23 error: attribute should be applied to a trait method with body
24 --> $DIR/attr-misuse.rs:5:5
26 LL | #[default_method_body_is_const]
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 LL | fn no_body(self);
29 | ----------------- not a trait method or missing a body
31 error: aborting due to 3 previous errors