Skip to content

Commit afb7472

Browse files
committed
Add a doc comment to infer_projection
1 parent b952ada commit afb7472

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: compiler/rustc_infer/src/infer/projection.rs

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ use super::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
77
use super::InferCtxt;
88

99
impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
10+
/// Instead of normalizing an associated type projection,
11+
/// this function generates an inference variable and registers
12+
/// an obligation that this inference variable must be the result
13+
/// of the given projection. This allows us to proceed with projections
14+
/// while they cannot be resolved yet due to missing information or
15+
/// simply due to the lack of access to the trait resolution machinery.
1016
pub fn infer_projection(
1117
&self,
1218
param_env: ty::ParamEnv<'tcx>,

0 commit comments

Comments
 (0)