Skip to content

Commit 6b67e10

Browse files
committed
fixup rustdoc,clippy,rustfmt
1 parent 492891e commit 6b67e10

3 files changed

Lines changed: 16 additions & 19 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
}
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: match is not exhaustive
2-
--> $DIR/must_match_exhaustively.rs:22:11
2+
--> $DIR/must_match_exhaustively.rs:21:11
33
|
44
LL | #[rustc_must_match_exhaustively]
55
| -------------------------------- required because of this attribute
@@ -9,7 +9,7 @@ LL | match f {
99
|
1010
= help: explicitly list all variants of the enum in a `match`
1111
note: because of this wildcard pattern
12-
--> $DIR/must_match_exhaustively.rs:25:9
12+
--> $DIR/must_match_exhaustively.rs:24:9
1313
|
1414
LL | _ => {}
1515
| ^
@@ -20,7 +20,7 @@ LL | #![deny(rustc::rustc_must_match_exhaustively)]
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2121

2222
error: match is not exhaustive
23-
--> $DIR/must_match_exhaustively.rs:28:11
23+
--> $DIR/must_match_exhaustively.rs:27:11
2424
|
2525
LL | #[rustc_must_match_exhaustively]
2626
| -------------------------------- required because of this attribute
@@ -30,13 +30,13 @@ LL | match f {
3030
|
3131
= help: explicitly list all variants of the enum in a `match`
3232
note: because of this variable binding
33-
--> $DIR/must_match_exhaustively.rs:31:9
33+
--> $DIR/must_match_exhaustively.rs:30:9
3434
|
3535
LL | a => {}
3636
| ^
3737

3838
error: match is not exhaustive
39-
--> $DIR/must_match_exhaustively.rs:34:11
39+
--> $DIR/must_match_exhaustively.rs:33:11
4040
|
4141
LL | #[rustc_must_match_exhaustively]
4242
| -------------------------------- required because of this attribute
@@ -46,26 +46,26 @@ LL | match &f {
4646
|
4747
= help: explicitly list all variants of the enum in a `match`
4848
note: because of this variable binding
49-
--> $DIR/must_match_exhaustively.rs:37:9
49+
--> $DIR/must_match_exhaustively.rs:36:9
5050
|
5151
LL | a => {}
5252
| ^
5353

5454
error: match is not exhaustive
55-
--> $DIR/must_match_exhaustively.rs:45:8
55+
--> $DIR/must_match_exhaustively.rs:44:8
5656
|
5757
LL | #[rustc_must_match_exhaustively]
5858
| -------------------------------- required because of this attribute
5959
...
60-
LL | if let Foo::A {..} = f {}
61-
| ^^^^^^^^^^^^^^^^^^^
60+
LL | if let Foo::A { .. } = f {}
61+
| ^^^^^^^^^^^^^^^^^^^^^
6262
|
6363
= help: explicitly list all variants of the enum in a `match`
6464
note: using if let only matches on one variant (try using `match`)
65-
--> $DIR/must_match_exhaustively.rs:45:8
65+
--> $DIR/must_match_exhaustively.rs:44:8
6666
|
67-
LL | if let Foo::A {..} = f {}
68-
| ^^^^^^^^^^^^^^^^^^^
67+
LL | if let Foo::A { .. } = f {}
68+
| ^^^^^^^^^^^^^^^^^^^^^
6969

7070
error: aborting due to 4 previous errors
7171

0 commit comments

Comments
 (0)