Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/86188.rs: fixed with errors #852

Merged
merged 1 commit into from
Jun 29, 2021
Merged

ices/86188.rs: fixed with errors #852

merged 1 commit into from
Jun 29, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#86188

fn main() {
    [(); return || {
        let tx;
    }]
}
=== stdout ===
=== stderr ===
error[E0572]: return statement outside of function body
 --> /home/runner/work/glacier/glacier/ices/86188.rs:2:10
  |
1 |  / fn main() {
2 |  |     [(); return || {
  |  |__________^
3 | ||         let tx;
4 | ||     }]
  | ||_____^ the return is part of this body...
5 |  | }
  |  |_- ...not the enclosing function body

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/86188.rs:2:5
  |
1 |   fn main() {
  |             - expected `()` because of default return type
2 | /     [(); return || {
3 | |         let tx;
4 | |     }]
  | |______^ expected `()`, found array `[(); _]`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0308, E0572.
For more information about an error, try `rustc --explain E0308`.
==============

=== stdout ===
=== stderr ===
error[E0572]: return statement outside of function body
 --> /home/runner/work/glacier/glacier/ices/86188.rs:2:10
  |
1 |  / fn main() {
2 |  |     [(); return || {
  |  |__________^
3 | ||         let tx;
4 | ||     }]
  | ||_____^ the return is part of this body...
5 |  | }
  |  |_- ...not the enclosing function body

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/86188.rs:2:5
  |
1 |   fn main() {
  |             - expected `()` because of default return type
2 | /     [(); return || {
3 | |         let tx;
4 | |     }]
  | |______^ expected `()`, found array `[(); _]`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0308, E0572.
For more information about an error, try `rustc --explain E0308`.
==============
@JohnTitor JohnTitor merged commit 2ba288c into master Jun 29, 2021
@JohnTitor JohnTitor deleted the autofix/ices/86188.rs branch June 29, 2021 12:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants