Skip to content

Commit 6730e71

Browse files
committed
w
1 parent 69842da commit 6730e71

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_infer/src/infer

1 file changed

+3
-0
lines changed

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,9 @@ impl<'tcx> InferCtxt<'tcx> {
12871287
u
12881288
}
12891289

1290+
/// Extract [ty::TypingMode] of this inference context to get a `TypingEnv`
1291+
/// which contains the necessary information to use the trait system without
1292+
/// using canonicalization or carrying this inference context around.
12901293
pub fn typing_env(&self, param_env: ty::ParamEnv<'tcx>) -> ty::TypingEnv<'tcx> {
12911294
ty::TypingEnv { typing_mode: self.typing_mode(param_env), param_env }
12921295
}

0 commit comments

Comments
 (0)