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

ices/67945-1.rs: fixed with errors #586

Closed
wants to merge 1 commit into from

Commits on Dec 28, 2020

  1. ices/67945-1.rs: fixed with errors

    === stdout ===
    === stderr ===
    error: generic parameters may not be used in const operations
     --> /home/runner/work/glacier/glacier/ices/67945-1.rs:8:16
      |
    8 |         let x: S = MaybeUninit::uninit();
      |                ^ cannot perform const operation using `S`
      |
      = note: type parameters may not be used in const expressions
      = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
    
    error: generic parameters may not be used in const operations
     --> /home/runner/work/glacier/glacier/ices/67945-1.rs:9:45
      |
    9 |         let b = &*(&x as *const _ as *const S);
      |                                             ^ cannot perform const operation using `S`
      |
      = note: type parameters may not be used in const expressions
      = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
    
    warning: unused import: `std::marker::PhantomData`
     --> /home/runner/work/glacier/glacier/ices/67945-1.rs:2:5
      |
    2 | use std::marker::PhantomData;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = note: `#[warn(unused_imports)]` on by default
    
    warning: unused import: `self`
     --> /home/runner/work/glacier/glacier/ices/67945-1.rs:4:16
      |
    4 | use std::mem::{self, MaybeUninit};
      |                ^^^^
    
    error[E0601]: `main` function not found in crate `67945_1`
      --> /home/runner/work/glacier/glacier/ices/67945-1.rs:2:1
       |
    2  | / use std::marker::PhantomData;
    3  | |
    4  | | use std::mem::{self, MaybeUninit};
    5  | |
    ...  |
    11 | |     }],
    12 | | }
       | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/67945-1.rs`
    
    error[E0392]: parameter `S` is never used
     --> /home/runner/work/glacier/glacier/ices/67945-1.rs:6:12
      |
    6 | struct Bug<S> {
      |            ^ unused parameter
      |
      = help: consider removing `S`, referring to it in a field, or using a marker such as `PhantomData`
    
    error: aborting due to 4 previous errors; 2 warnings emitted
    
    Some errors have detailed explanations: E0392, E0601.
    For more information about an error, try `rustc --explain E0392`.
    ==============
    rustbot committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    ec8bef0 View commit details
    Browse the repository at this point in the history