Skip to content

Commit 4657fbc

Browse files
authored
Some small fixes (#823)
* Fix some typos * Update from `typeck_tables_of` to `typeck` * Fix comment
1 parent cb51d0e commit 4657fbc

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ multiple sentences are _needed_:
5858
error: the fobrulator needs to be krontrificated
5959
```
6060

61-
When code or an identifier must appear in an message or label, it should be
61+
When code or an identifier must appear in a message or label, it should be
6262
surrounded with single acute accents \`.
6363

6464
### Error explanations

src/diagnostics/diagnostic-codes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Diagnostic Codes
2-
We generally try assign each error message a unique code like `E0123`. These
2+
We generally try to assign each error message a unique code like `E0123`. These
33
codes are defined in the compiler in the `diagnostics.rs` files found in each
44
crate, which basically consist of macros. The codes come in two varieties: those
55
that have an extended write-up, and those that do not. Whenever possible, if you

src/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ For more details on bootstrapping, see
367367
- Guide: [Type Inference](https://rustc-dev-guide.rust-lang.org/type-inference.html)
368368
- Guide: [The ty Module: Representing Types](https://rustc-dev-guide.rust-lang.org/ty.html) (semantics)
369369
- Main entry point (type inference): [`InferCtxtBuilder::enter`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/infer/struct.InferCtxtBuilder.html#method.enter)
370-
- Main entry point (type checking bodies): [the `typeck_tables_of` query](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html#method.typeck_tables_of)
370+
- Main entry point (type checking bodies): [the `typeck` query](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html#method.typeck)
371371
- These two functions can't be decoupled.
372372
- The Mid Level Intermediate Representation (MIR)
373373
- Guide: [The MIR (Mid level IR)](https://rustc-dev-guide.rust-lang.org/mir/index.html)

src/queries/profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ We explain each term in more detail:
282282
providers may nest; see [trace of queries](#trace-of-queries) for more
283283
information about this nesting structure.
284284
_Example providers:_
285-
- `typeck_tables_of` -- Typecheck a Def ID; produce "tables" of type
285+
- `typeck` -- Typecheck a Def ID; produce "tables" of type
286286
information.
287287
- `borrowck` -- Borrow-check a Def ID.
288288
- `optimized_mir` -- Generate an optimized MIR for a Def ID; produce MIR.

src/rustc-driver-interacting-with-the-ast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ rustc_interface::run_compiler(config, |compiler| {
3232
if let Some(expr) = local.init {
3333
let hir_id = expr.hir_id; // hir_id identifies the string "Hello, world!"
3434
let def_id = tcx.hir().local_def_id(item.hir_id); // def_id identifies the main function
35-
let ty = tcx.typeck_tables_of(def_id).node_type(hir_id);
35+
let ty = tcx.typeck(def_id).node_type(hir_id);
3636
println!("{:?}: {:?}", expr, ty); // prints expr(HirId { owner: DefIndex(3), local_id: 4 }: "Hello, world!"): &'static str
3737
}
3838
}

src/traits/hrtb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<X,F> Foo<X> for F
107107
}
108108
```
109109

110-
Now let's say we have a obligation `Baz: for<'a> Foo<&'a isize>` and we match
110+
Now let's say we have an obligation `Baz: for<'a> Foo<&'a isize>` and we match
111111
this impl. What obligation is generated as a result? We want to get
112112
`Baz: for<'a> Bar<&'a isize>`, but how does that happen?
113113

0 commit comments

Comments
 (0)