Skip to content

Commit 7062010

Browse files
committed
Tweak the dialect/phrase description.
1 parent 840d8c5 commit 7062010

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

compiler/rustc_middle/src/mir/syntax.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,19 @@ use crate::ty::{self, GenericArgsRef, List, Region, Ty, UserTypeAnnotationIndex}
2323

2424
/// Represents the "flavors" of MIR.
2525
///
26-
/// All flavors of MIR use the same data structure, but there are some important differences. Each
27-
/// flavor has (a) a dialect and, (b) a phase within that dialect. A single
28-
/// `MirPhase` value specifies both a dialect and a phase.
26+
/// The MIR pipeline is structured into a few major dialects, with one or more phases within each
27+
/// dialect. A MIR flavor is identified by a dialect-phase pair. A single `MirPhase` value
28+
/// specifies such a pair. All flavors of MIR use the same data structure.
2929
///
3030
/// Different MIR dialects have different semantics. (The differences between dialects are small,
3131
/// but they do exist.) The progression from one MIR dialect to the next is technically a lowering
3232
/// from one IR to another. In other words, a single well-formed [`Body`](crate::mir::Body) might
3333
/// have different semantic meaning and different behavior at runtime in the different dialects.
3434
/// The specific differences between dialects are described on the variants below.
3535
///
36-
/// Within a dialect there are one or more phases. Phases exist only to place restrictions on what
37-
/// language constructs are permitted in well-formed MIR, and subsequent phases mostly increase
38-
/// those restrictions. I.e. to convert MIR from one phase to the next might require
39-
/// removing/replacing certain MIR constructs.
36+
/// Phases exist only to place restrictions on what language constructs are permitted in
37+
/// well-formed MIR, and subsequent phases mostly increase those restrictions. I.e. to convert MIR
38+
/// from one phase to the next might require removing/replacing certain MIR constructs.
4039
///
4140
/// When adding dialects or phases, remember to update [`MirPhase::index`].
4241
#[derive(Copy, Clone, TyEncodable, TyDecodable, Debug, PartialEq, Eq, PartialOrd, Ord)]

0 commit comments

Comments
 (0)