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

ices/86850.rs: fixed with errors #1041

Merged
merged 1 commit into from
Dec 6, 2021
Merged

ices/86850.rs: fixed with errors #1041

merged 1 commit into from
Dec 6, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 6, 2021

Issue: rust-lang/rust#86850

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
use core::marker::PhantomData;

pub trait Foo {
    const SIZE: usize;
}

pub struct Bar<T>(PhantomData<T>);
impl<T: Foo> Bar<T> {
    pub fn new(array: [(); T::SIZE]) -> Self {
        Self(PhantomData)
    }
    pub fn bar(self) -> Bar<T>
    where
        [(); T::SIZE]: ,
    {
        Bar::new([(); T::SIZE])
    }
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `86850`
  --> /home/runner/work/glacier/glacier/ices/86850.rs:1:1
   |
1  | / #![feature(generic_const_exprs)]
2  | | #![allow(incomplete_features)]
3  | | use core::marker::PhantomData;
4  | |
...  |
19 | |     }
20 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/86850.rs`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `86850`
  --> /home/runner/work/glacier/glacier/ices/86850.rs:1:1
   |
1  | / #![feature(generic_const_exprs)]
2  | | #![allow(incomplete_features)]
3  | | use core::marker::PhantomData;
4  | |
...  |
19 | |     }
20 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/86850.rs`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0601`.
==============
@Alexendoo Alexendoo merged commit ac8fefe into master Dec 6, 2021
@Alexendoo Alexendoo deleted the autofix/ices/86850.rs branch December 6, 2021 13:42
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