Block #[cfg] attributes on inner constants

This commit is contained in:
J Henry Waugh
2020-08-21 23:21:56 -05:00
parent 55870e7b37
commit 65009dd193
3 changed files with 63 additions and 13 deletions

View File

@@ -0,0 +1,11 @@
error: cfg attributes not allowed on this item
--> $DIR/module_cfg_const.rs:13:5
|
13 | #[cfg(feature = "foo")]
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `test_module`
--> $DIR/module_cfg_const.rs:26:8
|
26 | if test_module::test_fn(n) {
| ^^^^^^^^^^^ use of undeclared type or module `test_module`