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

ices/77329.rs: fixed with errors #518

Merged
merged 1 commit into from
Oct 26, 2020
Merged

ices/77329.rs: fixed with errors #518

merged 1 commit into from
Oct 26, 2020

Commits on Oct 26, 2020

  1. ices/77329.rs: fixed with errors

    === stdout ===
    === stderr ===
    warning: unnecessary braces around const expression
     --> /home/runner/work/glacier/glacier/ices/77329.rs:1:42
      |
    1 | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| { x } }]> {
      |                                          ^^^^^^^^^^^^^^^^^^^ help: remove these braces
      |
      = note: `#[warn(unused_braces)]` on by default
    
    error[E0601]: `main` function not found in crate `77329`
     --> /home/runner/work/glacier/glacier/ices/77329.rs:1:1
      |
    1 | / fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| { x } }]> {
    2 | |     std::iter::empty()
    3 | | }
      | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/77329.rs`
    
    error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
     --> /home/runner/work/glacier/glacier/ices/77329.rs:1:45
      |
    1 | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| { x } }]> {
      |                                             ^ doesn't have a size known at compile-time
      |
      = help: the trait `Sized` is not implemented for `[u8]`
      = help: unsized locals are gated as an unstable feature
    help: function arguments must have a statically known size, borrowed types always have a known size
      |
    1 | fn bug<T>() -> impl Iterator<Item = [(); { |x: &[u8]| { x } }]> {
      |                                                ^
    
    error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
     --> /home/runner/work/glacier/glacier/ices/77329.rs:1:54
      |
    1 | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| { x } }]> {
      |                                                      ^ doesn't have a size known at compile-time
      |
      = help: the trait `Sized` is not implemented for `[u8]`
      = note: the return type of a function must have a statically known size
    
    error[E0308]: mismatched types
     --> /home/runner/work/glacier/glacier/ices/77329.rs:1:44
      |
    1 | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| { x } }]> {
      |                                            ^^^^^^^^^^^^^^^ expected `usize`, found closure
      |
      = note: expected type `usize`
              found closure `[closure@/home/runner/work/glacier/glacier/ices/77329.rs:1:44: 1:59]`
    
    error: aborting due to 4 previous errors; 1 warning emitted
    
    Some errors have detailed explanations: E0277, E0308, E0601.
    For more information about an error, try `rustc --explain E0277`.
    ==============
    rustbot committed Oct 26, 2020
    Configuration menu
    Copy the full SHA
    56303d8 View commit details
    Browse the repository at this point in the history