diff options
| author | bors <bors@rust-lang.org> | 2024-02-16 00:03:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-16 00:03:46 +0000 |
| commit | cefa14bf2fc4cbc23a0f5e7d1daa04d258f8d62b (patch) | |
| tree | 4afce272f4cc64bd5125481e2503988a4010d18a /src/tools | |
| parent | a4472498d7e88041f6206faf4503eb1f246fd427 (diff) | |
| parent | 2a216bb53bc17cfc4474589accbc8f0f497764ca (diff) | |
| download | rust-cefa14bf2fc4cbc23a0f5e7d1daa04d258f8d62b.tar.gz rust-cefa14bf2fc4cbc23a0f5e7d1daa04d258f8d62b.zip | |
Auto merge of #121169 - GuillaumeGomez:rollup-oxk5d5j, r=GuillaumeGomez
Rollup of 10 pull requests Successful merges: - #120777 (Bump Unicode to version 15.1.0, regenerate tables) - #120971 (Fix comment in core/src/str/validations.rs) - #121095 (Add extra indent spaces for rust-playground link) - #121109 (Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2)) - #121119 (Make `async Fn` trait kind errors better) - #121141 (Fix closure kind docs) - #121145 (Update aarch64 target feature docs to match LLVM) - #121146 (Only point out non-diverging arms for match suggestions) - #121147 (Avoid debug logging entire MIR body) - #121155 (doc: add note about panicking examples for strict_overflow_ops) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/ast_utils.rs | 2 | ||||
| -rw-r--r-- | src/tools/rustfmt/src/types.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_utils/src/ast_utils.rs b/src/tools/clippy/clippy_utils/src/ast_utils.rs index adc35bd82ae..0467a8a6570 100644 --- a/src/tools/clippy/clippy_utils/src/ast_utils.rs +++ b/src/tools/clippy/clippy_utils/src/ast_utils.rs @@ -690,7 +690,7 @@ pub fn eq_ty(l: &Ty, r: &Ty) -> bool { match (&l.kind, &r.kind) { (Paren(l), _) => eq_ty(l, r), (_, Paren(r)) => eq_ty(l, r), - (Never, Never) | (Infer, Infer) | (ImplicitSelf, ImplicitSelf) | (Err, Err) | (CVarArgs, CVarArgs) => true, + (Never, Never) | (Infer, Infer) | (ImplicitSelf, ImplicitSelf) | (Err(_), Err(_)) | (CVarArgs, CVarArgs) => true, (Slice(l), Slice(r)) => eq_ty(l, r), (Array(le, ls), Array(re, rs)) => eq_ty(le, re) && eq_expr(&ls.value, &rs.value), (Ptr(l), Ptr(r)) => l.mutbl == r.mutbl && eq_ty(&l.ty, &r.ty), diff --git a/src/tools/rustfmt/src/types.rs b/src/tools/rustfmt/src/types.rs index 4cd8e6a703e..7f220a456a8 100644 --- a/src/tools/rustfmt/src/types.rs +++ b/src/tools/rustfmt/src/types.rs @@ -859,7 +859,7 @@ impl Rewrite for ast::Ty { }) } ast::TyKind::CVarArgs => Some("...".to_owned()), - ast::TyKind::Err => Some(context.snippet(self.span).to_owned()), + ast::TyKind::Dummy | ast::TyKind::Err(_) => Some(context.snippet(self.span).to_owned()), ast::TyKind::Typeof(ref anon_const) => rewrite_call( context, "typeof", |
