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

ices/94822-1.rs: fixed with errors #1446

Merged
merged 1 commit into from
Oct 16, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#94822

fn a() -> bool {
 for i in 0..80*25 {
       || {};
 }
#[lang = "sized"]
trait A {}
}
=== stdout ===
=== stderr ===
error[E0658]: language items are subject to change
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:5:1
  |
5 | #[lang = "sized"]
  | ^^^^^^^^^^^^^^^^^
  |
  = help: add `#![feature(lang_items)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `94822_1`
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:7:2
  |
7 | }
  |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/94822-1.rs`

error[E0152]: found duplicate lang item `sized`
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:6:1
  |
6 | trait A {}
  | ^^^^^^^
  |
  = note: the lang item is first defined in crate `core` (which `std` depends on)
  = note: first definition in `core` loaded from /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-05898138a596088a.rlib
  = note: second definition in the local crate (`94822_1`)

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:11
  |
2 |  for i in 0..80*25 {
  |           ^^^^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `{integer}`
note: required by a bound in `std::ops::Range`

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:16
  |
2 |  for i in 0..80*25 {
  |                ^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `{integer}`

error[E0277]: the size for values of type `std::ops::Range<{integer}>` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:11
  |
2 |  for i in 0..80*25 {
  |           ^^^^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `std::ops::Range<{integer}>`
  = note: required for `std::ops::Range<{integer}>` to implement `IntoIterator`

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:2
  |
2 | /  for i in 0..80*25 {
3 | |        || {};
4 | |  }
  | |__^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `{integer}`
note: required by a bound in `None`

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:6
  |
2 |  for i in 0..80*25 {
  |      ^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `{integer}`
note: required by a bound in `Some`

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:1:11
  |
1 | fn a() -> bool {
  |    -      ^^^^ expected `bool`, found `()`
  |    |
  |    implicitly returns `()` as its body has no tail or `return` expression

error: aborting due to 9 previous errors

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

=== stdout ===
=== stderr ===
error[E0658]: language items are subject to change
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:5:1
  |
5 | #[lang = "sized"]
  | ^^^^^^^^^^^^^^^^^
  |
  = help: add `#![feature(lang_items)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `94822_1`
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:7:2
  |
7 | }
  |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/94822-1.rs`

error[E0152]: found duplicate lang item `sized`
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:6:1
  |
6 | trait A {}
  | ^^^^^^^
  |
  = note: the lang item is first defined in crate `core` (which `std` depends on)
  = note: first definition in `core` loaded from /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-05898138a596088a.rlib
  = note: second definition in the local crate (`94822_1`)

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:11
  |
2 |  for i in 0..80*25 {
  |           ^^^^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `{integer}`
note: required by a bound in `std::ops::Range`

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:16
  |
2 |  for i in 0..80*25 {
  |                ^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `{integer}`

error[E0277]: the size for values of type `std::ops::Range<{integer}>` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:11
  |
2 |  for i in 0..80*25 {
  |           ^^^^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `std::ops::Range<{integer}>`
  = note: required for `std::ops::Range<{integer}>` to implement `IntoIterator`

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:2
  |
2 | /  for i in 0..80*25 {
3 | |        || {};
4 | |  }
  | |__^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `{integer}`
note: required by a bound in `None`

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:2:6
  |
2 |  for i in 0..80*25 {
  |      ^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `{integer}`
note: required by a bound in `Some`

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/94822-1.rs:1:11
  |
1 | fn a() -> bool {
  |    -      ^^^^ expected `bool`, found `()`
  |    |
  |    implicitly returns `()` as its body has no tail or `return` expression

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0152, E0277, E0308, E0601, E0658.
For more information about an error, try `rustc --explain E0152`.
==============
@Alexendoo Alexendoo merged commit b80f645 into master Oct 16, 2022
@Alexendoo Alexendoo deleted the autofix/ices/94822-1.rs branch October 16, 2022 20:23
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