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

ices/86535.rs: fixed with errors #901

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#86535

#![feature(box_syntax)]
fn main() {
    let _: Box<[isize]> = box { loop {} };
}
=== stdout ===
=== stderr ===
warning: unreachable expression
 --> /home/runner/work/glacier/glacier/ices/86535.rs:3:27
  |
3 |     let _: Box<[isize]> = box { loop {} };
  |                           ^^^^^^-------^^
  |                           |     |
  |                           |     any code following this expression is unreachable
  |                           unreachable expression
  |
  = note: `#[warn(unreachable_code)]` on by default

error[E0277]: the size for values of type `[isize]` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/86535.rs:3:31
  |
3 |     let _: Box<[isize]> = box { loop {} };
  |                               ^^^^^^^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `[isize]`
  = note: the type of a box expression must have a statically known size

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: unreachable expression
 --> /home/runner/work/glacier/glacier/ices/86535.rs:3:27
  |
3 |     let _: Box<[isize]> = box { loop {} };
  |                           ^^^^^^-------^^
  |                           |     |
  |                           |     any code following this expression is unreachable
  |                           unreachable expression
  |
  = note: `#[warn(unreachable_code)]` on by default

error[E0277]: the size for values of type `[isize]` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/86535.rs:3:31
  |
3 |     let _: Box<[isize]> = box { loop {} };
  |                               ^^^^^^^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `[isize]`
  = note: the type of a box expression must have a statically known size

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0277`.
==============
@Alexendoo Alexendoo closed this in b5fe042 Aug 22, 2021
@Alexendoo Alexendoo deleted the autofix/ices/86535.rs branch August 22, 2021 17:24
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.

1 participant