Skip to content

Commit 379342c

Browse files
committed
Auto merge of #12331 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents d554bca + 8a58b76 commit 379342c

File tree

106 files changed

+528
-600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+528
-600
lines changed

clippy_config/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#![allow(
55
clippy::must_use_candidate,
66
clippy::missing_panics_doc,
7+
rustc::diagnostic_outside_of_impl,
8+
rustc::untranslatable_diagnostic,
79
rustc::untranslatable_diagnostic_trivial
810
)]
911

clippy_lints/src/absolute_paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl LateLintPass<'_> for AbsolutePaths {
6262
} = self;
6363

6464
if !path.span.from_expansion()
65-
&& let Some(node) = cx.tcx.opt_hir_node(hir_id)
65+
&& let node = cx.tcx.hir_node(hir_id)
6666
&& !matches!(node, Node::Item(item) if matches!(item.kind, ItemKind::Use(_, _)))
6767
&& let [first, rest @ ..] = path.segments
6868
// Handle `::std`

clippy_lints/src/assertions_on_constants.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants {
4646
return;
4747
};
4848
if let ConstantSource::Constant = source
49-
&& let Some(node) = cx.tcx.hir().find_parent(e.hir_id)
5049
&& let Node::Item(Item {
5150
kind: ItemKind::Const(..),
5251
..
53-
}) = node
52+
}) = cx.tcx.parent_hir_node(e.hir_id)
5453
{
5554
return;
5655
}

clippy_lints/src/attrs.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,9 +1000,7 @@ fn check_clippy_cfg_attr(
10001000
) {
10011001
if cfg_attr.has_name(sym::clippy)
10021002
&& let Some(ident) = behind_cfg_attr.ident()
1003-
// FIXME: replace with `from_symbol` once https://github.com/rust-lang/rust/pull/121230
1004-
// is merged.
1005-
&& Level::from_str(ident.name.as_str()).is_some()
1003+
&& Level::from_symbol(ident.name, Some(attr.id)).is_some()
10061004
&& let Some(items) = behind_cfg_attr.meta_item_list()
10071005
{
10081006
let nb_items = items.len();

clippy_lints/src/box_default.rs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,22 @@ impl<'tcx> Visitor<'tcx> for InferVisitor {
101101

102102
fn given_type(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
103103
match get_parent_node(cx.tcx, expr.hir_id) {
104-
Some(Node::Local(Local { ty: Some(ty), .. })) => {
104+
Node::Local(Local { ty: Some(ty), .. }) => {
105105
let mut v = InferVisitor::default();
106106
v.visit_ty(ty);
107107
!v.0
108108
},
109-
Some(
110-
Node::Expr(Expr {
109+
Node::Expr(Expr {
110+
kind: ExprKind::Call(path, args),
111+
..
112+
})
113+
| Node::Block(Block {
114+
expr: Some(Expr {
111115
kind: ExprKind::Call(path, args),
112116
..
113-
})
114-
| Node::Block(Block {
115-
expr:
116-
Some(Expr {
117-
kind: ExprKind::Call(path, args),
118-
..
119-
}),
120-
..
121117
}),
122-
) => {
118+
..
119+
}) => {
123120
if let Some(index) = args.iter().position(|arg| arg.hir_id == expr.hir_id)
124121
&& let Some(sig) = expr_sig(cx, path)
125122
&& let Some(input) = sig.input(index)

clippy_lints/src/casts/cast_possible_truncation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use clippy_utils::expr_or_init;
44
use clippy_utils::source::snippet;
55
use clippy_utils::sugg::Sugg;
66
use clippy_utils::ty::{get_discriminant_value, is_isize_or_usize};
7-
use rustc_errors::{Applicability, Diagnostic, SuggestionStyle};
7+
use rustc_errors::{Applicability, DiagnosticBuilder, SuggestionStyle};
88
use rustc_hir::def::{DefKind, Res};
99
use rustc_hir::{BinOpKind, Expr, ExprKind};
1010
use rustc_lint::LateContext;
@@ -176,7 +176,7 @@ fn offer_suggestion(
176176
expr: &Expr<'_>,
177177
cast_expr: &Expr<'_>,
178178
cast_to_span: Span,
179-
diag: &mut Diagnostic,
179+
diag: &mut DiagnosticBuilder<'_, ()>,
180180
) {
181181
let cast_to_snip = snippet(cx, cast_to_span, "..");
182182
let suggestion = if cast_to_snip == "_" {

clippy_lints/src/casts/cast_slice_different_sizes.rs

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,20 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>, msrv: &Msrv
6767
}
6868

6969
fn is_child_of_cast(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
70-
let map = cx.tcx.hir();
71-
if let Some(parent_id) = map.opt_parent_id(expr.hir_id)
72-
&& let Some(parent) = cx.tcx.opt_hir_node(parent_id)
73-
{
74-
let expr = match parent {
75-
Node::Block(block) => {
76-
if let Some(parent_expr) = block.expr {
77-
parent_expr
78-
} else {
79-
return false;
80-
}
81-
},
82-
Node::Expr(expr) => expr,
83-
_ => return false,
84-
};
70+
let parent = cx.tcx.parent_hir_node(expr.hir_id);
71+
let expr = match parent {
72+
Node::Block(block) => {
73+
if let Some(parent_expr) = block.expr {
74+
parent_expr
75+
} else {
76+
return false;
77+
}
78+
},
79+
Node::Expr(expr) => expr,
80+
_ => return false,
81+
};
8582

86-
matches!(expr.kind, ExprKind::Cast(..))
87-
} else {
88-
false
89-
}
83+
matches!(expr.kind, ExprKind::Cast(..))
9084
}
9185

9286
/// Returns the type T of the pointed to *const [T] or *mut [T] and the mutability of the slice if

clippy_lints/src/casts/unnecessary_cast.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub(super) fn check<'tcx>(
6565
&& let ExprKind::Path(qpath) = inner.kind
6666
&& let QPath::Resolved(None, Path { res, .. }) = qpath
6767
&& let Res::Local(hir_id) = res
68-
&& let parent = cx.tcx.hir().get_parent(*hir_id)
68+
&& let parent = cx.tcx.parent_hir_node(*hir_id)
6969
&& let Node::Local(local) = parent
7070
{
7171
if let Some(ty) = local.ty
@@ -144,8 +144,7 @@ pub(super) fn check<'tcx>(
144144

145145
if cast_from.kind() == cast_to.kind() && !in_external_macro(cx.sess(), expr.span) {
146146
if let Some(id) = path_to_local(cast_expr)
147-
&& let Some(span) = cx.tcx.hir().opt_span(id)
148-
&& !span.eq_ctxt(cast_expr.span)
147+
&& !cx.tcx.hir().span(id).eq_ctxt(cast_expr.span)
149148
{
150149
// Binding context is different than the identifiers context.
151150
// Weird macro wizardry could be involved here.
@@ -265,8 +264,7 @@ fn is_cast_from_ty_alias<'tcx>(cx: &LateContext<'tcx>, expr: impl Visitable<'tcx
265264
}
266265
// Local usage
267266
} else if let Res::Local(hir_id) = res
268-
&& let Some(parent) = get_parent_node(cx.tcx, hir_id)
269-
&& let Node::Local(l) = parent
267+
&& let Node::Local(l) = get_parent_node(cx.tcx, hir_id)
270268
{
271269
if let Some(e) = l.init
272270
&& is_cast_from_ty_alias(cx, e, cast_from)

clippy_lints/src/collection_is_never_read.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn has_no_read_access<'tcx>(cx: &LateContext<'tcx>, id: HirId, block: &'tcx Bloc
9494
// `id` appearing in the left-hand side of an assignment is not a read access:
9595
//
9696
// id = ...; // Not reading `id`.
97-
if let Some(Node::Expr(parent)) = get_parent_node(cx.tcx, expr.hir_id)
97+
if let Node::Expr(parent) = get_parent_node(cx.tcx, expr.hir_id)
9898
&& let ExprKind::Assign(lhs, ..) = parent.kind
9999
&& path_to_local_id(lhs, id)
100100
{
@@ -108,7 +108,7 @@ fn has_no_read_access<'tcx>(cx: &LateContext<'tcx>, id: HirId, block: &'tcx Bloc
108108
// Only assuming this for "official" methods defined on the type. For methods defined in extension
109109
// traits (identified as local, based on the orphan rule), pessimistically assume that they might
110110
// have side effects, so consider them a read.
111-
if let Some(Node::Expr(parent)) = get_parent_node(cx.tcx, expr.hir_id)
111+
if let Node::Expr(parent) = get_parent_node(cx.tcx, expr.hir_id)
112112
&& let ExprKind::MethodCall(_, receiver, _, _) = parent.kind
113113
&& path_to_local_id(receiver, id)
114114
&& let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(parent.hir_id)
@@ -117,7 +117,7 @@ fn has_no_read_access<'tcx>(cx: &LateContext<'tcx>, id: HirId, block: &'tcx Bloc
117117
// The method call is a statement, so the return value is not used. That's not a read access:
118118
//
119119
// id.foo(args);
120-
if let Some(Node::Stmt(..)) = get_parent_node(cx.tcx, parent.hir_id) {
120+
if let Node::Stmt(..) = get_parent_node(cx.tcx, parent.hir_id) {
121121
return ControlFlow::Continue(());
122122
}
123123

clippy_lints/src/copies.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ fn scan_block_for_eq<'tcx>(
511511
for stmt in &stmts[stmts.len() - init..=stmts.len() - offset] {
512512
if let StmtKind::Local(l) = stmt.kind {
513513
l.pat.each_binding_or_first(&mut |_, id, _, _| {
514-
eq.locals.remove(&id);
514+
// FIXME(rust/#120456) - is `swap_remove` correct?
515+
eq.locals.swap_remove(&id);
515516
});
516517
}
517518
}

clippy_lints/src/dbg_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl LateLintPass<'_> for DbgMacro {
6363
ExprKind::Block(..) => {
6464
// If the `dbg!` macro is a "free" statement and not contained within other expressions,
6565
// remove the whole statement.
66-
if let Some(Node::Stmt(_)) = cx.tcx.hir().find_parent(expr.hir_id)
66+
if let Node::Stmt(_) = cx.tcx.parent_hir_node(expr.hir_id)
6767
&& let Some(semi_span) = cx.sess().source_map().mac_call_stmt_semi_span(macro_call.span)
6868
{
6969
(macro_call.span.to(semi_span), String::new())

clippy_lints/src/default.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl<'tcx> LateLintPass<'tcx> for Default {
131131
// only when assigning `... = Default::default()`
132132
&& is_expr_default(expr, cx)
133133
&& let binding_type = cx.typeck_results().node_type(binding_id)
134-
&& let Some(adt) = binding_type.ty_adt_def()
134+
&& let ty::Adt(adt, args) = *binding_type.kind()
135135
&& adt.is_struct()
136136
&& let variant = adt.non_enum_variant()
137137
&& (adt.did().is_local() || !variant.is_field_list_non_exhaustive())
@@ -144,7 +144,7 @@ impl<'tcx> LateLintPass<'tcx> for Default {
144144
.fields
145145
.iter()
146146
.all(|field| {
147-
is_copy(cx, cx.tcx.type_of(field.did).instantiate_identity())
147+
is_copy(cx, cx.tcx.type_of(field.did).instantiate(cx.tcx, args))
148148
})
149149
&& (!has_drop(cx, binding_type) || all_fields_are_copy)
150150
{

clippy_lints/src/default_numeric_fallback.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> {
128128
},
129129
_,
130130
) => {
131-
if let Some(parent) = self.cx.tcx.hir().find_parent(expr.hir_id)
132-
&& let Some(fn_sig) = parent.fn_sig()
131+
if let Some(fn_sig) = self.cx.tcx.parent_hir_node(expr.hir_id).fn_sig()
133132
&& let FnRetTy::Return(_ty) = fn_sig.decl.output
134133
{
135134
// We cannot check the exact type since it's a `hir::Ty`` which does not implement `is_numeric`

clippy_lints/src/dereference.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ impl TyCoercionStability {
831831
| TyKind::Typeof(..)
832832
| TyKind::TraitObject(..)
833833
| TyKind::InferDelegation(..)
834+
| TyKind::AnonAdt(..)
834835
| TyKind::Err(_) => Self::Reborrow,
835836
};
836837
}
@@ -1008,7 +1009,7 @@ fn report<'tcx>(
10081009
state.msg,
10091010
|diag| {
10101011
let (precedence, calls_field) = match get_parent_node(cx.tcx, data.first_expr.hir_id) {
1011-
Some(Node::Expr(e)) => match e.kind {
1012+
Node::Expr(e) => match e.kind {
10121013
ExprKind::Call(callee, _) if callee.hir_id != data.first_expr.hir_id => (0, false),
10131014
ExprKind::Call(..) => (PREC_POSTFIX, matches!(expr.kind, ExprKind::Field(..))),
10141015
_ => (e.precedence().order(), false),
@@ -1088,7 +1089,7 @@ fn report<'tcx>(
10881089
//
10891090
// e.g. `&mut x.y.z` where `x` is a union, and accessing `z` requires a
10901091
// deref through `ManuallyDrop<_>` will not compile.
1091-
let parent_id = cx.tcx.hir().parent_id(expr.hir_id);
1092+
let parent_id = cx.tcx.parent_hir_id(expr.hir_id);
10921093
if parent_id == data.first_expr.hir_id {
10931094
return;
10941095
}

clippy_lints/src/derivable_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl<'tcx> LateLintPass<'tcx> for DerivableImpls {
195195
&& let Some(def_id) = trait_ref.trait_def_id()
196196
&& cx.tcx.is_diagnostic_item(sym::Default, def_id)
197197
&& let impl_item_hir = child.id.hir_id()
198-
&& let Some(Node::ImplItem(impl_item)) = cx.tcx.opt_hir_node(impl_item_hir)
198+
&& let Node::ImplItem(impl_item) = cx.tcx.hir_node(impl_item_hir)
199199
&& let ImplItemKind::Fn(_, b) = &impl_item.kind
200200
&& let Body { value: func_expr, .. } = cx.tcx.hir().body(*b)
201201
&& let &Adt(adt_def, args) = cx.tcx.type_of(item.owner_id).instantiate_identity().kind()

clippy_lints/src/disallowed_macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use clippy_utils::diagnostics::{span_lint_and_then, span_lint_hir_and_then};
33
use clippy_utils::macros::macro_backtrace;
44
use rustc_ast::Attribute;
55
use rustc_data_structures::fx::FxHashSet;
6-
use rustc_errors::Diagnostic;
6+
use rustc_errors::DiagnosticBuilder;
77
use rustc_hir::def_id::DefIdMap;
88
use rustc_hir::{
99
Expr, ExprKind, ForeignItem, HirId, ImplItem, Item, ItemKind, OwnerId, Pat, Path, Stmt, TraitItem, Ty,
@@ -89,7 +89,7 @@ impl DisallowedMacros {
8989
if let Some(&index) = self.disallowed.get(&mac.def_id) {
9090
let conf = &self.conf_disallowed[index];
9191
let msg = format!("use of a disallowed macro `{}`", conf.path());
92-
let add_note = |diag: &mut Diagnostic| {
92+
let add_note = |diag: &mut DiagnosticBuilder<'_, _>| {
9393
if let Some(reason) = conf.reason() {
9494
diag.note(reason);
9595
}

clippy_lints/src/drop_forget_ref.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetRef {
144144
// }
145145
fn is_single_call_in_arm<'tcx>(cx: &LateContext<'tcx>, arg: &'tcx Expr<'_>, drop_expr: &'tcx Expr<'_>) -> bool {
146146
if matches!(arg.kind, ExprKind::Call(..) | ExprKind::MethodCall(..)) {
147-
let parent_node = get_parent_node(cx.tcx, drop_expr.hir_id);
148-
if let Some(Node::Arm(Arm { body, .. })) = &parent_node {
147+
if let Node::Arm(Arm { body, .. }) = get_parent_node(cx.tcx, drop_expr.hir_id) {
149148
return body.hir_id == drop_expr.hir_id;
150149
}
151150
}

clippy_lints/src/empty_drop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl LateLintPass<'_> for EmptyDrop {
4242
}) = item.kind
4343
&& trait_ref.trait_def_id() == cx.tcx.lang_items().drop_trait()
4444
&& let impl_item_hir = child.id.hir_id()
45-
&& let Some(Node::ImplItem(impl_item)) = cx.tcx.opt_hir_node(impl_item_hir)
45+
&& let Node::ImplItem(impl_item) = cx.tcx.hir_node(impl_item_hir)
4646
&& let ImplItemKind::Fn(_, b) = &impl_item.kind
4747
&& let Body { value: func_expr, .. } = cx.tcx.hir().body(*b)
4848
&& let func_expr = peel_blocks(func_expr)

clippy_lints/src/escape.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,30 +123,32 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
123123

124124
// TODO: Replace with Map::is_argument(..) when it's fixed
125125
fn is_argument(tcx: TyCtxt<'_>, id: HirId) -> bool {
126-
match tcx.opt_hir_node(id) {
127-
Some(Node::Pat(Pat {
126+
match tcx.hir_node(id) {
127+
Node::Pat(Pat {
128128
kind: PatKind::Binding(..),
129129
..
130-
})) => (),
130+
}) => (),
131131
_ => return false,
132132
}
133133

134-
matches!(tcx.hir().find_parent(id), Some(Node::Param(_)))
134+
matches!(tcx.parent_hir_node(id), Node::Param(_))
135135
}
136136

137137
impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
138138
fn consume(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId) {
139139
if cmt.place.projections.is_empty() {
140140
if let PlaceBase::Local(lid) = cmt.place.base {
141-
self.set.remove(&lid);
141+
// FIXME(rust/#120456) - is `swap_remove` correct?
142+
self.set.swap_remove(&lid);
142143
}
143144
}
144145
}
145146

146147
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) {
147148
if cmt.place.projections.is_empty() {
148149
if let PlaceBase::Local(lid) = cmt.place.base {
149-
self.set.remove(&lid);
150+
// FIXME(rust/#120456) - is `swap_remove` correct?
151+
self.set.swap_remove(&lid);
150152
}
151153
}
152154
}
@@ -156,8 +158,8 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
156158
let map = &self.cx.tcx.hir();
157159
if is_argument(self.cx.tcx, cmt.hir_id) {
158160
// Skip closure arguments
159-
let parent_id = map.parent_id(cmt.hir_id);
160-
if let Some(Node::Expr(..)) = map.find_parent(parent_id) {
161+
let parent_id = self.cx.tcx.parent_hir_id(cmt.hir_id);
162+
if let Node::Expr(..) = self.cx.tcx.parent_hir_node(parent_id) {
161163
return;
162164
}
163165

clippy_lints/src/explicit_write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fn look_in_block<'tcx, 'hir>(cx: &LateContext<'tcx>, kind: &'tcx ExprKind<'hir>)
111111
// Find id of the local that expr_end_of_block resolves to
112112
&& let ExprKind::Path(QPath::Resolved(None, expr_path)) = expr_end_of_block.kind
113113
&& let Res::Local(expr_res) = expr_path.res
114-
&& let Some(Node::Pat(res_pat)) = cx.tcx.opt_hir_node(expr_res)
114+
&& let Node::Pat(res_pat) = cx.tcx.hir_node(expr_res)
115115

116116
// Find id of the local we found in the block
117117
&& let PatKind::Binding(BindingAnnotation::NONE, local_hir_id, _ident, None) = local.pat.kind

clippy_lints/src/functions/impl_trait_in_params.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub(super) fn check_fn<'tcx>(cx: &LateContext<'_>, kind: &'tcx FnKind<'_>, body:
5353

5454
pub(super) fn check_impl_item(cx: &LateContext<'_>, impl_item: &ImplItem<'_>) {
5555
if let ImplItemKind::Fn(_, body_id) = impl_item.kind
56-
&& let hir::Node::Item(item) = cx.tcx.hir().get_parent(impl_item.hir_id())
56+
&& let hir::Node::Item(item) = cx.tcx.parent_hir_node(impl_item.hir_id())
5757
&& let hir::ItemKind::Impl(impl_) = item.kind
5858
&& let hir::Impl { of_trait, .. } = *impl_
5959
&& of_trait.is_none()
@@ -72,7 +72,7 @@ pub(super) fn check_impl_item(cx: &LateContext<'_>, impl_item: &ImplItem<'_>) {
7272
pub(super) fn check_trait_item(cx: &LateContext<'_>, trait_item: &TraitItem<'_>, avoid_breaking_exported_api: bool) {
7373
if !avoid_breaking_exported_api
7474
&& let TraitItemKind::Fn(_, _) = trait_item.kind
75-
&& let hir::Node::Item(item) = cx.tcx.hir().get_parent(trait_item.hir_id())
75+
&& let hir::Node::Item(item) = cx.tcx.parent_hir_node(trait_item.hir_id())
7676
// ^^ (Will always be a trait)
7777
&& !item.vis_span.is_empty() // Is public
7878
&& !is_in_test_function(cx.tcx, trait_item.hir_id())

0 commit comments

Comments
 (0)