You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/param_env/param_env_acquisition.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ In the large majority of cases a `ParamEnv` when required already exists somewhe
13
13
- During well formedness checking the `WfCheckingCtxt` has a [`param_env` field][wfckctxt_param_env]
14
14
- The `TypeChecker` used by Mir Typeck has a [`param_env` field][mirtypeck_param_env]
15
15
- In the next-gen trait solver all `Goal`s have a [`param_env` field][goal_param_env] specifying what environment to prove the goal in
16
-
- When editing an existing [`TypeRelation`][typerelation] if it implements `ObligationEmittingRelation` then a [`param_env` method][typerelation_param_env] will be available.
16
+
- When editing an existing [`TypeRelation`][typerelation] if it implements `PredicateEmittingRelation` then a [`param_env` method][typerelation_param_env] will be available.
17
17
18
18
Using the `param_env` query to obtain an env is generally done at the start of some kind of analysis and then passed everywhere that a `ParamEnv` is required. For example the type checker will create a `ParamEnv` for the item it is type checking and then pass it around everywhere.
19
19
@@ -27,11 +27,11 @@ The `ParamEnv` type has a method [`ParamEnv::with_reveal_all_normalized`][with_r
@@ -73,4 +73,4 @@ When constructing a `Ty` to represent the `b` parameter's type we need to get th
73
73
The `EarlyBinder` type provides an [`instantiate_identity`] function for discharging the binder when you are "already inside of it". This is effectively a more performant version of writing `EarlyBinder::instantiate(GenericArgs::identity_for_item(..))`. Conceptually this discharges the binder by instantiating it with placeholders in the root universe (we will talk about what this means in the next few chapters). In practice though it simply returns the inner value with no modification taking place.
0 commit comments