diff --git a/src/librustc_const_eval/diagnostics.rs b/src/librustc_const_eval/diagnostics.rs index 8b1d7bed7c42d..f2abdf831a3b8 100644 --- a/src/librustc_const_eval/diagnostics.rs +++ b/src/librustc_const_eval/diagnostics.rs @@ -384,18 +384,19 @@ let irr = Irrefutable(0); // This fails to compile because the match is irrefutable. while let Irrefutable(x) = irr { - ... + // ... } +``` Try this instead: -``` +```no_run struct Irrefutable(i32); let irr = Irrefutable(0); loop { let Irrefutable(x) = irr; - ... + // ... } ``` "##, diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index d06030637afd8..e9e52a0121a36 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -2040,6 +2040,7 @@ impl Foo for Bar { // the trait fn foo(&self) {} } +``` "##, E0186: r##"