-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e676aa
commit 58abfd1
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
#![cfg_attr(marker, feature(register_tool))] | ||
#![cfg_attr(marker, register_tool(marker))] | ||
|
||
mod cfg_attr_scope { | ||
mod allow_with_simple_attr { | ||
#[cfg_attr(marker, allow(marker::item_with_test_name))] | ||
fn find_me_fn() {} | ||
} | ||
|
||
mod allow_with_crate_check_attr { | ||
#[cfg_attr(marker = "marker_uilints", allow(marker::item_with_test_name))] | ||
fn find_me_fn() {} | ||
} | ||
|
||
mod lint_with_unloaded_crate_attr { | ||
#[cfg_attr(marker = "some_unknown_crate_that_isnt_loaded", allow(marker::item_with_test_name))] | ||
fn find_me_fn() {} | ||
} | ||
|
||
mod unknown_lint_allow { | ||
#[cfg_attr(marker, allow(marker::some_unknown_lint_that_doesnt_exist))] | ||
fn foo() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
warning: unknown lint: `marker::some_unknown_lint_that_doesnt_exist` | ||
--> $DIR/cfg_attr_check.rs:20:30 | ||
| | ||
20 | #[cfg_attr(marker, allow(marker::some_unknown_lint_that_doesnt_exist))] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `#[warn(unknown_lints)]` on by default | ||
|
||
warning: found a `fn` item with a test name | ||
--> $DIR/cfg_attr_check.rs:16:5 | ||
| | ||
16 | fn find_me_fn() {} | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `#[warn(marker::item_with_test_name)]` on by default | ||
|
||
warning: 2 warnings emitted | ||
|