From 063f8aa094a740b98b0dab49d8361441c8f1d0c4 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 25 Nov 2021 11:50:57 +0300 Subject: [PATCH 01/41] Ignore associated types in traits when considering type complexity --- clippy_lints/src/types/mod.rs | 8 +++++--- tests/ui/type_complexity_issue_1013.rs | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 tests/ui/type_complexity_issue_1013.rs diff --git a/clippy_lints/src/types/mod.rs b/clippy_lints/src/types/mod.rs index 5a7ef760a3025..69cd49d884cc0 100644 --- a/clippy_lints/src/types/mod.rs +++ b/clippy_lints/src/types/mod.rs @@ -350,7 +350,7 @@ impl<'tcx> LateLintPass<'tcx> for Types { fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { match item.kind { - ImplItemKind::Const(ty, _) | ImplItemKind::TyAlias(ty) => self.check_ty( + ImplItemKind::Const(ty, _) => self.check_ty( cx, ty, CheckTyContext { @@ -358,8 +358,10 @@ impl<'tcx> LateLintPass<'tcx> for Types { ..CheckTyContext::default() }, ), - // methods are covered by check_fn - ImplItemKind::Fn(..) => (), + // Methods are covered by check_fn. + // Type aliases are ignored because oftentimes it's impossible to + // make type alias declaration in trait simpler, see #1013 + ImplItemKind::Fn(..) | ImplItemKind::TyAlias(..) => (), } } diff --git a/tests/ui/type_complexity_issue_1013.rs b/tests/ui/type_complexity_issue_1013.rs new file mode 100644 index 0000000000000..c68ab3aaf942f --- /dev/null +++ b/tests/ui/type_complexity_issue_1013.rs @@ -0,0 +1,23 @@ +#![warn(clippy::type_complexity)] +use std::iter::{Filter, Map}; +use std::vec::IntoIter; + +struct S; + +impl IntoIterator for S { + type Item = i32; + // Should not warn since there is no way to simplify this + type IntoIter = Filter, fn(i32) -> i32>, fn(&i32) -> bool>; + + fn into_iter(self) -> Self::IntoIter { + fn m(a: i32) -> i32 { + a + } + fn p(_: &i32) -> bool { + true + } + vec![1i32, 2, 3].into_iter().map(m as fn(_) -> _).filter(p) + } +} + +fn main() {} From 40a6c519b447a45c4ec1cdda4be067207d836306 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 25 Nov 2021 12:47:29 +0300 Subject: [PATCH 02/41] Update tests for type_complexity lint --- tests/ui/type_complexity.rs | 8 ++++++++ tests/ui/type_complexity.stderr | 20 ++++++++++++++++---- tests/ui/type_complexity_issue_1013.rs | 23 ----------------------- 3 files changed, 24 insertions(+), 27 deletions(-) delete mode 100644 tests/ui/type_complexity_issue_1013.rs diff --git a/tests/ui/type_complexity.rs b/tests/ui/type_complexity.rs index 383bbb49dbe88..62d00e0072961 100644 --- a/tests/ui/type_complexity.rs +++ b/tests/ui/type_complexity.rs @@ -30,6 +30,14 @@ trait T { fn def_method(&self, p: Vec>>) {} } +impl T for () { + const A: Vec>> = vec![]; + + // Should not warn since there is likely no way to simplify this (#1013) + type B = Vec>>; + fn method(&self, p: Vec>>) {} +} + fn test1() -> Vec>> { vec![] } diff --git a/tests/ui/type_complexity.stderr b/tests/ui/type_complexity.stderr index 7879233fdf283..693f2adcfc8bd 100644 --- a/tests/ui/type_complexity.stderr +++ b/tests/ui/type_complexity.stderr @@ -73,22 +73,34 @@ LL | fn def_method(&self, p: Vec>>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: very complex type used. Consider factoring parts into `type` definitions - --> $DIR/type_complexity.rs:33:15 + --> $DIR/type_complexity.rs:34:14 + | +LL | const A: Vec>> = vec![]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: very complex type used. Consider factoring parts into `type` definitions + --> $DIR/type_complexity.rs:38:25 + | +LL | fn method(&self, p: Vec>>) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: very complex type used. Consider factoring parts into `type` definitions + --> $DIR/type_complexity.rs:41:15 | LL | fn test1() -> Vec>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: very complex type used. Consider factoring parts into `type` definitions - --> $DIR/type_complexity.rs:37:14 + --> $DIR/type_complexity.rs:45:14 | LL | fn test2(_x: Vec>>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: very complex type used. Consider factoring parts into `type` definitions - --> $DIR/type_complexity.rs:40:13 + --> $DIR/type_complexity.rs:48:13 | LL | let _y: Vec>> = vec![]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 15 previous errors +error: aborting due to 17 previous errors diff --git a/tests/ui/type_complexity_issue_1013.rs b/tests/ui/type_complexity_issue_1013.rs deleted file mode 100644 index c68ab3aaf942f..0000000000000 --- a/tests/ui/type_complexity_issue_1013.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![warn(clippy::type_complexity)] -use std::iter::{Filter, Map}; -use std::vec::IntoIter; - -struct S; - -impl IntoIterator for S { - type Item = i32; - // Should not warn since there is no way to simplify this - type IntoIter = Filter, fn(i32) -> i32>, fn(&i32) -> bool>; - - fn into_iter(self) -> Self::IntoIter { - fn m(a: i32) -> i32 { - a - } - fn p(_: &i32) -> bool { - true - } - vec![1i32, 2, 3].into_iter().map(m as fn(_) -> _).filter(p) - } -} - -fn main() {} From 99eeb66e0ffa97309c29c3af69614553cbf88ef8 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Mon, 29 Nov 2021 20:42:16 +0800 Subject: [PATCH 03/41] Fix tools --- clippy_lints/src/future_not_send.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/future_not_send.rs b/clippy_lints/src/future_not_send.rs index 6b2ac985555dc..a9297adb426a2 100644 --- a/clippy_lints/src/future_not_send.rs +++ b/clippy_lints/src/future_not_send.rs @@ -67,8 +67,8 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend { let mut is_future = false; for &(p, _span) in preds { let p = p.subst(cx.tcx, subst); - if let Some(trait_ref) = p.to_opt_poly_trait_ref() { - if Some(trait_ref.value.def_id()) == cx.tcx.lang_items().future_trait() { + if let Some(trait_pred) = p.to_opt_poly_trait_pred() { + if Some(trait_pred.skip_binder().trait_ref.def_id) == cx.tcx.lang_items().future_trait() { is_future = true; break; } From 23f752f2788c1df1ed57ea67f618efa903148daf Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Fri, 3 Dec 2021 10:11:21 -0300 Subject: [PATCH 04/41] Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino" This reverts commit 18bb8c61a975fff6424cda831ace5b0404277145, reversing changes made to d9baa361902b172be716f96619b909f340802dea. --- clippy_lints/src/future_not_send.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/future_not_send.rs b/clippy_lints/src/future_not_send.rs index a9297adb426a2..6b2ac985555dc 100644 --- a/clippy_lints/src/future_not_send.rs +++ b/clippy_lints/src/future_not_send.rs @@ -67,8 +67,8 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend { let mut is_future = false; for &(p, _span) in preds { let p = p.subst(cx.tcx, subst); - if let Some(trait_pred) = p.to_opt_poly_trait_pred() { - if Some(trait_pred.skip_binder().trait_ref.def_id) == cx.tcx.lang_items().future_trait() { + if let Some(trait_ref) = p.to_opt_poly_trait_ref() { + if Some(trait_ref.value.def_id()) == cx.tcx.lang_items().future_trait() { is_future = true; break; } From c813bfa424b62086a095a5010c4065a043703a4e Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Mon, 30 Aug 2021 01:23:33 +0100 Subject: [PATCH 05/41] Add initial AST and MIR support for unwinding from inline assembly --- clippy_lints/src/redundant_clone.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/clippy_lints/src/redundant_clone.rs b/clippy_lints/src/redundant_clone.rs index f7711b6fe9476..0eba6633ee19b 100644 --- a/clippy_lints/src/redundant_clone.rs +++ b/clippy_lints/src/redundant_clone.rs @@ -15,7 +15,7 @@ use rustc_middle::mir::{ Mutability, }; use rustc_middle::ty::{self, fold::TypeVisitor, Ty, TyCtxt}; -use rustc_mir_dataflow::{Analysis, AnalysisDomain, GenKill, GenKillAnalysis, ResultsCursor}; +use rustc_mir_dataflow::{Analysis, AnalysisDomain, CallReturnPlaces, GenKill, GenKillAnalysis, ResultsCursor}; use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::source_map::{BytePos, Span}; use rustc_span::sym; @@ -499,11 +499,9 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeStorageLive { fn call_return_effect( &self, - _in_out: &mut impl GenKill, + _trans: &mut impl GenKill, _block: mir::BasicBlock, - _func: &mir::Operand<'tcx>, - _args: &[mir::Operand<'tcx>], - _return_place: mir::Place<'tcx>, + _return_places: CallReturnPlaces<'_, 'tcx>, ) { // Nothing to do when a call returns successfully } From 35a0060aba4bc9ff4e2b8faa20b91762c3109b18 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Fri, 3 Sep 2021 12:36:33 +0200 Subject: [PATCH 06/41] Use IntoIterator for array impl everywhere. --- clippy_lints/src/matches.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index 7142df98c3f10..48e459e016592 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -13,7 +13,6 @@ use clippy_utils::{ remove_blocks, strip_pat_refs, }; use clippy_utils::{paths, search_same, SpanlessEq, SpanlessHash}; -use core::array; use core::iter::{once, ExactSizeIterator}; use if_chain::if_chain; use rustc_ast::ast::{Attribute, LitKind}; @@ -1306,7 +1305,7 @@ fn check_match_like_matches<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) return find_matches_sugg( cx, let_expr, - array::IntoIter::new([(&[][..], Some(let_pat), if_then, None), (&[][..], None, if_else, None)]), + IntoIterator::into_iter([(&[][..], Some(let_pat), if_then, None), (&[][..], None, if_else, None)]), expr, true, ); From 01ca66cbd70ecfa7ba6294219ecba9f6ad9c8b2b Mon Sep 17 00:00:00 2001 From: dswij Date: Mon, 6 Dec 2021 17:18:17 +0800 Subject: [PATCH 07/41] Fix FP on `question_mark` if returned object is not local --- clippy_lints/src/question_mark.rs | 2 +- tests/ui/question_mark.fixed | 19 +++++++++++++++++++ tests/ui/question_mark.rs | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/question_mark.rs b/clippy_lints/src/question_mark.rs index a5531993ee6ad..7d30c34e9563f 100644 --- a/clippy_lints/src/question_mark.rs +++ b/clippy_lints/src/question_mark.rs @@ -183,7 +183,7 @@ impl QuestionMark { false }, ExprKind::Ret(Some(ret_expr)) => Self::expression_returns_unmodified_err(cx, ret_expr, cond_expr), - ExprKind::Path(_) => path_to_local(expr) == path_to_local(cond_expr), + ExprKind::Path(_) => path_to_local(expr).is_some() && path_to_local(expr) == path_to_local(cond_expr), _ => false, } } diff --git a/tests/ui/question_mark.fixed b/tests/ui/question_mark.fixed index e93469e5f556b..13ce0f32d4bb1 100644 --- a/tests/ui/question_mark.fixed +++ b/tests/ui/question_mark.fixed @@ -136,6 +136,24 @@ fn result_func(x: Result) -> Result { Ok(y) } +// see issue #8019 +pub enum NotOption { + None, + First, + AfterFirst, +} + +fn obj(_: i32) -> Result<(), NotOption> { + Err(NotOption::First) +} + +fn f() -> NotOption { + if obj(2).is_err() { + return NotOption::None; + } + NotOption::First +} + fn main() { some_func(Some(42)); some_func(None); @@ -157,4 +175,5 @@ fn main() { func(); let _ = result_func(Ok(42)); + let _ = f(); } diff --git a/tests/ui/question_mark.rs b/tests/ui/question_mark.rs index dd179e9bee8f8..60590fd931188 100644 --- a/tests/ui/question_mark.rs +++ b/tests/ui/question_mark.rs @@ -168,6 +168,24 @@ fn result_func(x: Result) -> Result { Ok(y) } +// see issue #8019 +pub enum NotOption { + None, + First, + AfterFirst, +} + +fn obj(_: i32) -> Result<(), NotOption> { + Err(NotOption::First) +} + +fn f() -> NotOption { + if obj(2).is_err() { + return NotOption::None; + } + NotOption::First +} + fn main() { some_func(Some(42)); some_func(None); @@ -189,4 +207,5 @@ fn main() { func(); let _ = result_func(Ok(42)); + let _ = f(); } From 8fea1d94f3bbcc02c3822dd43da9a1133e90f715 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Mon, 6 Dec 2021 12:33:31 +0100 Subject: [PATCH 08/41] Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup --- .github/ISSUE_TEMPLATE/blank_issue.md | 18 - .github/ISSUE_TEMPLATE/blank_issue.yml | 44 + .github/ISSUE_TEMPLATE/bug_report.md | 43 - .github/ISSUE_TEMPLATE/bug_report.yml | 57 + .github/ISSUE_TEMPLATE/false_negative.md | 35 - .github/ISSUE_TEMPLATE/false_negative.yml | 50 + .github/ISSUE_TEMPLATE/false_positive.md | 44 - .github/ISSUE_TEMPLATE/false_positive.yml | 68 + .github/ISSUE_TEMPLATE/ice.md | 52 - .github/ISSUE_TEMPLATE/ice.yml | 48 + .github/ISSUE_TEMPLATE/new_lint.md | 36 - .github/ISSUE_TEMPLATE/new_lint.yml | 71 + .github/workflows/clippy_dev.yml | 12 - CHANGELOG.md | 20 +- Cargo.toml | 3 +- clippy_dev/Cargo.toml | 1 + clippy_dev/src/fmt.rs | 44 +- clippy_dev/src/lib.rs | 1 + clippy_dev/src/lint.rs | 20 + clippy_dev/src/main.rs | 15 +- clippy_dev/src/new_lint.rs | 21 +- clippy_dev/src/update_lints.rs | 5 + clippy_lints/Cargo.toml | 2 +- .../src/absurd_extreme_comparisons.rs | 1 + clippy_lints/src/approx_const.rs | 1 + clippy_lints/src/arithmetic.rs | 2 + clippy_lints/src/as_conversions.rs | 1 + clippy_lints/src/asm_syntax.rs | 2 + clippy_lints/src/assertions_on_constants.rs | 1 + clippy_lints/src/assign_ops.rs | 2 + clippy_lints/src/async_yields_async.rs | 1 + clippy_lints/src/attrs.rs | 26 +- clippy_lints/src/await_holding_invalid.rs | 2 + clippy_lints/src/bit_mask.rs | 3 + clippy_lints/src/blacklisted_name.rs | 1 + clippy_lints/src/blocks_in_if_conditions.rs | 1 + clippy_lints/src/bool_assert_comparison.rs | 3 +- clippy_lints/src/booleans.rs | 30 +- clippy_lints/src/bytecount.rs | 5 +- clippy_lints/src/cargo_common_metadata.rs | 1 + ...se_sensitive_file_extension_comparisons.rs | 1 + clippy_lints/src/casts/cast_lossless.rs | 41 +- clippy_lints/src/casts/mod.rs | 29 +- clippy_lints/src/checked_conversions.rs | 1 + clippy_lints/src/cognitive_complexity.rs | 1 + clippy_lints/src/collapsible_if.rs | 2 + clippy_lints/src/collapsible_match.rs | 1 + clippy_lints/src/comparison_chain.rs | 1 + clippy_lints/src/copies.rs | 10 +- clippy_lints/src/copy_iterator.rs | 1 + clippy_lints/src/create_dir.rs | 1 + clippy_lints/src/dbg_macro.rs | 9 + clippy_lints/src/default.rs | 8 +- clippy_lints/src/default_numeric_fallback.rs | 1 + clippy_lints/src/deprecated_lints.rs | 16 + clippy_lints/src/dereference.rs | 338 ++++- clippy_lints/src/derivable_impls.rs | 5 +- clippy_lints/src/derive.rs | 4 + ...llowed_method.rs => disallowed_methods.rs} | 13 +- clippy_lints/src/disallowed_script_idents.rs | 1 + ...disallowed_type.rs => disallowed_types.rs} | 15 +- clippy_lints/src/doc.rs | 30 +- clippy_lints/src/double_comparison.rs | 1 + clippy_lints/src/double_parens.rs | 1 + clippy_lints/src/drop_forget_ref.rs | 4 + clippy_lints/src/duration_subsec.rs | 1 + clippy_lints/src/else_if_without_else.rs | 1 + clippy_lints/src/empty_enum.rs | 1 + clippy_lints/src/entry.rs | 1 + clippy_lints/src/enum_clike.rs | 1 + clippy_lints/src/enum_variants.rs | 3 + clippy_lints/src/eq_op.rs | 8 +- clippy_lints/src/equatable_if_let.rs | 1 + clippy_lints/src/erasing_op.rs | 1 + clippy_lints/src/escape.rs | 1 + clippy_lints/src/eta_reduction.rs | 8 +- clippy_lints/src/eval_order_dependence.rs | 2 + clippy_lints/src/excessive_bools.rs | 5 +- clippy_lints/src/exhaustive_items.rs | 2 + clippy_lints/src/exit.rs | 1 + clippy_lints/src/explicit_write.rs | 1 + clippy_lints/src/fallible_impl_from.rs | 1 + clippy_lints/src/feature_name.rs | 2 + .../src/float_equality_without_abs.rs | 1 + clippy_lints/src/float_literal.rs | 2 + clippy_lints/src/floating_point_arithmetic.rs | 9 +- clippy_lints/src/format.rs | 1 + clippy_lints/src/format_args.rs | 13 +- clippy_lints/src/formatting.rs | 4 + clippy_lints/src/from_over_into.rs | 1 + clippy_lints/src/from_str_radix_10.rs | 1 + clippy_lints/src/functions/mod.rs | 7 + clippy_lints/src/functions/too_many_lines.rs | 4 +- clippy_lints/src/future_not_send.rs | 1 + clippy_lints/src/get_last_with_len.rs | 1 + clippy_lints/src/identity_op.rs | 1 + clippy_lints/src/if_let_mutex.rs | 1 + clippy_lints/src/if_not_else.rs | 1 + clippy_lints/src/if_then_some_else_none.rs | 14 +- clippy_lints/src/implicit_hasher.rs | 1 + clippy_lints/src/implicit_return.rs | 31 +- clippy_lints/src/implicit_saturating_sub.rs | 5 +- .../src/inconsistent_struct_constructor.rs | 4 +- clippy_lints/src/index_refutable_slice.rs | 276 ++++ clippy_lints/src/indexing_slicing.rs | 2 + clippy_lints/src/infinite_iter.rs | 2 + clippy_lints/src/inherent_impl.rs | 9 +- clippy_lints/src/inherent_to_string.rs | 2 + clippy_lints/src/inline_fn_without_body.rs | 1 + clippy_lints/src/int_plus_one.rs | 1 + clippy_lints/src/integer_division.rs | 1 + .../src/invalid_upcast_comparisons.rs | 1 + clippy_lints/src/items_after_statements.rs | 1 + .../src/iter_not_returning_iterator.rs | 1 + clippy_lints/src/large_const_arrays.rs | 1 + clippy_lints/src/large_enum_variant.rs | 1 + clippy_lints/src/large_stack_arrays.rs | 1 + clippy_lints/src/len_zero.rs | 3 + clippy_lints/src/let_if_seq.rs | 1 + clippy_lints/src/let_underscore.rs | 10 +- clippy_lints/src/lib.register_all.rs | 6 +- clippy_lints/src/lib.register_complexity.rs | 2 + clippy_lints/src/lib.register_internal.rs | 2 + clippy_lints/src/lib.register_lints.rs | 16 +- clippy_lints/src/lib.register_nursery.rs | 5 +- clippy_lints/src/lib.register_pedantic.rs | 3 +- clippy_lints/src/lib.register_style.rs | 3 +- clippy_lints/src/lib.register_suspicious.rs | 1 + clippy_lints/src/lib.rs | 136 +- clippy_lints/src/lifetimes.rs | 6 +- clippy_lints/src/literal_representation.rs | 13 +- .../src/loops/explicit_counter_loop.rs | 58 +- clippy_lints/src/loops/manual_memcpy.rs | 2 +- clippy_lints/src/loops/mod.rs | 18 + clippy_lints/src/loops/needless_collect.rs | 178 ++- clippy_lints/src/loops/utils.rs | 74 +- clippy_lints/src/macro_use.rs | 7 +- clippy_lints/src/main_recursion.rs | 1 + clippy_lints/src/manual_assert.rs | 1 + clippy_lints/src/manual_async_fn.rs | 1 + clippy_lints/src/manual_map.rs | 81 +- clippy_lints/src/manual_non_exhaustive.rs | 1 + clippy_lints/src/manual_ok_or.rs | 1 + clippy_lints/src/manual_strip.rs | 1 + clippy_lints/src/manual_unwrap_or.rs | 1 + clippy_lints/src/map_clone.rs | 1 + clippy_lints/src/map_err_ignore.rs | 1 + clippy_lints/src/map_unit_fn.rs | 4 +- clippy_lints/src/match_on_vec_items.rs | 1 + clippy_lints/src/match_result_ok.rs | 1 + clippy_lints/src/match_str_case_mismatch.rs | 1 + clippy_lints/src/matches.rs | 191 +-- clippy_lints/src/mem_forget.rs | 1 + clippy_lints/src/mem_replace.rs | 7 +- .../src/methods/bind_instead_of_map.rs | 4 +- .../methods/from_iter_instead_of_collect.rs | 2 +- .../src/methods/iter_cloned_collect.rs | 6 +- clippy_lints/src/methods/mod.rs | 107 +- .../src/methods/option_map_or_none.rs | 139 +- clippy_lints/src/methods/or_fun_call.rs | 59 +- clippy_lints/src/methods/search_is_some.rs | 18 +- .../src/methods/single_char_pattern.rs | 7 +- .../{manual_split_once.rs => str_splitn.rs} | 150 ++- .../src/methods/unnecessary_lazy_eval.rs | 2 +- clippy_lints/src/methods/utils.rs | 8 +- clippy_lints/src/minmax.rs | 1 + clippy_lints/src/misc.rs | 9 + clippy_lints/src/misc_early/mod.rs | 10 + clippy_lints/src/missing_const_for_fn.rs | 1 + clippy_lints/src/missing_doc.rs | 1 + .../src/missing_enforced_import_rename.rs | 1 + clippy_lints/src/missing_inline.rs | 1 + clippy_lints/src/module_style.rs | 2 + clippy_lints/src/modulo_arithmetic.rs | 1 + clippy_lints/src/multiple_crate_versions.rs | 1 + clippy_lints/src/mut_key.rs | 1 + clippy_lints/src/mut_mut.rs | 1 + clippy_lints/src/mut_mutex_lock.rs | 1 + clippy_lints/src/mut_reference.rs | 1 + clippy_lints/src/mutable_debug_assertion.rs | 1 + clippy_lints/src/mutex_atomic.rs | 2 + .../src/needless_arbitrary_self_type.rs | 8 +- clippy_lints/src/needless_bitwise_bool.rs | 4 +- clippy_lints/src/needless_bool.rs | 2 + clippy_lints/src/needless_borrow.rs | 282 ---- clippy_lints/src/needless_borrowed_ref.rs | 1 + clippy_lints/src/needless_continue.rs | 1 + clippy_lints/src/needless_for_each.rs | 1 + clippy_lints/src/needless_late_init.rs | 349 +++++ clippy_lints/src/needless_option_as_deref.rs | 4 +- clippy_lints/src/needless_pass_by_value.rs | 1 + clippy_lints/src/needless_question_mark.rs | 34 +- clippy_lints/src/needless_update.rs | 1 + clippy_lints/src/neg_cmp_op_on_partial_ord.rs | 1 + clippy_lints/src/neg_multiply.rs | 1 + clippy_lints/src/new_without_default.rs | 1 + clippy_lints/src/no_effect.rs | 23 +- clippy_lints/src/non_copy_const.rs | 2 + clippy_lints/src/non_expressive_names.rs | 17 +- .../src/non_octal_unix_permissions.rs | 1 + .../src/non_send_fields_in_send_ty.rs | 29 +- clippy_lints/src/nonstandard_macro_braces.rs | 33 +- clippy_lints/src/octal_escapes.rs | 150 +++ clippy_lints/src/open_options.rs | 1 + clippy_lints/src/option_env_unwrap.rs | 1 + clippy_lints/src/option_if_let_else.rs | 17 +- .../src/overflow_check_conditional.rs | 1 + clippy_lints/src/panic_in_result_fn.rs | 1 + clippy_lints/src/panic_unimplemented.rs | 4 + clippy_lints/src/partialeq_ne_impl.rs | 1 + clippy_lints/src/pass_by_ref_or_value.rs | 2 + clippy_lints/src/path_buf_push_overwrite.rs | 1 + clippy_lints/src/pattern_type_mismatch.rs | 1 + clippy_lints/src/precedence.rs | 1 + clippy_lints/src/ptr.rs | 4 + clippy_lints/src/ptr_eq.rs | 4 +- clippy_lints/src/ptr_offset_with_cast.rs | 1 + clippy_lints/src/question_mark.rs | 1 + clippy_lints/src/ranges.rs | 5 + clippy_lints/src/redundant_clone.rs | 1 + clippy_lints/src/redundant_closure_call.rs | 1 + clippy_lints/src/redundant_else.rs | 1 + clippy_lints/src/redundant_field_names.rs | 1 + clippy_lints/src/redundant_pub_crate.rs | 1 + clippy_lints/src/redundant_slicing.rs | 5 +- .../src/redundant_static_lifetimes.rs | 1 + clippy_lints/src/ref_option_ref.rs | 1 + clippy_lints/src/reference.rs | 5 +- clippy_lints/src/regex.rs | 2 + clippy_lints/src/repeat_once.rs | 4 +- clippy_lints/src/returns.rs | 7 +- clippy_lints/src/same_name_method.rs | 7 +- clippy_lints/src/self_assignment.rs | 1 + clippy_lints/src/self_named_constructors.rs | 3 +- .../src/semicolon_if_nothing_returned.rs | 3 +- clippy_lints/src/serde_api.rs | 1 + clippy_lints/src/shadow.rs | 10 +- .../src/single_component_path_imports.rs | 4 +- clippy_lints/src/size_of_in_element_count.rs | 1 + .../src/slow_vector_initialization.rs | 1 + clippy_lints/src/stable_sort_primitive.rs | 1 + clippy_lints/src/strings.rs | 7 + clippy_lints/src/strlen_on_c_strings.rs | 67 +- .../src/suspicious_operation_groupings.rs | 1 + clippy_lints/src/suspicious_trait_impl.rs | 2 + clippy_lints/src/swap.rs | 50 +- clippy_lints/src/tabs_in_doc_comments.rs | 1 + clippy_lints/src/temporary_assignment.rs | 1 + clippy_lints/src/to_digit_is_some.rs | 1 + clippy_lints/src/to_string_in_display.rs | 1 + clippy_lints/src/trailing_empty_array.rs | 1 + clippy_lints/src/trait_bounds.rs | 12 +- clippy_lints/src/transmute/mod.rs | 13 + clippy_lints/src/transmuting_null.rs | 1 + clippy_lints/src/try_err.rs | 21 +- clippy_lints/src/types/mod.rs | 9 + .../src/undocumented_unsafe_blocks.rs | 13 +- clippy_lints/src/undropped_manually_drops.rs | 1 + clippy_lints/src/unicode.rs | 13 +- clippy_lints/src/uninit_vec.rs | 1 + clippy_lints/src/unit_hash.rs | 1 + clippy_lints/src/unit_return_expecting_ord.rs | 1 + clippy_lints/src/unit_types/mod.rs | 3 + clippy_lints/src/unnamed_address.rs | 2 + clippy_lints/src/unnecessary_self_imports.rs | 1 + clippy_lints/src/unnecessary_sort_by.rs | 1 + clippy_lints/src/unnecessary_wraps.rs | 5 +- clippy_lints/src/unnested_or_patterns.rs | 1 + clippy_lints/src/unsafe_removed_from_name.rs | 1 + clippy_lints/src/unused_async.rs | 1 + clippy_lints/src/unused_io_amount.rs | 1 + clippy_lints/src/unused_self.rs | 1 + clippy_lints/src/unused_unit.rs | 1 + clippy_lints/src/unwrap.rs | 6 +- clippy_lints/src/unwrap_in_result.rs | 1 + clippy_lints/src/upper_case_acronyms.rs | 1 + clippy_lints/src/use_self.rs | 11 +- clippy_lints/src/useless_conversion.rs | 1 + clippy_lints/src/utils/author.rs | 1159 ++++++++--------- clippy_lints/src/utils/conf.rs | 16 +- clippy_lints/src/utils/internal_lints.rs | 80 +- .../internal_lints/metadata_collector.rs | 29 +- clippy_lints/src/vec.rs | 1 + clippy_lints/src/vec_init_then_push.rs | 1 + clippy_lints/src/vec_resize_to_zero.rs | 1 + clippy_lints/src/verbose_file_reads.rs | 1 + clippy_lints/src/wildcard_dependencies.rs | 1 + clippy_lints/src/wildcard_imports.rs | 6 +- clippy_lints/src/write.rs | 29 +- clippy_lints/src/zero_div_zero.rs | 1 + clippy_lints/src/zero_sized_map_values.rs | 1 + clippy_utils/Cargo.toml | 2 +- clippy_utils/src/ast_utils.rs | 115 +- clippy_utils/src/attrs.rs | 15 +- clippy_utils/src/eager_or_lazy.rs | 307 +++-- clippy_utils/src/lib.rs | 120 +- clippy_utils/src/msrvs.rs | 5 +- clippy_utils/src/paths.rs | 5 +- clippy_utils/src/ptr.rs | 58 +- clippy_utils/src/source.rs | 16 +- clippy_utils/src/sugg.rs | 277 +++- clippy_utils/src/ty.rs | 39 +- clippy_utils/src/usage.rs | 111 +- clippy_utils/src/visitors.rs | 289 ++-- doc/adding_lints.md | 15 +- doc/changelog_update.md | 2 +- doc/common_tools_writing_lints.md | 155 ++- lintcheck/src/main.rs | 4 +- rust-toolchain | 4 +- src/driver.rs | 2 +- tests/compile-test.rs | 3 + tests/fmt.rs | 5 +- .../check_clippy_version_attribute.rs | 87 ++ .../check_clippy_version_attribute.stderr | 73 ++ .../collapsible_span_lint_calls.fixed | 1 + .../collapsible_span_lint_calls.rs | 1 + .../collapsible_span_lint_calls.stderr | 10 +- tests/ui-internal/custom_ice_message.rs | 1 + tests/ui-internal/default_lint.rs | 1 + tests/ui-internal/default_lint.stderr | 2 +- tests/ui-internal/if_chain_style.rs | 2 +- .../interning_defined_symbol.fixed | 1 + tests/ui-internal/interning_defined_symbol.rs | 1 + .../interning_defined_symbol.stderr | 8 +- tests/ui-internal/invalid_paths.rs | 1 + tests/ui-internal/invalid_paths.stderr | 4 +- tests/ui-internal/lint_without_lint_pass.rs | 1 + .../ui-internal/lint_without_lint_pass.stderr | 2 +- tests/ui-internal/match_type_on_diag_item.rs | 1 + .../match_type_on_diag_item.stderr | 6 +- tests/ui-internal/outer_expn_data.fixed | 1 + tests/ui-internal/outer_expn_data.rs | 1 + tests/ui-internal/outer_expn_data.stderr | 2 +- .../ui-internal/unnecessary_symbol_str.fixed | 6 +- tests/ui-internal/unnecessary_symbol_str.rs | 6 +- .../ui-internal/unnecessary_symbol_str.stderr | 10 +- .../clippy.toml | 1 + .../index_refutable_slice.rs | 23 + .../index_refutable_slice.stderr | 22 + .../min_rust_version/min_rust_version.rs | 10 + .../clippy.toml | 0 .../conf_disallowed_methods.rs} | 2 +- .../conf_disallowed_methods.stderr} | 8 +- .../clippy.toml | 0 .../conf_disallowed_types.rs} | 2 +- .../conf_disallowed_types.stderr} | 44 +- .../toml_unknown_key/conf_unknown_key.stderr | 2 +- tests/ui/author.stdout | 12 +- tests/ui/author/blocks.rs | 9 + tests/ui/author/blocks.stdout | 68 +- tests/ui/author/call.stdout | 14 +- tests/ui/author/for_loop.rs | 8 - tests/ui/author/for_loop.stdout | 49 - tests/ui/author/if.rs | 7 + tests/ui/author/if.stdout | 54 +- tests/ui/author/issue_3849.stdout | 14 +- tests/ui/author/loop.rs | 36 + tests/ui/author/loop.stdout | 113 ++ tests/ui/author/matches.stdout | 49 +- tests/ui/author/repeat.rs | 5 + tests/ui/author/repeat.stdout | 11 + tests/ui/author/struct.rs | 40 + tests/ui/author/struct.stdout | 64 + tests/ui/cast_lossless_bool.fixed | 42 + tests/ui/cast_lossless_bool.rs | 42 + tests/ui/cast_lossless_bool.stderr | 82 ++ tests/ui/crashes/auxiliary/ice-7934-aux.rs | 4 + tests/ui/crashes/ice-7934.rs | 7 + tests/ui/crate_level_checks/no_std_swap.rs | 14 + .../ui/crate_level_checks/no_std_swap.stderr | 12 + tests/ui/doc/doc-fixable.stderr | 209 ++- tests/ui/doc/unbalanced_ticks.stderr | 21 +- tests/ui/explicit_counter_loop.rs | 30 + tests/ui/explicit_counter_loop.stderr | 16 +- tests/ui/floating_point_abs.fixed | 6 + tests/ui/floating_point_abs.rs | 6 + tests/ui/floating_point_abs.stderr | 16 +- tests/ui/floating_point_mul_add.fixed | 11 + tests/ui/floating_point_mul_add.rs | 11 + tests/ui/floating_point_mul_add.stderr | 20 +- tests/ui/floating_point_rad.fixed | 7 + tests/ui/floating_point_rad.rs | 7 + tests/ui/floating_point_rad.stderr | 4 +- tests/ui/if_then_some_else_none.rs | 11 + .../if_let_slice_binding.rs | 166 +++ .../if_let_slice_binding.stderr | 158 +++ .../slice_indexing_in_macro.rs | 28 + .../slice_indexing_in_macro.stderr | 22 + tests/ui/iter_cloned_collect.fixed | 3 + tests/ui/iter_cloned_collect.rs | 3 + tests/ui/iter_cloned_collect.stderr | 8 +- tests/ui/let_if_seq.rs | 3 +- tests/ui/let_if_seq.stderr | 8 +- tests/ui/let_underscore_lock.rs | 14 + tests/ui/let_underscore_lock.stderr | 46 +- tests/ui/manual_assert.edition2018.fixed | 2 + tests/ui/manual_assert.edition2018.stderr | 14 +- tests/ui/manual_assert.edition2021.fixed | 2 + tests/ui/manual_assert.edition2021.stderr | 14 +- tests/ui/manual_assert.fixed | 2 + tests/ui/manual_assert.rs | 2 + tests/ui/manual_map_option_2.fixed | 10 + tests/ui/manual_map_option_2.rs | 19 + tests/ui/manual_map_option_2.stderr | 32 +- tests/ui/manual_split_once.fixed | 6 +- tests/ui/manual_split_once.rs | 2 +- tests/ui/manual_split_once.stderr | 10 +- tests/ui/match_overlapping_arm.rs | 18 + tests/ui/match_overlapping_arm.stderr | 26 +- tests/ui/min_max.rs | 7 +- tests/ui/min_max.stderr | 26 +- tests/ui/min_rust_version_attr.rs | 19 +- tests/ui/min_rust_version_attr.stderr | 8 +- tests/ui/needless_borrow.fixed | 23 +- tests/ui/needless_borrow.rs | 23 +- tests/ui/needless_borrow.stderr | 50 +- tests/ui/needless_collect_indirect.rs | 31 + tests/ui/needless_late_init.rs | 167 +++ tests/ui/needless_late_init.stderr | 150 +++ tests/ui/needless_late_init_fixable.fixed | 38 + tests/ui/needless_late_init_fixable.rs | 38 + tests/ui/needless_late_init_fixable.stderr | 103 ++ tests/ui/needless_question_mark.stderr | 24 +- tests/ui/needless_return.fixed | 1 + tests/ui/needless_return.rs | 1 + tests/ui/needless_return.stderr | 36 +- tests/ui/needless_splitn.fixed | 27 + tests/ui/needless_splitn.rs | 27 + tests/ui/needless_splitn.stderr | 40 + tests/ui/no_effect.rs | 35 +- tests/ui/no_effect.stderr | 60 +- tests/ui/non_send_fields_in_send_ty.rs | 5 + tests/ui/non_send_fields_in_send_ty.stderr | 20 +- tests/ui/octal_escapes.rs | 20 + tests/ui/octal_escapes.stderr | 131 ++ tests/ui/option_env_unwrap.rs | 1 + tests/ui/option_env_unwrap.stderr | 12 +- tests/ui/option_filter_map.fixed | 10 +- tests/ui/option_filter_map.rs | 10 +- tests/ui/option_filter_map.stderr | 16 +- tests/ui/option_if_let_else.fixed | 15 +- tests/ui/option_if_let_else.rs | 17 + tests/ui/option_if_let_else.stderr | 24 +- tests/ui/option_map_or_none.fixed | 18 +- tests/ui/option_map_or_none.rs | 16 +- tests/ui/option_map_or_none.stderr | 53 +- tests/ui/or_fun_call.fixed | 30 +- tests/ui/or_fun_call.rs | 18 +- tests/ui/or_fun_call.stderr | 60 +- tests/ui/pattern_type_mismatch/mutability.rs | 9 + tests/ui/redundant_closure_call_late.rs | 1 + tests/ui/redundant_closure_call_late.stderr | 6 +- tests/ui/redundant_else.rs | 2 +- .../redundant_pattern_matching_option.fixed | 6 + tests/ui/redundant_pattern_matching_option.rs | 6 + .../redundant_pattern_matching_option.stderr | 14 +- .../redundant_pattern_matching_result.fixed | 4 +- .../redundant_pattern_matching_result.stderr | 4 +- tests/ui/rename.fixed | 5 + tests/ui/rename.rs | 5 + tests/ui/rename.stderr | 74 +- tests/ui/same_name_method.stderr | 10 +- tests/ui/search_is_some.rs | 6 + tests/ui/search_is_some.stderr | 20 +- tests/ui/search_is_some_fixable.fixed | 68 - tests/ui/search_is_some_fixable.rs | 68 - tests/ui/search_is_some_fixable.stderr | 184 --- tests/ui/search_is_some_fixable_none.fixed | 216 +++ tests/ui/search_is_some_fixable_none.rs | 222 ++++ tests/ui/search_is_some_fixable_none.stderr | 293 +++++ tests/ui/search_is_some_fixable_some.fixed | 218 ++++ tests/ui/search_is_some_fixable_some.rs | 221 ++++ tests/ui/search_is_some_fixable_some.stderr | 276 ++++ tests/ui/semicolon_if_nothing_returned.rs | 10 + tests/ui/semicolon_if_nothing_returned.stderr | 10 +- tests/ui/shadow.rs | 6 + tests/ui/shadow.stderr | 14 +- tests/ui/single_char_pattern.fixed | 10 +- tests/ui/single_char_pattern.rs | 10 +- tests/ui/single_char_pattern.stderr | 102 +- tests/ui/strlen_on_c_strings.fixed | 34 + tests/ui/strlen_on_c_strings.rs | 22 +- tests/ui/strlen_on_c_strings.stderr | 47 +- tests/ui/suspicious_splitn.rs | 1 + tests/ui/suspicious_splitn.stderr | 18 +- tests/ui/undocumented_unsafe_blocks.rs | 4 + tests/ui/undocumented_unsafe_blocks.stderr | 14 +- tests/ui/unicode.rs | 8 + tests/ui/unicode.stderr | 14 +- triagebot.toml | 5 + util/gh-pages/index.html | 16 +- 491 files changed, 9876 insertions(+), 3243 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/blank_issue.md create mode 100644 .github/ISSUE_TEMPLATE/blank_issue.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 .github/ISSUE_TEMPLATE/false_negative.md create mode 100644 .github/ISSUE_TEMPLATE/false_negative.yml delete mode 100644 .github/ISSUE_TEMPLATE/false_positive.md create mode 100644 .github/ISSUE_TEMPLATE/false_positive.yml delete mode 100644 .github/ISSUE_TEMPLATE/ice.md create mode 100644 .github/ISSUE_TEMPLATE/ice.yml delete mode 100644 .github/ISSUE_TEMPLATE/new_lint.md create mode 100644 .github/ISSUE_TEMPLATE/new_lint.yml create mode 100644 clippy_dev/src/lint.rs rename clippy_lints/src/{disallowed_method.rs => disallowed_methods.rs} (91%) rename clippy_lints/src/{disallowed_type.rs => disallowed_types.rs} (93%) create mode 100644 clippy_lints/src/index_refutable_slice.rs rename clippy_lints/src/methods/{manual_split_once.rs => str_splitn.rs} (60%) delete mode 100644 clippy_lints/src/needless_borrow.rs create mode 100644 clippy_lints/src/needless_late_init.rs create mode 100644 clippy_lints/src/octal_escapes.rs create mode 100644 tests/ui-internal/check_clippy_version_attribute.rs create mode 100644 tests/ui-internal/check_clippy_version_attribute.stderr create mode 100644 tests/ui-toml/max_suggested_slice_pattern_length/clippy.toml create mode 100644 tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.rs create mode 100644 tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.stderr rename tests/ui-toml/{toml_disallowed_method => toml_disallowed_methods}/clippy.toml (100%) rename tests/ui-toml/{toml_disallowed_method/conf_disallowed_method.rs => toml_disallowed_methods/conf_disallowed_methods.rs} (82%) rename tests/ui-toml/{toml_disallowed_method/conf_disallowed_method.stderr => toml_disallowed_methods/conf_disallowed_methods.stderr} (71%) rename tests/ui-toml/{toml_disallowed_type => toml_disallowed_types}/clippy.toml (100%) rename tests/ui-toml/{toml_disallowed_type/conf_disallowed_type.rs => toml_disallowed_types/conf_disallowed_types.rs} (96%) rename tests/ui-toml/{toml_disallowed_type/conf_disallowed_type.stderr => toml_disallowed_types/conf_disallowed_types.stderr} (79%) delete mode 100644 tests/ui/author/for_loop.rs delete mode 100644 tests/ui/author/for_loop.stdout create mode 100644 tests/ui/author/loop.rs create mode 100644 tests/ui/author/loop.stdout create mode 100644 tests/ui/author/repeat.rs create mode 100644 tests/ui/author/repeat.stdout create mode 100644 tests/ui/author/struct.rs create mode 100644 tests/ui/author/struct.stdout create mode 100644 tests/ui/cast_lossless_bool.fixed create mode 100644 tests/ui/cast_lossless_bool.rs create mode 100644 tests/ui/cast_lossless_bool.stderr create mode 100644 tests/ui/crashes/auxiliary/ice-7934-aux.rs create mode 100644 tests/ui/crashes/ice-7934.rs create mode 100644 tests/ui/crate_level_checks/no_std_swap.rs create mode 100644 tests/ui/crate_level_checks/no_std_swap.stderr create mode 100644 tests/ui/index_refutable_slice/if_let_slice_binding.rs create mode 100644 tests/ui/index_refutable_slice/if_let_slice_binding.stderr create mode 100644 tests/ui/index_refutable_slice/slice_indexing_in_macro.rs create mode 100644 tests/ui/index_refutable_slice/slice_indexing_in_macro.stderr create mode 100644 tests/ui/needless_late_init.rs create mode 100644 tests/ui/needless_late_init.stderr create mode 100644 tests/ui/needless_late_init_fixable.fixed create mode 100644 tests/ui/needless_late_init_fixable.rs create mode 100644 tests/ui/needless_late_init_fixable.stderr create mode 100644 tests/ui/needless_splitn.fixed create mode 100644 tests/ui/needless_splitn.rs create mode 100644 tests/ui/needless_splitn.stderr create mode 100644 tests/ui/octal_escapes.rs create mode 100644 tests/ui/octal_escapes.stderr delete mode 100644 tests/ui/search_is_some_fixable.fixed delete mode 100644 tests/ui/search_is_some_fixable.rs delete mode 100644 tests/ui/search_is_some_fixable.stderr create mode 100644 tests/ui/search_is_some_fixable_none.fixed create mode 100644 tests/ui/search_is_some_fixable_none.rs create mode 100644 tests/ui/search_is_some_fixable_none.stderr create mode 100644 tests/ui/search_is_some_fixable_some.fixed create mode 100644 tests/ui/search_is_some_fixable_some.rs create mode 100644 tests/ui/search_is_some_fixable_some.stderr create mode 100644 tests/ui/strlen_on_c_strings.fixed diff --git a/.github/ISSUE_TEMPLATE/blank_issue.md b/.github/ISSUE_TEMPLATE/blank_issue.md deleted file mode 100644 index 866303a1f9fd5..0000000000000 --- a/.github/ISSUE_TEMPLATE/blank_issue.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Blank Issue -about: Create a blank issue. ---- - - - diff --git a/.github/ISSUE_TEMPLATE/blank_issue.yml b/.github/ISSUE_TEMPLATE/blank_issue.yml new file mode 100644 index 0000000000000..d610e8c7bc478 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/blank_issue.yml @@ -0,0 +1,44 @@ +name: Blank Issue +description: Create a blank issue. +body: + - type: markdown + attributes: + value: Thank you for filing an issue! + - type: textarea + id: problem + attributes: + label: Description + description: > + Please provide a discription of the issue, along with any information + you feel relevant to replicate it. + validations: + required: true + - type: textarea + id: version + attributes: + label: Version + description: "Rust version (`rustc -Vv`)" + placeholder: | + rustc 1.46.0-nightly (f455e46ea 2020-06-20) + binary: rustc + commit-hash: f455e46eae1a227d735091091144601b467e1565 + commit-date: 2020-06-20 + host: x86_64-unknown-linux-gnu + release: 1.46.0-nightly + LLVM version: 10.0 + render: text + - type: textarea + id: labels + attributes: + label: Additional Labels + description: > + Additional labels can be added to this issue by including the following + command + placeholder: | + @rustbot label +