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

ices/96335.rs: fixed with errors #1225

Merged
merged 1 commit into from
Apr 27, 2022
Merged

ices/96335.rs: fixed with errors #1225

merged 1 commit into from
Apr 27, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#96335

fn main() {
    0.....{loop{}1}
}
=== stdout ===
=== stderr ===
error: unexpected token: `...`
 --> /home/runner/work/glacier/glacier/ices/96335.rs:2:6
  |
2 |     0.....{loop{}1}
  |      ^^^
  |
help: use `..` for an exclusive range
  |
2 |     0....{loop{}1}
  |      ~~
help: or `..=` for an inclusive range
  |
2 |     0..=..{loop{}1}
  |      ~~~

warning: unreachable expression
 --> /home/runner/work/glacier/glacier/ices/96335.rs:2:18
  |
2 |     0.....{loop{}1}
  |            ------^ unreachable expression
  |            |
  |            any code following this expression is unreachable
  |
  = note: `#[warn(unreachable_code)]` on by default

error[E0308]: mismatched types
   --> /home/runner/work/glacier/glacier/ices/96335.rs:2:9
    |
2   |     0.....{loop{}1}
    |     ----^^^^^^^^^^^
    |     |   |
    |     |   expected integer, found struct `RangeTo`
    |     arguments to this function are incorrect
    |
    = note: expected type `{integer}`
             found struct `RangeTo<{integer}>`
note: associated function defined here

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/96335.rs:2:5
  |
1 | fn main() {
  |           - expected `()` because of default return type
2 |     0.....{loop{}1}
  |     ^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
  |     |
  |     expected `()`, found struct `RangeInclusive`
  |
  = note: expected unit type `()`
                found struct `RangeInclusive<{integer}>`

error: aborting due to 3 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0308`.
==============

=== stdout ===
=== stderr ===
error: unexpected token: `...`
 --> /home/runner/work/glacier/glacier/ices/96335.rs:2:6
  |
2 |     0.....{loop{}1}
  |      ^^^
  |
help: use `..` for an exclusive range
  |
2 |     0....{loop{}1}
  |      ~~
help: or `..=` for an inclusive range
  |
2 |     0..=..{loop{}1}
  |      ~~~

warning: unreachable expression
 --> /home/runner/work/glacier/glacier/ices/96335.rs:2:18
  |
2 |     0.....{loop{}1}
  |            ------^ unreachable expression
  |            |
  |            any code following this expression is unreachable
  |
  = note: `#[warn(unreachable_code)]` on by default

error[E0308]: mismatched types
   --> /home/runner/work/glacier/glacier/ices/96335.rs:2:9
    |
2   |     0.....{loop{}1}
    |     ----^^^^^^^^^^^
    |     |   |
    |     |   expected integer, found struct `RangeTo`
    |     arguments to this function are incorrect
    |
    = note: expected type `{integer}`
             found struct `RangeTo<{integer}>`
note: associated function defined here

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/96335.rs:2:5
  |
1 | fn main() {
  |           - expected `()` because of default return type
2 |     0.....{loop{}1}
  |     ^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
  |     |
  |     expected `()`, found struct `RangeInclusive`
  |
  = note: expected unit type `()`
                found struct `RangeInclusive<{integer}>`

error: aborting due to 3 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0308`.
==============
@JohnTitor JohnTitor merged commit 3c4a135 into master Apr 27, 2022
@Alexendoo Alexendoo deleted the autofix/ices/96335.rs branch April 27, 2022 20:44
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