@@ -712,16 +712,24 @@ pub fn non_durable_rename(src: &Path, dst: &Path) -> std::io::Result<()> {
712
712
std:: fs:: rename ( src, dst)
713
713
}
714
714
715
- // Note: Also used by librustdoc, see PR #43348. Consider moving this struct elsewhere.
716
- //
717
- // FIXME: Currently the `everybody_loops` transformation is not applied to:
718
- // * `const fn`, due to issue #43636 that `loop` is not supported for const evaluation. We are
719
- // waiting for miri to fix that.
720
- // * `impl Trait`, due to issue #43869 that functions returning impl Trait cannot be diverging.
721
- // Solving this may require `!` to implement every trait, which relies on the an even more
722
- // ambitious form of the closed RFC #1637. See also [#34511].
723
- //
724
- // [#34511]: https://github.com/rust-lang/rust/issues/34511#issuecomment-322340401
715
+ /// Replaces function bodies with `loop {}` (an infinite loop). This gets rid of
716
+ /// all semantic errors in the body while still satisfying the return type,
717
+ /// except in certain cases, see below for more.
718
+ ///
719
+ /// This pass is known as `everybody_loops`. Very punny.
720
+ ///
721
+ /// As of March 2021, `everybody_loops` is only used for the
722
+ /// `-Z unpretty=everybody_loops` debugging option.
723
+ ///
724
+ /// FIXME: Currently the `everybody_loops` transformation is not applied to:
725
+ /// * `const fn`; support could be added, but hasn't. Originally `const fn`
726
+ /// was skipped due to issue #43636 that `loop` was not supported for
727
+ /// const evaluation.
728
+ /// * `impl Trait`, due to issue #43869 that functions returning impl Trait cannot be diverging.
729
+ /// Solving this may require `!` to implement every trait, which relies on the an even more
730
+ /// ambitious form of the closed RFC #1637. See also [#34511].
731
+ ///
732
+ /// [#34511]: https://github.com/rust-lang/rust/issues/34511#issuecomment-322340401
725
733
pub struct ReplaceBodyWithLoop < ' a , ' b > {
726
734
within_static_or_const : bool ,
727
735
nested_blocks : Option < Vec < ast:: Block > > ,
0 commit comments