summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorTakayuki Nakata <f.seasons017@gmail.com>2020-08-12 08:36:48 +0900
committerGitHub <noreply@github.com>2020-08-11 19:36:48 -0400
commit41df111b4a2d45da207446f4379d1d1e0f53ce2e (patch)
tree10b87b4fd4b3b37a9319e5ebcf0b80b4930f61db /src/doc/rustc-dev-guide
parent42e8a377a2d6736974f51d7daf4c6420abfd1cf6 (diff)
downloadrust-41df111b4a2d45da207446f4379d1d1e0f53ce2e.tar.gz
rust-41df111b4a2d45da207446f4379d1d1e0f53ce2e.zip
Some small fixes (#823)
* Fix some typos
* Update from `typeck_tables_of` to `typeck`
* Fix comment
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/diagnostics.md2
-rw-r--r--src/doc/rustc-dev-guide/src/diagnostics/diagnostic-codes.md2
-rw-r--r--src/doc/rustc-dev-guide/src/overview.md2
-rw-r--r--src/doc/rustc-dev-guide/src/queries/profiling.md2
-rw-r--r--src/doc/rustc-dev-guide/src/rustc-driver-interacting-with-the-ast.md2
-rw-r--r--src/doc/rustc-dev-guide/src/traits/hrtb.md2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics.md b/src/doc/rustc-dev-guide/src/diagnostics.md
index 432ea890370..5ad2fbb329b 100644
--- a/src/doc/rustc-dev-guide/src/diagnostics.md
+++ b/src/doc/rustc-dev-guide/src/diagnostics.md
@@ -58,7 +58,7 @@ multiple sentences are _needed_:
 error: the fobrulator needs to be krontrificated
 ```
 
-When code or an identifier must appear in an message or label, it should be
+When code or an identifier must appear in a message or label, it should be
 surrounded with single acute accents \`.
 
 ### Error explanations
diff --git a/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-codes.md b/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-codes.md
index 0e923c5e1ba..e0d144bfcf7 100644
--- a/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-codes.md
+++ b/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-codes.md
@@ -1,5 +1,5 @@
 # Diagnostic Codes
-We generally try assign each error message a unique code like `E0123`. These
+We generally try to assign each error message a unique code like `E0123`. These
 codes are defined in the compiler in the `diagnostics.rs` files found in each
 crate, which basically consist of macros. The codes come in two varieties: those
 that have an extended write-up, and those that do not. Whenever possible, if you
diff --git a/src/doc/rustc-dev-guide/src/overview.md b/src/doc/rustc-dev-guide/src/overview.md
index e97fba6b9cc..5bcf26911c1 100644
--- a/src/doc/rustc-dev-guide/src/overview.md
+++ b/src/doc/rustc-dev-guide/src/overview.md
@@ -367,7 +367,7 @@ For more details on bootstrapping, see
   - Guide: [Type Inference](https://rustc-dev-guide.rust-lang.org/type-inference.html)
   - Guide: [The ty Module: Representing Types](https://rustc-dev-guide.rust-lang.org/ty.html) (semantics)
   - Main entry point (type inference): [`InferCtxtBuilder::enter`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/infer/struct.InferCtxtBuilder.html#method.enter)
-  - 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)
+  - 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)
     - These two functions can't be decoupled.
 - The Mid Level Intermediate Representation (MIR)
   - Guide: [The MIR (Mid level IR)](https://rustc-dev-guide.rust-lang.org/mir/index.html)
diff --git a/src/doc/rustc-dev-guide/src/queries/profiling.md b/src/doc/rustc-dev-guide/src/queries/profiling.md
index 8c6050da20d..593d0b38547 100644
--- a/src/doc/rustc-dev-guide/src/queries/profiling.md
+++ b/src/doc/rustc-dev-guide/src/queries/profiling.md
@@ -282,7 +282,7 @@ We explain each term in more detail:
   providers may nest; see [trace of queries](#trace-of-queries) for more
   information about this nesting structure.
    _Example providers:_
-  - `typeck_tables_of` -- Typecheck a Def ID; produce "tables" of type
+  - `typeck` -- Typecheck a Def ID; produce "tables" of type
     information.
   - `borrowck` -- Borrow-check a Def ID.
   - `optimized_mir` -- Generate an optimized MIR for a Def ID; produce MIR.
diff --git a/src/doc/rustc-dev-guide/src/rustc-driver-interacting-with-the-ast.md b/src/doc/rustc-dev-guide/src/rustc-driver-interacting-with-the-ast.md
index 0cdc84393c1..21d03bbb740 100644
--- a/src/doc/rustc-dev-guide/src/rustc-driver-interacting-with-the-ast.md
+++ b/src/doc/rustc-dev-guide/src/rustc-driver-interacting-with-the-ast.md
@@ -32,7 +32,7 @@ rustc_interface::run_compiler(config, |compiler| {
                             if let Some(expr) = local.init {
                                 let hir_id = expr.hir_id; // hir_id identifies the string "Hello, world!"
                                 let def_id = tcx.hir().local_def_id(item.hir_id); // def_id identifies the main function
-                                let ty = tcx.typeck_tables_of(def_id).node_type(hir_id);
+                                let ty = tcx.typeck(def_id).node_type(hir_id);
                                 println!("{:?}: {:?}", expr, ty); // prints expr(HirId { owner: DefIndex(3), local_id: 4 }: "Hello, world!"): &'static str
                             }
                         }
diff --git a/src/doc/rustc-dev-guide/src/traits/hrtb.md b/src/doc/rustc-dev-guide/src/traits/hrtb.md
index 81391f7ae28..c0ca318e6e2 100644
--- a/src/doc/rustc-dev-guide/src/traits/hrtb.md
+++ b/src/doc/rustc-dev-guide/src/traits/hrtb.md
@@ -107,7 +107,7 @@ impl<X,F> Foo<X> for F
 }
 ```
 
-Now let's say we have a obligation `Baz: for<'a> Foo<&'a isize>` and we match
+Now let's say we have an obligation `Baz: for<'a> Foo<&'a isize>` and we match
 this impl. What obligation is generated as a result? We want to get
 `Baz: for<'a> Bar<&'a isize>`, but how does that happen?