diff --git a/src/appendix/code-index.md b/src/appendix/code-index.md index 84bdfc18f..a929be867 100644 --- a/src/appendix/code-index.md +++ b/src/appendix/code-index.md @@ -27,7 +27,7 @@ Item | Kind | Short description | Chapter | `StringReader` | struct | This is the lexer used during parsing. It consumes characters from the raw source code being compiled and produces a series of tokens for use by the rest of the parser | [The parser] | [compiler/rustc_parse/src/lexer/mod.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/lexer/struct.StringReader.html) `rustc_ast::token_stream::TokenStream` | struct | An abstract sequence of tokens, organized into `TokenTree`s | [The parser], [Macro expansion] | [compiler/rustc_ast/src/tokenstream.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/tokenstream/struct.TokenStream.html) `TraitDef` | struct | This struct contains a trait's definition with type information | [The `ty` modules] | [compiler/rustc_middle/src/ty/trait_def.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait_def/struct.TraitDef.html) -`TraitRef` | struct | The combination of a trait and its input types (e.g. `P0: Trait`) | [Trait Solving: Goals and Clauses] | [compiler/rustc_middle/src/ty/sty.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TraitRef.html) +`TraitRef` | struct | The combination of a trait and its input types (e.g. `P0: Trait`) | [Trait Solving: Goals and Clauses] | [compiler/rustc_middle/src/ty/sty.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.TraitRef.html) `Ty<'tcx>` | struct | This is the internal representation of a type used for type checking | [Type checking] | [compiler/rustc_middle/src/ty/mod.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Ty.html) `TyCtxt<'tcx>` | struct | The "typing context". This is the central data structure in the compiler. It is the context that you use to perform all manner of queries | [The `ty` modules] | [compiler/rustc_middle/src/ty/context.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html) diff --git a/src/backend/implicit-caller-location.md b/src/backend/implicit-caller-location.md index cf100a2e5..17158497d 100644 --- a/src/backend/implicit-caller-location.md +++ b/src/backend/implicit-caller-location.md @@ -64,7 +64,7 @@ reach the first function call in the stack which does *not* have the attribute. Starting at the bottom, we iterate up over stack [`Frame`][const-frame]s in the [`InterpCx::stack`][const-stack], calling -[`InstanceDef::requires_caller_location`][requires-location] on the +[`InstanceKind::requires_caller_location`][requires-location] on the [`Instance`s from each `Frame`][frame-instance]. We stop once we find one that returns `false` and return the span of the *previous* frame which was the "topmost" tracked function. @@ -166,7 +166,7 @@ function: * is not `#[naked]` If the use is valid, we set [`CodegenFnAttrsFlags::TRACK_CALLER`][attrs-flags]. This flag influences -the return value of [`InstanceDef::requires_caller_location`][requires-location] which is in turn +the return value of [`InstanceKind::requires_caller_location`][requires-location] which is in turn used in both const and codegen contexts to ensure correct propagation. ### Traits @@ -267,10 +267,10 @@ to the author and reviewers. [rationale]: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md#rationale [revised design]: https://github.com/rust-lang/rust/issues/47809#issuecomment-443538059 [attrs-flags]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/middle/codegen_fn_attrs/struct.CodegenFnAttrFlags.html#associatedconstant.TRACK_CALLER -[`ReifyShim`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.InstanceDef.html#variant.ReifyShim +[`ReifyShim`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.InstanceKind.html#variant.ReifyShim [`Location`]: https://doc.rust-lang.org/core/panic/struct.Location.html [const-find-closest]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_const_eval/interpret/struct.InterpCx.html#method.find_closest_untracked_caller_location -[requires-location]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.InstanceDef.html#method.requires_caller_location +[requires-location]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/instance/enum.InstanceKind.html#method.requires_caller_location [alloc-location]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_const_eval/interpret/struct.InterpCx.html#method.alloc_caller_location [fcx-location]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/mir/struct.FunctionCx.html#structfield.caller_location [const-location-query]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html#method.const_caller_location diff --git a/src/solve/opaque-types.md b/src/solve/opaque-types.md index fa7dde2e6..d786afecf 100644 --- a/src/solve/opaque-types.md +++ b/src/solve/opaque-types.md @@ -41,7 +41,7 @@ discarding their inferred types at the end, changing the behavior of an opaque t multiple times during coherence: [example][coherence-example] Inside of the defining scope we start by checking whether the type and const arguments of the -opaque are all placeholders: [source](placeholder-ck). If this check is ambiguous, +opaque are all placeholders: [source][placeholder-ck]. If this check is ambiguous, return ambiguity, if it fails, return `Err(NoSolution)`. This check ignores regions which are only checked at the end of borrowck. If it succeeds, continue.