Remove unnecessary clap_derive dependency added in 9ee211af
The fixed issue in this commit can be tested without depending on clap/clap_derive. This updates the test case to do so.
This commit is contained in:
parent
f067783461
commit
7713f28f54
|
@ -40,7 +40,6 @@ filetime = "0.2"
|
|||
rustc-workspace-hack = "1.0"
|
||||
|
||||
# UI test dependencies
|
||||
clap = { version = "3.1", features = ["derive"] }
|
||||
clippy_utils = { path = "clippy_utils" }
|
||||
derive-new = "0.5"
|
||||
if_chain = "1.0"
|
||||
|
|
|
@ -23,7 +23,6 @@ const RUN_INTERNAL_TESTS: bool = cfg!(feature = "internal");
|
|||
|
||||
/// All crates used in UI tests are listed here
|
||||
static TEST_DEPENDENCIES: &[&str] = &[
|
||||
"clap",
|
||||
"clippy_utils",
|
||||
"derive_new",
|
||||
"futures",
|
||||
|
@ -42,8 +41,6 @@ static TEST_DEPENDENCIES: &[&str] = &[
|
|||
// Test dependencies may need an `extern crate` here to ensure that they show up
|
||||
// in the depinfo file (otherwise cargo thinks they are unused)
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate clap;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate clippy_utils;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate derive_new;
|
||||
|
|
|
@ -19,6 +19,11 @@ use syn::{
|
|||
parse_quote, FnArg, ImplItem, ItemImpl, ItemTrait, Lifetime, Pat, PatIdent, PatType, Signature, TraitItem, Type,
|
||||
};
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn dummy(_args: TokenStream, input: TokenStream) -> TokenStream {
|
||||
input
|
||||
}
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn fake_async_trait(_args: TokenStream, input: TokenStream) -> TokenStream {
|
||||
let mut item = parse_macro_input!(input as ItemTrait);
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
#![feature(custom_inner_attributes)]
|
||||
#![rustfmt::skip]
|
||||
|
||||
#[macro_use]
|
||||
extern crate clap;
|
||||
|
||||
#[macro_use]
|
||||
extern crate proc_macro_attr;
|
||||
|
||||
|
@ -113,10 +110,10 @@ pub trait Bazz {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(clap::Parser)]
|
||||
#[clap(after_help = "This ia a help message.
|
||||
#[derive(Clone, Copy)]
|
||||
#[dummy(string = "first line
|
||||
|
||||
You're welcome.
|
||||
second line
|
||||
")]
|
||||
pub struct Args;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: found an empty line after an outer attribute. Perhaps you forgot to add a `!` to make it an inner attribute?
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:14:1
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:11:1
|
||||
|
|
||||
LL | / #[crate_type = "lib"]
|
||||
LL | |
|
||||
|
@ -10,7 +10,7 @@ LL | | fn with_one_newline_and_comment() { assert!(true) }
|
|||
= note: `-D clippy::empty-line-after-outer-attr` implied by `-D warnings`
|
||||
|
||||
error: found an empty line after an outer attribute. Perhaps you forgot to add a `!` to make it an inner attribute?
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:26:1
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:23:1
|
||||
|
|
||||
LL | / #[crate_type = "lib"]
|
||||
LL | |
|
||||
|
@ -18,7 +18,7 @@ LL | | fn with_one_newline() { assert!(true) }
|
|||
| |_
|
||||
|
||||
error: found an empty line after an outer attribute. Perhaps you forgot to add a `!` to make it an inner attribute?
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:31:1
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:28:1
|
||||
|
|
||||
LL | / #[crate_type = "lib"]
|
||||
LL | |
|
||||
|
@ -27,7 +27,7 @@ LL | | fn with_two_newlines() { assert!(true) }
|
|||
| |_
|
||||
|
||||
error: found an empty line after an outer attribute. Perhaps you forgot to add a `!` to make it an inner attribute?
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:38:1
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:35:1
|
||||
|
|
||||
LL | / #[crate_type = "lib"]
|
||||
LL | |
|
||||
|
@ -35,7 +35,7 @@ LL | | enum Baz {
|
|||
| |_
|
||||
|
||||
error: found an empty line after an outer attribute. Perhaps you forgot to add a `!` to make it an inner attribute?
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:46:1
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:43:1
|
||||
|
|
||||
LL | / #[crate_type = "lib"]
|
||||
LL | |
|
||||
|
@ -43,7 +43,7 @@ LL | | struct Foo {
|
|||
| |_
|
||||
|
||||
error: found an empty line after an outer attribute. Perhaps you forgot to add a `!` to make it an inner attribute?
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:54:1
|
||||
--> $DIR/empty_line_after_outer_attribute.rs:51:1
|
||||
|
|
||||
LL | / #[crate_type = "lib"]
|
||||
LL | |
|
||||
|
|
Loading…
Reference in New Issue