1
Fork 0

Rollup merge of #93913 - bjorn3:remove_everybody_loops, r=jackh726

Remove the everybody loops pass

It isn't used anymore by rustdoc.

Split out of https://github.com/rust-lang/rust/pull/92895. There has been some previous discussion there.
This commit is contained in:
Dylan DPC 2022-03-04 02:06:38 +01:00 committed by GitHub
commit c1585a17a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 12 additions and 309 deletions

View file

@ -2509,7 +2509,6 @@ fn parse_pretty(debugging_opts: &DebuggingOptions, efmt: ErrorOutputType) -> Opt
let first = match debugging_opts.unpretty.as_deref()? {
"normal" => Source(PpSourceMode::Normal),
"identified" => Source(PpSourceMode::Identified),
"everybody_loops" => Source(PpSourceMode::EveryBodyLoops),
"expanded" => Source(PpSourceMode::Expanded),
"expanded,identified" => Source(PpSourceMode::ExpandedIdentified),
"expanded,hygiene" => Source(PpSourceMode::ExpandedHygiene),
@ -2645,8 +2644,6 @@ impl fmt::Display for CrateType {
pub enum PpSourceMode {
/// `-Zunpretty=normal`
Normal,
/// `-Zunpretty=everybody_loops`
EveryBodyLoops,
/// `-Zunpretty=expanded`
Expanded,
/// `-Zunpretty=identified`
@ -2678,7 +2675,7 @@ pub enum PpHirMode {
#[derive(Copy, Clone, PartialEq, Debug)]
pub enum PpMode {
/// Options that print the source code, i.e.
/// `-Zunpretty=normal` and `-Zunpretty=everybody_loops`
/// `-Zunpretty=normal` and `-Zunpretty=expanded`
Source(PpSourceMode),
AstTree(PpAstTreeMode),
/// Options that print the HIR, i.e. `-Zunpretty=hir`
@ -2700,7 +2697,7 @@ impl PpMode {
match *self {
Source(Normal | Identified) | AstTree(PpAstTreeMode::Normal) => false,
Source(Expanded | EveryBodyLoops | ExpandedIdentified | ExpandedHygiene)
Source(Expanded | ExpandedIdentified | ExpandedHygiene)
| AstTree(PpAstTreeMode::Expanded)
| Hir(_)
| HirTree

View file

@ -1491,7 +1491,6 @@ options! {
`normal`, `identified`,
`expanded`, `expanded,identified`,
`expanded,hygiene` (with internal representations),
`everybody_loops` (all function bodies replaced with `loop {}`),
`ast-tree` (raw AST before expansion),
`ast-tree,expanded` (raw AST after expansion),
`hir` (the HIR), `hir,identified`,