| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:5:1 |
| | |
| LL | #[test] |
| | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| LL | |
| LL | / mod test { |
| LL | | mod inner { #![test] } |
| ... | |
| LL | | impl S { } |
| 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 - #[test] |
| LL + #[cfg(test)] |
| | |
| |
| error[E0658]: inner macro attributes are unstable |
| --> $DIR/gating-of-test-attrs.rs:8:20 |
| | |
| LL | mod inner { #![test] } |
| | ^^^^ |
| | |
| = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information |
| = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable |
| = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:8:17 |
| | |
| LL | mod inner { #![test] } |
| | ------------^^^^^^^^-- |
| | | | |
| | | the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| | 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 - mod inner { #![test] } |
| LL + mod inner { #[cfg(test)] } |
| | |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:12:5 |
| | |
| LL | #[test] |
| | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| LL | |
| LL | struct S; |
| | --------- 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 - #[test] |
| LL + #[cfg(test)] |
| | |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:16:5 |
| | |
| LL | #[test] |
| | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| LL | |
| LL | type T = S; |
| | ----------- expected a non-associated function, found a type alias |
| | |
| help: replace with conditional compilation to make the item only exist when tests are being run |
| | |
| LL - #[test] |
| LL + #[cfg(test)] |
| | |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:20:5 |
| | |
| LL | #[test] |
| | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| LL | |
| LL | impl S { } |
| | ---------- 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 - #[test] |
| LL + #[cfg(test)] |
| | |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:28:1 |
| | |
| LL | #[bench] |
| | ^^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| LL | |
| LL | / mod bench { |
| LL | | mod inner { #![bench] } |
| ... | |
| LL | | impl S { } |
| 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 - #[bench] |
| LL + #[cfg(test)] |
| | |
| |
| error[E0658]: inner macro attributes are unstable |
| --> $DIR/gating-of-test-attrs.rs:31:20 |
| | |
| LL | mod inner { #![bench] } |
| | ^^^^^ |
| | |
| = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information |
| = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable |
| = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:31:17 |
| | |
| LL | mod inner { #![bench] } |
| | ------------^^^^^^^^^-- |
| | | | |
| | | the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| | 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 - mod inner { #![bench] } |
| LL + mod inner { #[cfg(test)] } |
| | |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:35:5 |
| | |
| LL | #[bench] |
| | ^^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| LL | |
| LL | struct S; |
| | --------- 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 - #[bench] |
| LL + #[cfg(test)] |
| | |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:39:5 |
| | |
| LL | #[bench] |
| | ^^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| LL | |
| LL | type T = S; |
| | ----------- expected a non-associated function, found a type alias |
| | |
| help: replace with conditional compilation to make the item only exist when tests are being run |
| | |
| LL - #[bench] |
| LL + #[cfg(test)] |
| | |
| |
| error: the `#[test]` attribute may only be used on a non-associated function |
| --> $DIR/gating-of-test-attrs.rs:43:5 |
| | |
| LL | #[bench] |
| | ^^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions |
| LL | |
| LL | impl S { } |
| | ---------- 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 - #[bench] |
| LL + #[cfg(test)] |
| | |
| |
| error: aborting due to 12 previous errors |
| |
| For more information about this error, try `rustc --explain E0658`. |