From 5f01a3b60b4e6e1a11b45f4856fa4a9a2879f124 Mon Sep 17 00:00:00 2001 From: Sunjay Varma Date: Thu, 10 May 2018 11:51:34 -0700 Subject: [PATCH] Closing all tags --- src/appendix-background.md | 10 +++++----- src/conventions.md | 10 +++++----- src/incremental-compilation.md | 2 +- src/mir-regionck.md | 4 ++-- src/mir.md | 2 +- src/tests/adding.md | 8 ++++---- src/traits-associated-types.md | 2 ++ src/traits-bibliography.md | 4 ++-- src/traits-canonical-queries.md | 2 +- src/traits-goals-and-clauses.md | 8 ++++---- src/traits-lowering-module.md | 2 +- src/traits-lowering-rules.md | 6 +++--- src/type-inference.md | 2 +- src/variance.md | 2 +- 14 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/appendix-background.md b/src/appendix-background.md index a0e298b0..06913194 100644 --- a/src/appendix-background.md +++ b/src/appendix-background.md @@ -4,7 +4,7 @@ This section covers a numbers of common compiler terms that arise in this guide. We try to give the general definition while providing some Rust-specific context. - + ## What is a control-flow graph? @@ -72,7 +72,7 @@ When using a control-flow graph, a loop simply appears as a cycle in the graph, and the `break` keyword translates into a path out of that cycle. - + ## What is a dataflow analysis? @@ -81,13 +81,13 @@ and Michael I. Schwartzbach is an incredible resource! *to be written* - + ## What is "universally quantified"? What about "existentially quantified"? *to be written* - + ## What is co- and contra-variance? @@ -97,7 +97,7 @@ Check out the subtyping chapter from the See the [variance](./variance.html) chapter of this guide for more info on how the type checker handles variance. - + ## What is a "free region" or a "free variable"? What about "bound region"? diff --git a/src/conventions.md b/src/conventions.md index 7c2a958c..5b2b7b7f 100644 --- a/src/conventions.md +++ b/src/conventions.md @@ -3,7 +3,7 @@ chapter covers [formatting](#formatting), [coding for correctness](#cc), [using crates from crates.io](#cio), and some tips on [structuring your PR for easy review](#er). - + # Formatting and the tidy script @@ -16,7 +16,7 @@ in isolation with `./x.py test src/tools/tidy`. [fmt]: https://github.com/rust-lang-nursery/fmt-rfcs - + ### Copyright notice @@ -57,7 +57,7 @@ the copyright notice) like so: Prefer 4-space indent. - + # Coding for correctness @@ -99,7 +99,7 @@ if foo { } ``` - + # Using crates from crates.io @@ -108,7 +108,7 @@ dependencies should not be added gratuitously. All such crates must have a suitably permissive license. There is an automatic check which inspects the Cargo metadata to ensure this. - + # How to structure your PR diff --git a/src/incremental-compilation.md b/src/incremental-compilation.md index a209207f..0a25e166 100644 --- a/src/incremental-compilation.md +++ b/src/incremental-compilation.md @@ -76,7 +76,7 @@ Try-mark-green works as follows: - Otherwise, **all** of the nodes in `reads(Q)` must be **green**. In that case, we can color Q as **green** and return. - + ### The query DAG diff --git a/src/mir-regionck.md b/src/mir-regionck.md index 4158b7d3..e67e9113 100644 --- a/src/mir-regionck.md +++ b/src/mir-regionck.md @@ -51,7 +51,7 @@ the role of `liveness_constraints` vs other `constraints`, plus *to be written* - + ## The MIR type-check @@ -88,7 +88,7 @@ The kinds of region elements are as follows: *to be written* -- describe how we can extend the values of a variable with causal tracking etc - + ## Skolemization and universes diff --git a/src/mir.md b/src/mir.md index da468acf..81bbf6bd 100644 --- a/src/mir.md +++ b/src/mir.md @@ -234,7 +234,7 @@ but [you can read about those below](#promoted)). *to be written* - + ### Promoted constants diff --git a/src/tests/adding.md b/src/tests/adding.md index 5d4c383f..96fc0cf8 100644 --- a/src/tests/adding.md +++ b/src/tests/adding.md @@ -68,7 +68,7 @@ then it might make sense to put the tests in directories like: In other cases, there may already be a suitable directory. (The proper directory structure to use is actually an area of active debate.) - + ## Comment explaining what the test is about @@ -90,7 +90,7 @@ test must be rewritten because it no longer tests what is was meant to test, and then it's useful to know what it *was* meant to test exactly). - + ## Header commands: configuring rustc @@ -167,7 +167,7 @@ source. [`header.rs`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/header.rs - + ## Error annotations @@ -229,7 +229,7 @@ currently only apply to the test as a whole, not to particular revisions. The only headers that are intended to really work when customized to a revision are error patterns and compiler flags. - + ## Guide to the UI tests diff --git a/src/traits-associated-types.md b/src/traits-associated-types.md index eaf49787..51972c41 100644 --- a/src/traits-associated-types.md +++ b/src/traits-associated-types.md @@ -22,6 +22,8 @@ though that is something we may want to change in the future.) [intoiter-item]: https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#associatedtype.Item + + In some cases, associated type projections can be **normalized** -- that is, simplified -- based on the types given in an impl. So, to continue with our example, the impl of `IntoIterator` for `Option` diff --git a/src/traits-bibliography.md b/src/traits-bibliography.md index 02607b52..b8f345d9 100644 --- a/src/traits-bibliography.md +++ b/src/traits-bibliography.md @@ -10,7 +10,7 @@ new every time you open it. [phl]: https://www.amazon.com/Programming-Higher-Order-Logic-Dale-Miller/dp/052187940X - + ["A proof procedure for the logic of Hereditary Harrop formulas"][pphhf], by Gopalan Nadathur. This paper covers the basics of universes, @@ -18,7 +18,7 @@ environments, and Lambda Prolog-style proof search. Quite readable. [pphhf]: https://dl.acm.org/citation.cfm?id=868380 - + ["A new formulation of tabled resolution with delay"][nftrd], by [Theresa Swift]. This paper gives a kind of abstract treatment of the diff --git a/src/traits-canonical-queries.md b/src/traits-canonical-queries.md index 3c4bb1bf..2737737b 100644 --- a/src/traits-canonical-queries.md +++ b/src/traits-canonical-queries.md @@ -95,7 +95,7 @@ Rc: Clone After all, `Rc` is true **no matter what type `?T` is**. - + ## A trait query in rustc diff --git a/src/traits-goals-and-clauses.md b/src/traits-goals-and-clauses.md index 5e8ee146..0cbdb707 100644 --- a/src/traits-goals-and-clauses.md +++ b/src/traits-goals-and-clauses.md @@ -39,11 +39,11 @@ gives the details. [pphhf]: ./traits-bibliography.html#pphhf - + ## Domain goals - + To define the set of *domain goals* in our system, we need to first introduce a few simple formulations. A **trait reference** consists of @@ -58,7 +58,7 @@ IntoIterator`. Note that Rust surface syntax also permits some extra things, like associated type bindings (`Vec: IntoIterator`), that are not part of a trait reference. - + A **projection** consists of an associated item reference along with its inputs P0..Pm: @@ -105,7 +105,7 @@ DomainGoal = Implemented(TraitRef) [n]: ./traits-associated-types.html#normalize - + ## Coinductive goals diff --git a/src/traits-lowering-module.md b/src/traits-lowering-module.md index fbf1d642..08e0b952 100644 --- a/src/traits-lowering-module.md +++ b/src/traits-lowering-module.md @@ -18,7 +18,7 @@ returns a vector of program clauses. [query]: ./query.html - + ## Unit tests diff --git a/src/traits-lowering-rules.md b/src/traits-lowering-rules.md index f7433221..73660c42 100644 --- a/src/traits-lowering-rules.md +++ b/src/traits-lowering-rules.md @@ -94,7 +94,7 @@ forall { } ``` - + #### Implied bounds @@ -176,7 +176,7 @@ we must show that `WellFormed(TraitRef)`. This in turn justifies the implied bounds rules that allow us to extend the set of `FromEnv` items. - + ## Lowering trait items @@ -291,7 +291,7 @@ forall { Note that `WC` and `WC1` both encode where-clauses that the impl can rely on. - + ### Function and constant values diff --git a/src/type-inference.md b/src/type-inference.md index 152bbd9d..e480b2b5 100644 --- a/src/type-inference.md +++ b/src/type-inference.md @@ -43,7 +43,7 @@ The `tcx.infer_ctxt` method actually returns a builder, which means there are some kinds of configuration you can do before the `infcx` is created. See `InferCtxtBuilder` for more information. - + ## Inference variables diff --git a/src/variance.md b/src/variance.md index 527c2745..08399b5b 100644 --- a/src/variance.md +++ b/src/variance.md @@ -141,7 +141,7 @@ will wind up being considered green after it is re-evaluated. [rga]: ./incremental-compilation.html - + ## Addendum: Variance on traits