Skip to content

Commit 791b38b

Browse files
committed
fixup rustdoc,clippy,rustfmt
1 parent 4538086 commit 791b38b

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

src/librustdoc/core.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@ impl<'tcx> DocContext<'tcx> {
8787
}
8888

8989
pub(crate) fn typing_env(&self) -> ty::TypingEnv<'tcx> {
90-
ty::TypingEnv {
91-
typing_mode: ty::TypingMode::non_body_analysis(),
92-
param_env: self.param_env,
93-
}
90+
ty::TypingEnv::new(self.param_env, ty::TypingMode::non_body_analysis())
9491
}
9592

9693
/// Call the closure with the given parameters set as

src/tools/clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ fn typing_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) ->
8585
.upcast(tcx)
8686
}),
8787
)));
88-
ty::TypingEnv {
89-
typing_mode: ty::TypingMode::non_body_analysis(),
88+
ty::TypingEnv::new(
9089
param_env,
91-
}
90+
ty::TypingMode::non_body_analysis(),
91+
)
9292
}

0 commit comments

Comments
 (0)