Fix dogfood
This commit is contained in:
parent
85c1f74fef
commit
5e2a2d3ac9
@ -413,7 +413,7 @@ fn remove_impl_lint_pass(lint_name_upper: &str, content: &mut String) {
|
|||||||
.find("declare_lint_pass!")
|
.find("declare_lint_pass!")
|
||||||
.unwrap_or_else(|| panic!("failed to find `impl_lint_pass`"))
|
.unwrap_or_else(|| panic!("failed to find `impl_lint_pass`"))
|
||||||
});
|
});
|
||||||
let mut impl_lint_pass_end = (&content[impl_lint_pass_start..])
|
let mut impl_lint_pass_end = content[impl_lint_pass_start..]
|
||||||
.find(']')
|
.find(']')
|
||||||
.expect("failed to find `impl_lint_pass` terminator");
|
.expect("failed to find `impl_lint_pass` terminator");
|
||||||
|
|
||||||
|
@ -911,7 +911,18 @@ fn param_auto_deref_stability(ty: Ty<'_>, precedence: i8) -> Position {
|
|||||||
ty = ref_ty;
|
ty = ref_ty;
|
||||||
continue;
|
continue;
|
||||||
},
|
},
|
||||||
ty::Bool
|
ty::Infer(_)
|
||||||
|
| ty::Error(_)
|
||||||
|
| ty::Param(_)
|
||||||
|
| ty::Bound(..)
|
||||||
|
| ty::Opaque(..)
|
||||||
|
| ty::Placeholder(_)
|
||||||
|
| ty::Dynamic(..) => Position::ReborrowStable(precedence),
|
||||||
|
ty::Adt(..) if ty.has_placeholders() || ty.has_param_types_or_consts() => {
|
||||||
|
Position::ReborrowStable(precedence)
|
||||||
|
},
|
||||||
|
ty::Adt(..)
|
||||||
|
| ty::Bool
|
||||||
| ty::Char
|
| ty::Char
|
||||||
| ty::Int(_)
|
| ty::Int(_)
|
||||||
| ty::Uint(_)
|
| ty::Uint(_)
|
||||||
@ -929,17 +940,6 @@ fn param_auto_deref_stability(ty: Ty<'_>, precedence: i8) -> Position {
|
|||||||
| ty::Never
|
| ty::Never
|
||||||
| ty::Tuple(_)
|
| ty::Tuple(_)
|
||||||
| ty::Projection(_) => Position::DerefStable(precedence),
|
| ty::Projection(_) => Position::DerefStable(precedence),
|
||||||
ty::Infer(_)
|
|
||||||
| ty::Error(_)
|
|
||||||
| ty::Param(_)
|
|
||||||
| ty::Bound(..)
|
|
||||||
| ty::Opaque(..)
|
|
||||||
| ty::Placeholder(_)
|
|
||||||
| ty::Dynamic(..) => Position::ReborrowStable(precedence),
|
|
||||||
ty::Adt(..) if ty.has_placeholders() || ty.has_param_types_or_consts() => {
|
|
||||||
Position::ReborrowStable(precedence)
|
|
||||||
},
|
|
||||||
ty::Adt(..) => Position::DerefStable(precedence),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -952,7 +952,7 @@ fn ty_contains_field(ty: Ty<'_>, name: Symbol) -> bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[expect(clippy::needless_pass_by_value)]
|
#[expect(clippy::needless_pass_by_value, clippy::too_many_lines)]
|
||||||
fn report<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, state: State, data: StateData) {
|
fn report<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, state: State, data: StateData) {
|
||||||
match state {
|
match state {
|
||||||
State::DerefMethod {
|
State::DerefMethod {
|
||||||
|
@ -285,7 +285,7 @@ fn from_pat(cx: &LateContext<'_>, arena: &'a DroplessArena, pat: &'a Pat<'_>) ->
|
|||||||
// TODO: Handle negative integers. They're currently treated as a wild match.
|
// TODO: Handle negative integers. They're currently treated as a wild match.
|
||||||
ExprKind::Lit(lit) => match lit.node {
|
ExprKind::Lit(lit) => match lit.node {
|
||||||
LitKind::Str(sym, _) => Self::LitStr(sym),
|
LitKind::Str(sym, _) => Self::LitStr(sym),
|
||||||
LitKind::ByteStr(ref bytes) => Self::LitBytes(&**bytes),
|
LitKind::ByteStr(ref bytes) => Self::LitBytes(bytes),
|
||||||
LitKind::Byte(val) => Self::LitInt(val.into()),
|
LitKind::Byte(val) => Self::LitInt(val.into()),
|
||||||
LitKind::Char(val) => Self::LitInt(val.into()),
|
LitKind::Char(val) => Self::LitInt(val.into()),
|
||||||
LitKind::Int(val, _) => Self::LitInt(val),
|
LitKind::Int(val, _) => Self::LitInt(val),
|
||||||
|
@ -55,7 +55,7 @@ pub(crate) fn check<'a>(cx: &LateContext<'a>, ex: &Expr<'a>, arms: &[Arm<'_>], e
|
|||||||
cx,
|
cx,
|
||||||
(ex, expr),
|
(ex, expr),
|
||||||
(bind_names, matched_vars),
|
(bind_names, matched_vars),
|
||||||
&*snippet_body,
|
&snippet_body,
|
||||||
&mut applicability,
|
&mut applicability,
|
||||||
Some(span),
|
Some(span),
|
||||||
);
|
);
|
||||||
@ -88,7 +88,7 @@ pub(crate) fn check<'a>(cx: &LateContext<'a>, ex: &Expr<'a>, arms: &[Arm<'_>], e
|
|||||||
cx,
|
cx,
|
||||||
(ex, expr),
|
(ex, expr),
|
||||||
(bind_names, matched_vars),
|
(bind_names, matched_vars),
|
||||||
&*snippet_body,
|
&snippet_body,
|
||||||
&mut applicability,
|
&mut applicability,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user