mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 13:43:04 +00:00
Swapping to matches macro.
This commit is contained in:
parent
2f5d1c748a
commit
20548eba6c
@ -47,10 +47,7 @@ impl LateLintPass<'_> for ArcWithNonSendSync {
|
||||
if let ExprKind::Path(func_path) = func.kind;
|
||||
if last_path_segment(&func_path).ident.name == sym::new;
|
||||
if let arg_ty = cx.typeck_results().expr_ty(arg);
|
||||
if match arg_ty.kind() {
|
||||
ty::Param(_) => false,
|
||||
_ => true,
|
||||
};
|
||||
if !matches!(arg_ty.kind(), ty::Param(_));
|
||||
if !cx.tcx
|
||||
.lang_items()
|
||||
.sync_trait()
|
||||
|
Loading…
Reference in New Issue
Block a user