diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-06-01 16:02:23 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-06-01 16:02:23 +0200 |
| commit | c34676a7c4df754e15c975bac8659f48f7e64d54 (patch) | |
| tree | 0c2e05b64c663e6ff28164f2f787c727695be3a1 /src | |
| parent | 298730e7032cd55809423773da397cd5c7d827d4 (diff) | |
Fix E0165 code examples
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_const_eval/diagnostics.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_const_eval/diagnostics.rs b/src/librustc_const_eval/diagnostics.rs index 8b1d7bed7c4..f2abdf831a3 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; - ... + // ... } ``` "##, |
