Skip to content

Commit 01be45d

Browse files
committed
a
1 parent bdf13e2 commit 01be45d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/typing_parameter_envs.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ In the large majority of cases, when a `ParamEnv` is required it either already
8383
- 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
8484
- When editing an existing [`TypeRelation`][typerelation] if it implements [`PredicateEmittingRelation`][predicate_emitting_relation] then a [`param_env` method][typerelation_param_env] will be available.
8585

86-
If you aren't sure if there's a `ParamEnv` in scope somewhere that can be used it can be worth opening a thread in the [`#t-compiler/help`](compiler_help) zulip stream where someone may be able to point out where a `ParamEnv` can be acquired from.
86+
If you aren't sure if there's a `ParamEnv` in scope somewhere that can be used it can be worth opening a thread in the [`#t-compiler/help`][compiler_help] zulip stream where someone may be able to point out where a `ParamEnv` can be acquired from.
8787

8888
Manually constructing a `ParamEnv` is typically only needed at the start of some kind of top level analysis (e.g. hir typeck or borrow checking). In such cases there are three ways it can be done:
8989
- Calling the [`tcx.param_env(def_id)` query][param_env_query] which returns the environment associated with a given definition.
@@ -92,7 +92,7 @@ Manually constructing a `ParamEnv` is typically only needed at the start of some
9292

9393
Using the `param_env` query is by far the most common way to construct a `ParamEnv` as most of the time the compiler is performing an analysis as part of some specific definition.
9494

95-
Creating an empty environment with `ParamEnv::empty` is typically only done either in codegen (indirectly via [`TypingEnv::fully_monomorphized`](tenv_mono)), or as part of some analysis that do not expect to ever encounter generic parameters (e.g. various parts of coherence/orphan check).
95+
Creating an empty environment with `ParamEnv::empty` is typically only done either in codegen (indirectly via [`TypingEnv::fully_monomorphized`][tenv_mono]), or as part of some analysis that do not expect to ever encounter generic parameters (e.g. various parts of coherence/orphan check).
9696

9797
Creating an env from an arbitrary set of where clauses is usually unnecessary and should only be done if the environment you need does not correspond to an actual item in the source code (e.g. [`compare_method_predicate_entailment`][method_pred_entailment]).
9898

@@ -153,7 +153,7 @@ fn foo<T: Trait + Trait>() {}
153153
The [next-gen trait solver][next-gen-solver] also requires this elaboration to take place.
154154

155155
[elaborate]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/traits/util/fn.elaborate.html
156-
[next-gen-solver]: ../solve/trait-solving.md
156+
[next-gen-solver]: ./solve/trait-solving.md
157157

158158
#### Normalizing all bounds
159159

0 commit comments

Comments
 (0)