mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 07:04:18 +00:00
Update ui test crate to auto-detect aux build crate kind
This commit is contained in:
parent
3d88fae050
commit
00919a4f92
144 changed files with 232 additions and 331 deletions
|
@ -27,7 +27,7 @@ tempfile = { version = "3.2", optional = true }
|
|||
termize = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
ui_test = "0.12"
|
||||
ui_test = "0.13"
|
||||
tester = "0.9"
|
||||
regex = "1.5"
|
||||
toml = "0.7.3"
|
||||
|
|
|
@ -113,7 +113,7 @@ const RUN_INTERNAL_TESTS: bool = cfg!(feature = "internal");
|
|||
fn base_config(test_dir: &str) -> (compiletest::Config, Args) {
|
||||
let args = Args::test();
|
||||
let mut config = compiletest::Config {
|
||||
mode: TestMode::Yolo,
|
||||
mode: TestMode::Yolo { rustfix: true },
|
||||
stderr_filters: vec![],
|
||||
stdout_filters: vec![],
|
||||
output_conflict_handling: if var_os("GITHUB_ACTION").is_none()
|
||||
|
@ -124,7 +124,10 @@ fn base_config(test_dir: &str) -> (compiletest::Config, Args) {
|
|||
OutputConflictHandling::Error("cargo uibless".into())
|
||||
},
|
||||
target: None,
|
||||
out_dir: PathBuf::from(std::env::var_os("CARGO_TARGET_DIR").unwrap_or("target".into())).join("ui_test"),
|
||||
out_dir: PathBuf::from(std::env::var_os("CARGO_TARGET_DIR").unwrap_or("target".into()))
|
||||
.join("ui_test")
|
||||
.canonicalize()
|
||||
.unwrap(),
|
||||
..compiletest::Config::rustc(Path::new("tests").join(test_dir))
|
||||
};
|
||||
let current_exe_path = env::current_exe().unwrap();
|
||||
|
@ -188,12 +191,18 @@ fn run_ui() {
|
|||
|
||||
let test_filter = test_filter();
|
||||
|
||||
let quiet = args.quiet;
|
||||
|
||||
compiletest::run_tests_generic(
|
||||
config,
|
||||
args,
|
||||
move |path, args| compiletest::default_file_filter(path, args) && test_filter(path),
|
||||
compiletest::default_per_file_config,
|
||||
status_emitter::Text::verbose(),
|
||||
if quiet {
|
||||
status_emitter::Text::quiet()
|
||||
} else {
|
||||
status_emitter::Text::verbose()
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
@ -208,13 +217,18 @@ fn run_internal_tests() {
|
|||
*err = "cargo uitest --features internal".into();
|
||||
}
|
||||
let test_filter = test_filter();
|
||||
let quiet = args.quiet;
|
||||
|
||||
compiletest::run_tests_generic(
|
||||
config,
|
||||
args,
|
||||
move |path, args| compiletest::default_file_filter(path, args) && test_filter(path),
|
||||
compiletest::default_per_file_config,
|
||||
status_emitter::Text::verbose(),
|
||||
if quiet {
|
||||
status_emitter::Text::quiet()
|
||||
} else {
|
||||
status_emitter::Text::verbose()
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
@ -236,6 +250,7 @@ fn run_ui_toml() {
|
|||
);
|
||||
|
||||
let test_filter = test_filter();
|
||||
let quiet = args.quiet;
|
||||
|
||||
ui_test::run_tests_generic(
|
||||
config,
|
||||
|
@ -249,7 +264,11 @@ fn run_ui_toml() {
|
|||
.push(("CLIPPY_CONF_DIR".into(), Some(path.parent().unwrap().into())));
|
||||
Some(config)
|
||||
},
|
||||
status_emitter::Text::verbose(),
|
||||
if quiet {
|
||||
status_emitter::Text::quiet()
|
||||
} else {
|
||||
status_emitter::Text::verbose()
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
@ -291,6 +310,7 @@ fn run_ui_cargo() {
|
|||
);
|
||||
|
||||
let test_filter = test_filter();
|
||||
let quiet = args.quiet;
|
||||
|
||||
ui_test::run_tests_generic(
|
||||
config,
|
||||
|
@ -301,7 +321,11 @@ fn run_ui_cargo() {
|
|||
config.out_dir = PathBuf::from("target/ui_test_cargo/").join(path.parent().unwrap());
|
||||
Some(config)
|
||||
},
|
||||
status_emitter::Text::verbose(),
|
||||
if quiet {
|
||||
status_emitter::Text::quiet()
|
||||
} else {
|
||||
status_emitter::Text::verbose()
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#![deny(clippy::internal)]
|
||||
#![allow(clippy::missing_clippy_version_attribute)]
|
||||
#![feature(rustc_private)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: this call is collapsible
|
||||
--> $DIR/collapsible_span_lint_calls.rs:36:9
|
||||
--> $DIR/collapsible_span_lint_calls.rs:35:9
|
||||
|
|
||||
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
|
||||
LL | | db.span_suggestion(expr.span, help_msg, sugg.to_string(), Applicability::MachineApplicable);
|
||||
|
@ -7,14 +7,14 @@ LL | | });
|
|||
| |__________^ help: collapse into: `span_lint_and_sugg(cx, TEST_LINT, expr.span, lint_msg, help_msg, sugg.to_string(), Applicability::MachineApplicable)`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/collapsible_span_lint_calls.rs:2:9
|
||||
--> $DIR/collapsible_span_lint_calls.rs:1:9
|
||||
|
|
||||
LL | #![deny(clippy::internal)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
= note: `#[deny(clippy::collapsible_span_lint_calls)]` implied by `#[deny(clippy::internal)]`
|
||||
|
||||
error: this call is collapsible
|
||||
--> $DIR/collapsible_span_lint_calls.rs:39:9
|
||||
--> $DIR/collapsible_span_lint_calls.rs:38:9
|
||||
|
|
||||
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
|
||||
LL | | db.span_help(expr.span, help_msg);
|
||||
|
@ -22,7 +22,7 @@ LL | | });
|
|||
| |__________^ help: collapse into: `span_lint_and_help(cx, TEST_LINT, expr.span, lint_msg, Some(expr.span), help_msg)`
|
||||
|
||||
error: this call is collapsible
|
||||
--> $DIR/collapsible_span_lint_calls.rs:42:9
|
||||
--> $DIR/collapsible_span_lint_calls.rs:41:9
|
||||
|
|
||||
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
|
||||
LL | | db.help(help_msg);
|
||||
|
@ -30,7 +30,7 @@ LL | | });
|
|||
| |__________^ help: collapse into: `span_lint_and_help(cx, TEST_LINT, expr.span, lint_msg, None, help_msg)`
|
||||
|
||||
error: this call is collapsible
|
||||
--> $DIR/collapsible_span_lint_calls.rs:45:9
|
||||
--> $DIR/collapsible_span_lint_calls.rs:44:9
|
||||
|
|
||||
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
|
||||
LL | | db.span_note(expr.span, note_msg);
|
||||
|
@ -38,7 +38,7 @@ LL | | });
|
|||
| |__________^ help: collapse into: `span_lint_and_note(cx, TEST_LINT, expr.span, lint_msg, Some(expr.span), note_msg)`
|
||||
|
||||
error: this call is collapsible
|
||||
--> $DIR/collapsible_span_lint_calls.rs:48:9
|
||||
--> $DIR/collapsible_span_lint_calls.rs:47:9
|
||||
|
|
||||
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
|
||||
LL | | db.note(note_msg);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#![deny(clippy::internal)]
|
||||
#![allow(clippy::missing_clippy_version_attribute, clippy::let_unit_value)]
|
||||
#![feature(rustc_private)]
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
error: interning a defined symbol
|
||||
--> $DIR/interning_defined_symbol.rs:18:13
|
||||
--> $DIR/interning_defined_symbol.rs:17:13
|
||||
|
|
||||
LL | let _ = Symbol::intern("f32");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::f32`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/interning_defined_symbol.rs:2:9
|
||||
--> $DIR/interning_defined_symbol.rs:1:9
|
||||
|
|
||||
LL | #![deny(clippy::internal)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
= note: `#[deny(clippy::interning_defined_symbol)]` implied by `#[deny(clippy::internal)]`
|
||||
|
||||
error: interning a defined symbol
|
||||
--> $DIR/interning_defined_symbol.rs:21:13
|
||||
--> $DIR/interning_defined_symbol.rs:20:13
|
||||
|
|
||||
LL | let _ = sym!(f32);
|
||||
| ^^^^^^^^^ help: try: `rustc_span::sym::f32`
|
||||
|
||||
error: interning a defined symbol
|
||||
--> $DIR/interning_defined_symbol.rs:24:13
|
||||
--> $DIR/interning_defined_symbol.rs:23:13
|
||||
|
|
||||
LL | let _ = Symbol::intern("proc-macro");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::proc_dash_macro`
|
||||
|
||||
error: interning a defined symbol
|
||||
--> $DIR/interning_defined_symbol.rs:27:13
|
||||
--> $DIR/interning_defined_symbol.rs:26:13
|
||||
|
|
||||
LL | let _ = Symbol::intern("self");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::symbol::kw::SelfLower`
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
#![deny(clippy::internal)]
|
||||
#![allow(clippy::missing_clippy_version_attribute)]
|
||||
#![feature(rustc_private)]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
error: `extract_msrv_attr!` macro missing from `LateLintPass` implementation
|
||||
--> $DIR/invalid_msrv_attr_impl.rs:30:1
|
||||
--> $DIR/invalid_msrv_attr_impl.rs:28:1
|
||||
|
|
||||
LL | impl LateLintPass<'_> for Pass {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/invalid_msrv_attr_impl.rs:3:9
|
||||
--> $DIR/invalid_msrv_attr_impl.rs:1:9
|
||||
|
|
||||
LL | #![deny(clippy::internal)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
@ -17,7 +17,7 @@ LL + extract_msrv_attr!(LateContext);
|
|||
|
|
||||
|
||||
error: `extract_msrv_attr!` macro missing from `EarlyLintPass` implementation
|
||||
--> $DIR/invalid_msrv_attr_impl.rs:34:1
|
||||
--> $DIR/invalid_msrv_attr_impl.rs:32:1
|
||||
|
|
||||
LL | impl EarlyLintPass for Pass {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
#![deny(clippy::internal)]
|
||||
#![allow(clippy::missing_clippy_version_attribute)]
|
||||
#![feature(rustc_private)]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
error: usage of `outer_expn().expn_data()`
|
||||
--> $DIR/outer_expn_data.rs:25:34
|
||||
--> $DIR/outer_expn_data.rs:23:34
|
||||
|
|
||||
LL | let _ = expr.span.ctxt().outer_expn().expn_data();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `outer_expn_data()`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/outer_expn_data.rs:3:9
|
||||
--> $DIR/outer_expn_data.rs:1:9
|
||||
|
|
||||
LL | #![deny(clippy::internal)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
//@aux-build:paths.rs
|
||||
#![deny(clippy::internal)]
|
||||
#![feature(rustc_private)]
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:37:13
|
||||
--> $DIR/unnecessary_def_path.rs:36:13
|
||||
|
|
||||
LL | let _ = match_type(cx, ty, &OPTION);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Option)`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/unnecessary_def_path.rs:3:9
|
||||
--> $DIR/unnecessary_def_path.rs:2:9
|
||||
|
|
||||
LL | #![deny(clippy::internal)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
= note: `#[deny(clippy::unnecessary_def_path)]` implied by `#[deny(clippy::internal)]`
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:38:13
|
||||
--> $DIR/unnecessary_def_path.rs:37:13
|
||||
|
|
||||
LL | let _ = match_type(cx, ty, RESULT);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:39:13
|
||||
--> $DIR/unnecessary_def_path.rs:38:13
|
||||
|
|
||||
LL | let _ = match_type(cx, ty, &["core", "result", "Result"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:43:13
|
||||
--> $DIR/unnecessary_def_path.rs:42:13
|
||||
|
|
||||
LL | let _ = clippy_utils::ty::match_type(cx, ty, rc_path);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Rc)`
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:45:13
|
||||
--> $DIR/unnecessary_def_path.rs:44:13
|
||||
|
|
||||
LL | let _ = match_type(cx, ty, &paths::OPTION);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Option)`
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:46:13
|
||||
--> $DIR/unnecessary_def_path.rs:45:13
|
||||
|
|
||||
LL | let _ = match_type(cx, ty, paths::RESULT);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
|
||||
|
||||
error: use of a def path to a `LangItem`
|
||||
--> $DIR/unnecessary_def_path.rs:48:13
|
||||
--> $DIR/unnecessary_def_path.rs:47:13
|
||||
|
|
||||
LL | let _ = match_type(cx, ty, &["alloc", "boxed", "Box"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_lang_item(cx, ty, LangItem::OwnedBox)`
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:49:13
|
||||
--> $DIR/unnecessary_def_path.rs:48:13
|
||||
|
|
||||
LL | let _ = match_type(cx, ty, &["core", "mem", "maybe_uninit", "MaybeUninit", "uninit"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::maybe_uninit_uninit)`
|
||||
|
||||
error: use of a def path to a `LangItem`
|
||||
--> $DIR/unnecessary_def_path.rs:51:13
|
||||
--> $DIR/unnecessary_def_path.rs:50:13
|
||||
|
|
||||
LL | let _ = match_def_path(cx, did, &["alloc", "boxed", "Box"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.lang_items().get(LangItem::OwnedBox) == Some(did)`
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:52:13
|
||||
--> $DIR/unnecessary_def_path.rs:51:13
|
||||
|
|
||||
LL | let _ = match_def_path(cx, did, &["core", "option", "Option"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.is_diagnostic_item(sym::Option, did)`
|
||||
|
||||
error: use of a def path to a `LangItem`
|
||||
--> $DIR/unnecessary_def_path.rs:53:13
|
||||
--> $DIR/unnecessary_def_path.rs:52:13
|
||||
|
|
||||
LL | let _ = match_def_path(cx, did, &["core", "option", "Option", "Some"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.lang_items().get(LangItem::OptionSome) == Some(did)`
|
||||
|
@ -74,25 +74,25 @@ LL | let _ = match_def_path(cx, did, &["core", "option", "Option", "Some"]);
|
|||
= help: if this `DefId` came from a constructor expression or pattern then the parent `DefId` should be used instead
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:55:13
|
||||
--> $DIR/unnecessary_def_path.rs:54:13
|
||||
|
|
||||
LL | let _ = match_trait_method(cx, expr, &["core", "convert", "AsRef"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_trait_method(cx, expr, sym::AsRef)`
|
||||
|
||||
error: use of a def path to a diagnostic item
|
||||
--> $DIR/unnecessary_def_path.rs:57:13
|
||||
--> $DIR/unnecessary_def_path.rs:56:13
|
||||
|
|
||||
LL | let _ = is_expr_path_def_path(cx, expr, &["core", "option", "Option"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_path_diagnostic_item(cx, expr, sym::Option)`
|
||||
|
||||
error: use of a def path to a `LangItem`
|
||||
--> $DIR/unnecessary_def_path.rs:58:13
|
||||
--> $DIR/unnecessary_def_path.rs:57:13
|
||||
|
|
||||
LL | let _ = is_expr_path_def_path(cx, expr, &["core", "iter", "traits", "Iterator", "next"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `path_res(cx, expr).opt_def_id().map_or(false, |id| cx.tcx.lang_items().get(LangItem::IteratorNext) == Some(id))`
|
||||
|
||||
error: use of a def path to a `LangItem`
|
||||
--> $DIR/unnecessary_def_path.rs:59:13
|
||||
--> $DIR/unnecessary_def_path.rs:58:13
|
||||
|
|
||||
LL | let _ = is_expr_path_def_path(cx, expr, &["core", "option", "Option", "Some"]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_res_lang_ctor(cx, path_res(cx, expr), LangItem::OptionSome)`
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#![feature(rustc_private)]
|
||||
#![deny(clippy::internal)]
|
||||
#![allow(
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
error: unnecessary `Symbol` to string conversion
|
||||
--> $DIR/unnecessary_symbol_str.rs:16:5
|
||||
--> $DIR/unnecessary_symbol_str.rs:15:5
|
||||
|
|
||||
LL | Symbol::intern("foo").as_str() == "clippy";
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") == rustc_span::sym::clippy`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/unnecessary_symbol_str.rs:3:9
|
||||
--> $DIR/unnecessary_symbol_str.rs:2:9
|
||||
|
|
||||
LL | #![deny(clippy::internal)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
= note: `#[deny(clippy::unnecessary_symbol_str)]` implied by `#[deny(clippy::internal)]`
|
||||
|
||||
error: unnecessary `Symbol` to string conversion
|
||||
--> $DIR/unnecessary_symbol_str.rs:17:5
|
||||
--> $DIR/unnecessary_symbol_str.rs:16:5
|
||||
|
|
||||
LL | Symbol::intern("foo").to_string() == "self";
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") == rustc_span::symbol::kw::SelfLower`
|
||||
|
||||
error: unnecessary `Symbol` to string conversion
|
||||
--> $DIR/unnecessary_symbol_str.rs:18:5
|
||||
--> $DIR/unnecessary_symbol_str.rs:17:5
|
||||
|
|
||||
LL | Symbol::intern("foo").to_ident_string() != "Self";
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") != rustc_span::symbol::kw::SelfUpper`
|
||||
|
||||
error: unnecessary `Symbol` to string conversion
|
||||
--> $DIR/unnecessary_symbol_str.rs:19:5
|
||||
--> $DIR/unnecessary_symbol_str.rs:18:5
|
||||
|
|
||||
LL | &*Ident::empty().as_str() == "clippy";
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Ident::empty().name == rustc_span::sym::clippy`
|
||||
|
||||
error: unnecessary `Symbol` to string conversion
|
||||
--> $DIR/unnecessary_symbol_str.rs:20:5
|
||||
--> $DIR/unnecessary_symbol_str.rs:19:5
|
||||
|
|
||||
LL | "clippy" == Ident::empty().to_string();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::clippy == Ident::empty().name`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:../../ui/auxiliary/proc_macros.rs:proc-macro
|
||||
//@aux-build:../../ui/auxiliary/proc_macros.rs
|
||||
//@aux-build:helper.rs
|
||||
//@revisions: allow_crates disallow_crates
|
||||
//@[allow_crates] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/absolute_paths/allow_crates
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![rustfmt::skip]
|
||||
#![feature(custom_inner_attributes)]
|
||||
#![allow(unused)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_derive.rs:proc-macro
|
||||
//@aux-build:proc_macro_derive.rs
|
||||
|
||||
#![warn(clippy::nonstandard_macro_braces)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_derive.rs:proc-macro
|
||||
//@aux-build:proc_macro_derive.rs
|
||||
|
||||
#![warn(clippy::nonstandard_macro_braces)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_unsafe.rs:proc-macro
|
||||
//@aux-build:proc_macro_unsafe.rs
|
||||
|
||||
#![warn(clippy::undocumented_unsafe_blocks, clippy::unnecessary_safety_comment)]
|
||||
#![allow(deref_nullptr, clippy::let_unit_value, clippy::missing_safety_doc)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::allow_attributes)]
|
||||
#![feature(lint_reasons)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::allow_attributes)]
|
||||
#![feature(lint_reasons)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(lint_reasons)]
|
||||
#![deny(clippy::allow_attributes_without_reason)]
|
||||
#![allow(unfulfilled_lint_expectations)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//@edition:2018
|
||||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![feature(exclusive_range_pattern)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//@edition:2018
|
||||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![feature(exclusive_range_pattern)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![warn(clippy::arc_with_non_send_sync)]
|
||||
#![allow(unused_variables)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_derive.rs:proc-macro
|
||||
//@aux-build:proc_macro_derive.rs
|
||||
|
||||
#![allow(
|
||||
clippy::assign_op_pattern,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::as_conversions)]
|
||||
#![allow(clippy::borrow_as_ptr, unused)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
|
||||
#![allow(dead_code, unused_variables)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
|
||||
#![allow(dead_code, unused_variables)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:../auxiliary/proc_macros.rs:proc-macro
|
||||
//@aux-build:../auxiliary/proc_macros.rs
|
||||
//@no-rustfix
|
||||
extern crate proc_macros;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_crash.rs:proc-macro
|
||||
//@aux-build:proc_macro_crash.rs
|
||||
|
||||
#![warn(clippy::suspicious_else_formatting)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::default_numeric_fallback)]
|
||||
#![allow(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::default_numeric_fallback)]
|
||||
#![allow(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![feature(lint_reasons)]
|
||||
#![warn(clippy::default_numeric_fallback)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![feature(lint_reasons)]
|
||||
#![warn(clippy::default_numeric_fallback)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
#![deny(clippy::default_trait_access)]
|
||||
#![allow(dead_code, unused_imports)]
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
#![deny(clippy::default_trait_access)]
|
||||
#![allow(dead_code, unused_imports)]
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![allow(clippy::return_self_not_must_use, clippy::useless_vec)]
|
||||
#![warn(clippy::deref_addrof)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![allow(clippy::return_self_not_must_use, clippy::useless_vec)]
|
||||
#![warn(clippy::deref_addrof)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::deref_addrof)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![allow(clippy::let_unit_value)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_attr.rs:proc-macro
|
||||
//@aux-build:proc_macro_attr.rs
|
||||
#![warn(clippy::empty_line_after_doc_comments)]
|
||||
#![allow(clippy::assertions_on_constants)]
|
||||
#![feature(custom_inner_attributes)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_attr.rs:proc-macro
|
||||
//@aux-build:proc_macro_attr.rs
|
||||
#![warn(clippy::empty_line_after_outer_attr)]
|
||||
#![allow(clippy::assertions_on_constants)]
|
||||
#![feature(custom_inner_attributes)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::empty_loop)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![allow(
|
||||
unused_variables,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![allow(
|
||||
unused_variables,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_derive.rs:proc-macro
|
||||
//@aux-build:proc_macro_derive.rs
|
||||
|
||||
#![allow(
|
||||
unused,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![allow(unused, clippy::needless_lifetimes)]
|
||||
#![warn(clippy::extra_unused_type_parameters)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![allow(unused, clippy::needless_lifetimes)]
|
||||
#![warn(clippy::extra_unused_type_parameters)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//@aux-build:proc_macro_derive.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macro_derive.rs
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::field_reassign_with_default)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(
|
||||
clippy::clone_on_copy,
|
||||
clippy::map_identity,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(
|
||||
clippy::clone_on_copy,
|
||||
clippy::map_identity,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(custom_inner_attributes)]
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::four_forward_slashes)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(custom_inner_attributes)]
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::four_forward_slashes)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
//@no-rustfix
|
||||
#![deny(clippy::implicit_hasher)]
|
||||
#![allow(unused)]
|
||||
|
|
|
@ -1,155 +1,40 @@
|
|||
error: impl for `HashMap` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:18:35
|
||||
error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
|
||||
--> $DIR/implicit_hasher.rs:14:1
|
||||
|
|
||||
LL | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/implicit_hasher.rs:3:9
|
||||
|
|
||||
LL | #![deny(clippy::implicit_hasher)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashMap<K, V, S> {
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
|
||||
help: ...and use generic constructor
|
||||
|
|
||||
LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
|
||||
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
LL | pub trait Foo<T>: Sized {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: impl for `HashMap` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:27:36
|
||||
|
|
||||
LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) {
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
|
||||
help: ...and use generic constructor
|
||||
|
|
||||
LL | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
|
||||
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
error: impl for `HashMap` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:32:19
|
||||
|
|
||||
LL | impl Foo<i16> for HashMap<String, String> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
|
||||
| +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
help: ...and use generic constructor
|
||||
|
|
||||
LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
|
||||
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
error: impl for `HashSet` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:49:32
|
||||
|
|
||||
LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
|
||||
help: ...and use generic constructor
|
||||
|
|
||||
LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
|
||||
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
error: impl for `HashSet` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:54:19
|
||||
|
|
||||
LL | impl Foo<i16> for HashSet<String> {
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
|
||||
| +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~
|
||||
help: ...and use generic constructor
|
||||
|
|
||||
LL | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
|
||||
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
error: parameter of type `HashMap` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:71:23
|
||||
error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
|
||||
--> $DIR/implicit_hasher.rs:71:1
|
||||
|
|
||||
LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
|
||||
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: parameter of type `HashSet` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:71:53
|
||||
error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
|
||||
--> $DIR/implicit_hasher.rs:74:1
|
||||
|
|
||||
LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
|
||||
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
|
||||
LL | pub mod gen {
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: impl for `HashMap` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:77:43
|
||||
error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
|
||||
--> $DIR/implicit_hasher.rs:92:1
|
||||
|
|
||||
LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the macro `__inline_mac_mod_gen` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
|
||||
help: ...and use generic constructor
|
||||
|
|
||||
LL | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
|
||||
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
LL | pub mod test_macro;
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: parameter of type `HashMap` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:83:31
|
||||
error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
|
||||
--> $DIR/implicit_hasher.rs:96:1
|
||||
|
|
||||
LL | pub fn bar(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
LL | external! {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the macro `__inline_mac_mod_gen` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | pub fn bar<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
|
||||
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
|
||||
= note: this error originates in the macro `external` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: parameter of type `HashSet` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:83:61
|
||||
|
|
||||
LL | pub fn bar(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the macro `__inline_mac_mod_gen` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | pub fn bar<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
|
||||
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~
|
||||
|
||||
error: parameter of type `HashMap` should be generalized over different hashers
|
||||
--> $DIR/implicit_hasher.rs:101:35
|
||||
error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
|
||||
--> $DIR/implicit_hasher.rs:101:1
|
||||
|
|
||||
LL | pub async fn election_vote(_data: HashMap<i32, i32>) {}
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: consider adding a type parameter
|
||||
|
|
||||
LL | pub async fn election_vote<S: ::std::hash::BuildHasher>(_data: HashMap<i32, i32, S>) {}
|
||||
| +++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~~~~
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 11 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::inconsistent_struct_constructor)]
|
||||
#![allow(clippy::redundant_field_names)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::inconsistent_struct_constructor)]
|
||||
#![allow(clippy::redundant_field_names)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(clippy::useless_vec, unused)]
|
||||
#![warn(clippy::iter_skip_zero)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(clippy::useless_vec, unused)]
|
||||
#![warn(clippy::iter_skip_zero)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
//@no-rustfix
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::let_underscore_untyped)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::let_with_type_underscore)]
|
||||
#![allow(clippy::let_unit_value, clippy::needless_late_init)]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//@aux-build:macro_rules.rs
|
||||
//@aux-build:macro_use_helper.rs
|
||||
//@aux-build:proc_macro_derive.rs:proc-macro
|
||||
//@aux-build:proc_macro_derive.rs
|
||||
|
||||
//@ignore-32bit
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//@aux-build:macro_rules.rs
|
||||
//@aux-build:macro_use_helper.rs
|
||||
//@aux-build:proc_macro_derive.rs:proc-macro
|
||||
//@aux-build:proc_macro_derive.rs
|
||||
|
||||
//@ignore-32bit
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
error: `macro_use` attributes are no longer needed in the Rust 2018 edition
|
||||
--> $DIR/macro_use_imports.rs:25:5
|
||||
|
|
||||
LL | #[macro_use]
|
||||
| ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::inner::nested::string_add;`
|
||||
|
|
||||
= note: `-D clippy::macro-use-imports` implied by `-D warnings`
|
||||
|
||||
error: `macro_use` attributes are no longer needed in the Rust 2018 edition
|
||||
--> $DIR/macro_use_imports.rs:23:5
|
||||
|
|
||||
LL | #[macro_use]
|
||||
| ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::{inner::mut_mut, inner::try_err};`
|
||||
|
|
||||
= note: `-D clippy::macro-use-imports` implied by `-D warnings`
|
||||
|
||||
error: `macro_use` attributes are no longer needed in the Rust 2018 edition
|
||||
--> $DIR/macro_use_imports.rs:19:5
|
||||
|
|
||||
LL | #[macro_use]
|
||||
| ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::{pub_macro, inner_mod_macro, function_macro, ty_macro, pub_in_private_macro};`
|
||||
|
||||
error: `macro_use` attributes are no longer needed in the Rust 2018 edition
|
||||
--> $DIR/macro_use_imports.rs:21:5
|
||||
|
@ -19,10 +19,10 @@ LL | #[macro_use]
|
|||
| ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mini_mac::ClippyMiniMacroTest;`
|
||||
|
||||
error: `macro_use` attributes are no longer needed in the Rust 2018 edition
|
||||
--> $DIR/macro_use_imports.rs:25:5
|
||||
--> $DIR/macro_use_imports.rs:19:5
|
||||
|
|
||||
LL | #[macro_use]
|
||||
| ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::inner::nested::string_add;`
|
||||
| ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::{pub_macro, inner_mod_macro, function_macro, ty_macro, pub_in_private_macro};`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//@aux-build:macro_rules.rs
|
||||
//@aux-build:macro_use_helper.rs
|
||||
//@aux-build:proc_macro_derive.rs:proc-macro
|
||||
//@aux-build:proc_macro_derive.rs
|
||||
//@ignore-32bit
|
||||
|
||||
#![feature(lint_reasons)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//@no-rustfix: overlapping suggestions
|
||||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(clippy::needless_if, unused)]
|
||||
#![warn(clippy::manual_is_infinite, clippy::manual_is_finite)]
|
||||
#![feature(inline_const)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::manual_rem_euclid)]
|
||||
#![allow(clippy::let_with_type_underscore)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::manual_rem_euclid)]
|
||||
#![allow(clippy::let_with_type_underscore)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::manual_slice_size_calculation)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::manual_slice_size_calculation)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(clippy::unnecessary_fold, unused)]
|
||||
#![warn(clippy::manual_try_fold)]
|
||||
#![feature(try_trait_v2)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![warn(clippy::mem_replace_with_default)]
|
||||
|
||||
extern crate proc_macros;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(irrefutable_let_patterns, nonstandard_style, unused)]
|
||||
#![warn(clippy::min_ident_chars)]
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
//! The .stderr output of this test should be empty. Otherwise it's a bug somewhere.
|
||||
|
||||
//@aux-build:helper.rs
|
||||
//@aux-build:../auxiliary/proc_macros.rs:proc-macro
|
||||
//@aux-build:../auxiliary/proc_macros.rs
|
||||
|
||||
#![warn(clippy::missing_const_for_fn)]
|
||||
#![feature(start)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//@needs-asm-support
|
||||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
|
||||
#![warn(clippy::missing_docs_in_private_items)]
|
||||
// When denying at the crate level, be sure to not get random warnings from the
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
|
||||
#![warn(clippy::missing_docs_in_private_items)]
|
||||
#![allow(dead_code)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
|
||||
#![allow(
|
||||
dead_code,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build: proc_macros.rs:proc-macro
|
||||
//@aux-build: proc_macros.rs
|
||||
|
||||
#![allow(
|
||||
dead_code,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(unused)]
|
||||
#![allow(deref_nullptr)]
|
||||
#![allow(clippy::unnecessary_operation)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::must_use_unit)]
|
||||
#![allow(clippy::unused_unit)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::must_use_unit)]
|
||||
#![allow(clippy::unused_unit)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![warn(clippy::mut_mut)]
|
||||
#![allow(unused)]
|
||||
#![allow(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_attr.rs:proc-macro
|
||||
//@aux-build:proc_macro_attr.rs
|
||||
|
||||
#![warn(clippy::needless_arbitrary_self_type)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macro_attr.rs:proc-macro
|
||||
//@aux-build:proc_macro_attr.rs
|
||||
|
||||
#![warn(clippy::needless_arbitrary_self_type)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(let_chains)]
|
||||
#![allow(
|
||||
clippy::blocks_in_if_conditions,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(let_chains)]
|
||||
#![allow(
|
||||
clippy::blocks_in_if_conditions,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(let_chains)]
|
||||
#![allow(unused)]
|
||||
#![allow(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(let_chains)]
|
||||
#![allow(unused)]
|
||||
#![allow(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::needless_lifetimes)]
|
||||
#![allow(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::needless_lifetimes)]
|
||||
#![allow(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(custom_inner_attributes)]
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::needless_pub_self)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![feature(custom_inner_attributes)]
|
||||
#![allow(unused)]
|
||||
#![warn(clippy::needless_pub_self)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(
|
||||
clippy::needless_return,
|
||||
clippy::no_effect,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![allow(
|
||||
clippy::needless_return,
|
||||
clippy::no_effect,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![warn(clippy::option_env_unwrap)]
|
||||
#![allow(clippy::map_flatten)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![warn(clippy::all)]
|
||||
#![allow(unused)]
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
#![warn(clippy::all)]
|
||||
#![allow(unused)]
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@aux-build:proc_macros.rs:proc-macro
|
||||
//@aux-build:proc_macros.rs
|
||||
|
||||
#![warn(clippy::ptr_as_ptr)]
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue