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

ices/81845.rs: fixed with errors #665

Merged
merged 1 commit into from
Feb 24, 2021
Merged

ices/81845.rs: fixed with errors #665

merged 1 commit into from
Feb 24, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#81845

fn e() {
    if *let x = 0 { x
=== stdout ===
=== stderr ===
error: this file contains an unclosed delimiter
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:23
  |
1 | fn e() {
  |        - unclosed delimiter
2 |     if *let x = 0 { x
  |                   -   ^
  |                   |
  |                   unclosed delimiter

error[E0658]: `let` expressions in this position are experimental
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:9
  |
2 |     if *let x = 0 { x
  |         ^^^^^^^^^
  |
  = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
  = help: add `#![feature(let_chains)]` to the crate attributes to enable

error: `let` expressions are not supported here
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:9
  |
2 |     if *let x = 0 { x
  |         ^^^^^^^^^
  |
  = note: only supported directly in conditions of `if`- and `while`-expressions
  = note: as well as when nested within `&&` and parenthesis in those conditions

error[E0614]: type `bool` cannot be dereferenced
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:8
  |
2 |     if *let x = 0 { x
  |        ^^^^^^^^^^

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:21
  |
1 | fn e() {
  |        - possibly return type missing here?
2 |     if *let x = 0 { x
  |                     ^ expected `()`, found integer

error: aborting due to 5 previous errors

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

=== stdout ===
=== stderr ===
error: this file contains an unclosed delimiter
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:23
  |
1 | fn e() {
  |        - unclosed delimiter
2 |     if *let x = 0 { x
  |                   -   ^
  |                   |
  |                   unclosed delimiter

error[E0658]: `let` expressions in this position are experimental
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:9
  |
2 |     if *let x = 0 { x
  |         ^^^^^^^^^
  |
  = note: see issue #53667 <rust-lang/rust#53667> for more information
  = help: add `#![feature(let_chains)]` to the crate attributes to enable

error: `let` expressions are not supported here
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:9
  |
2 |     if *let x = 0 { x
  |         ^^^^^^^^^
  |
  = note: only supported directly in conditions of `if`- and `while`-expressions
  = note: as well as when nested within `&&` and parenthesis in those conditions

error[E0614]: type `bool` cannot be dereferenced
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:8
  |
2 |     if *let x = 0 { x
  |        ^^^^^^^^^^

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/81845.rs:2:21
  |
1 | fn e() {
  |        - possibly return type missing here?
2 |     if *let x = 0 { x
  |                     ^ expected `()`, found integer

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0308, E0614, E0658.
For more information about an error, try `rustc --explain E0308`.
==============
@JohnTitor
Copy link
Member

Actually it was a duplicate issue but merging anyway.

@JohnTitor JohnTitor merged commit 5a9b6a7 into master Feb 24, 2021
@JohnTitor JohnTitor deleted the autofix/ices/81845.rs branch February 24, 2021 13:43
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