Add #[allow(unused)] to test in cargo dev new_lint
This commit is contained in:
@@ -90,6 +90,7 @@ We start by opening the test file created at `tests/ui/foo_functions.rs`.
|
|||||||
Update the file with some examples to get started:
|
Update the file with some examples to get started:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
#![allow(unused)]
|
||||||
#![warn(clippy::foo_functions)]
|
#![warn(clippy::foo_functions)]
|
||||||
|
|
||||||
// Impl methods
|
// Impl methods
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ pub(crate) fn get_stabilization_version() -> String {
|
|||||||
fn get_test_file_contents(lint_name: &str, header_commands: Option<&str>) -> String {
|
fn get_test_file_contents(lint_name: &str, header_commands: Option<&str>) -> String {
|
||||||
let mut contents = format!(
|
let mut contents = format!(
|
||||||
indoc! {"
|
indoc! {"
|
||||||
|
#![allow(unused)]
|
||||||
#![warn(clippy::{})]
|
#![warn(clippy::{})]
|
||||||
|
|
||||||
fn main() {{
|
fn main() {{
|
||||||
|
|||||||
Reference in New Issue
Block a user