diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-02 02:13:27 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-11-02 16:52:07 +0000 |
| commit | 74fec9b95ad308c3dc064bb38778aea4ec51f5ee (patch) | |
| tree | be297a197bf8810f8382a13ef7869c819cfaab75 /src/test/ui/error-codes | |
| parent | c0a76127283bc963b085f54a1b275a8e281e81e6 (diff) | |
| download | rust-74fec9b95ad308c3dc064bb38778aea4ec51f5ee.tar.gz rust-74fec9b95ad308c3dc064bb38778aea4ec51f5ee.zip | |
Remove has_errors from FnCtxt
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0767.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0767.stderr | 21 |
2 files changed, 19 insertions, 5 deletions
diff --git a/src/test/ui/error-codes/E0767.rs b/src/test/ui/error-codes/E0767.rs index 6c6cb746e6c..14215d36a38 100644 --- a/src/test/ui/error-codes/E0767.rs +++ b/src/test/ui/error-codes/E0767.rs @@ -1,6 +1,7 @@ -fn main () { +fn main() { 'a: loop { || { + //~^ ERROR mismatched types loop { break 'a; } //~ ERROR E0767 } } diff --git a/src/test/ui/error-codes/E0767.stderr b/src/test/ui/error-codes/E0767.stderr index 2429823306b..ee85247301c 100644 --- a/src/test/ui/error-codes/E0767.stderr +++ b/src/test/ui/error-codes/E0767.stderr @@ -1,14 +1,27 @@ error[E0767]: use of unreachable label `'a` - --> $DIR/E0767.rs:4:26 + --> $DIR/E0767.rs:5:26 | LL | 'a: loop { | -- unreachable label defined here -LL | || { +... LL | loop { break 'a; } | ^^ unreachable label `'a` | = note: labels are unreachable through functions, closures, async blocks and modules -error: aborting due to previous error +error[E0308]: mismatched types + --> $DIR/E0767.rs:3:9 + | +LL | / || { +LL | | +LL | | loop { break 'a; } +LL | | } + | |_________^ expected `()`, found closure + | + = note: expected unit type `()` + found closure `[closure@$DIR/E0767.rs:3:9: 3:11]` + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0767`. +Some errors have detailed explanations: E0308, E0767. +For more information about an error, try `rustc --explain E0308`. |
