Auto merge of #13295 - waywardmonkeys:fix-2-typos, r=xFrednet
Fix a couple of typos. changelog: none
This commit is contained in:
commit
a83146aea9
@ -399,7 +399,7 @@ fn check_final_expr<'tcx>(
|
|||||||
|
|
||||||
// Returns may be used to turn an expression into a statement in rustc's AST.
|
// Returns may be used to turn an expression into a statement in rustc's AST.
|
||||||
// This allows the addition of attributes, like `#[allow]` (See: clippy#9361)
|
// This allows the addition of attributes, like `#[allow]` (See: clippy#9361)
|
||||||
// `#[expect(clippy::needless_return)]` needs to be handled separatly to
|
// `#[expect(clippy::needless_return)]` needs to be handled separately to
|
||||||
// actually fulfill the expectation (clippy::#12998)
|
// actually fulfill the expectation (clippy::#12998)
|
||||||
match cx.tcx.hir().attrs(expr.hir_id) {
|
match cx.tcx.hir().attrs(expr.hir_id) {
|
||||||
[] => {},
|
[] => {},
|
||||||
|
@ -229,7 +229,7 @@ fn check_ty(&mut self, cx: &LateContext<'tcx>, hir_ty: &Ty<'tcx>) {
|
|||||||
&& let impl_ty = cx.tcx.type_of(impl_id).instantiate_identity()
|
&& let impl_ty = cx.tcx.type_of(impl_id).instantiate_identity()
|
||||||
&& same_type_and_consts(ty, impl_ty)
|
&& same_type_and_consts(ty, impl_ty)
|
||||||
// Ensure the type we encounter and the one from the impl have the same lifetime parameters. It may be that
|
// Ensure the type we encounter and the one from the impl have the same lifetime parameters. It may be that
|
||||||
// the lifetime parameters of `ty` are ellided (`impl<'a> Foo<'a> { fn new() -> Self { Foo{..} } }`, in
|
// the lifetime parameters of `ty` are elided (`impl<'a> Foo<'a> { fn new() -> Self { Foo{..} } }`, in
|
||||||
// which case we must still trigger the lint.
|
// which case we must still trigger the lint.
|
||||||
&& (has_no_lifetime(ty) || same_lifetimes(ty, impl_ty))
|
&& (has_no_lifetime(ty) || same_lifetimes(ty, impl_ty))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user