Skip to content

Commit 6edbbd3

Browse files
committed
fix tooling
1 parent feb1303 commit 6edbbd3

File tree

6 files changed

+3
-17
lines changed

6 files changed

+3
-17
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,6 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T
18411841
// Rustdoc handles `TyKind::Err`s by turning them into `Type::Infer`s.
18421842
TyKind::Infer(())
18431843
| TyKind::Err(_)
1844-
| TyKind::Typeof(..)
18451844
| TyKind::InferDelegation(..)
18461845
| TyKind::TraitAscription(_) => Infer,
18471846
}

src/tools/clippy/clippy_lints/src/dereference.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,6 @@ impl TyCoercionStability {
830830
TyKind::OpaqueDef(..)
831831
| TyKind::TraitAscription(..)
832832
| TyKind::Infer(())
833-
| TyKind::Typeof(..)
834833
| TyKind::TraitObject(..)
835834
| TyKind::InferDelegation(..)
836835
| TyKind::Err(_) => Self::Reborrow,
@@ -911,7 +910,7 @@ fn ty_contains_infer(ty: &hir::Ty<'_>) -> bool {
911910
}
912911

913912
fn visit_ty(&mut self, ty: &hir::Ty<'_, AmbigArg>) {
914-
if self.0 || matches!(ty.kind, TyKind::OpaqueDef(..) | TyKind::Typeof(_) | TyKind::Err(_)) {
913+
if self.0 || matches!(ty.kind, TyKind::OpaqueDef(..) | TyKind::Err(_)) {
915914
self.0 = true;
916915
} else {
917916
walk_ty(self, ty);

src/tools/clippy/clippy_utils/src/ast_utils/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,6 @@ pub fn eq_ty(l: &Ty, r: &Ty) -> bool {
875875
(Path(lq, lp), Path(rq, rp)) => both(lq.as_deref(), rq.as_deref(), eq_qself) && eq_path(lp, rp),
876876
(TraitObject(lg, ls), TraitObject(rg, rs)) => ls == rs && over(lg, rg, eq_generic_bound),
877877
(ImplTrait(_, lg), ImplTrait(_, rg)) => over(lg, rg, eq_generic_bound),
878-
(Typeof(l), Typeof(r)) => eq_expr(&l.value, &r.value),
879878
(MacCall(l), MacCall(r)) => eq_mac_call(l, r),
880879
_ => false,
881880
}

src/tools/clippy/clippy_utils/src/check_proc_macro.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,10 @@ fn ast_ty_search_pat(ty: &ast::Ty) -> (Pat, Pat) {
524524
TyKind::ImplicitSelf
525525

526526
// experimental
527-
|TyKind::Pat(..)
527+
| TyKind::Pat(..)
528528

529529
// unused
530530
| TyKind::CVarArgs
531-
| TyKind::Typeof(_)
532531

533532
// placeholder
534533
| TyKind::Dummy

src/tools/clippy/clippy_utils/src/hir_utils.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,9 +1309,6 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
13091309
TyKind::TraitObject(_, lifetime) => {
13101310
self.hash_lifetime(lifetime);
13111311
},
1312-
TyKind::Typeof(anon_const) => {
1313-
self.hash_body(anon_const.body);
1314-
},
13151312
TyKind::UnsafeBinder(binder) => {
13161313
self.hash_ty(binder.inner_ty);
13171314
},

src/tools/rustfmt/src/types.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::comment::{combine_strs_with_missing_comments, contains_comment};
88
use crate::config::lists::*;
99
use crate::config::{IndentStyle, StyleEdition, TypeDensity};
1010
use crate::expr::{
11-
ExprType, RhsAssignKind, format_expr, rewrite_assign_rhs, rewrite_call, rewrite_tuple,
11+
ExprType, RhsAssignKind, format_expr, rewrite_assign_rhs, rewrite_tuple,
1212
rewrite_unary_prefix,
1313
};
1414
use crate::lists::{
@@ -1031,13 +1031,6 @@ impl Rewrite for ast::Ty {
10311031
}
10321032
ast::TyKind::CVarArgs => Ok("...".to_owned()),
10331033
ast::TyKind::Dummy | ast::TyKind::Err(_) => Ok(context.snippet(self.span).to_owned()),
1034-
ast::TyKind::Typeof(ref anon_const) => rewrite_call(
1035-
context,
1036-
"typeof",
1037-
&[anon_const.value.clone()],
1038-
self.span,
1039-
shape,
1040-
),
10411034
ast::TyKind::Pat(ref ty, ref pat) => {
10421035
let ty = ty.rewrite_result(context, shape)?;
10431036
let pat = pat.rewrite_result(context, shape)?;

0 commit comments

Comments
 (0)