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

ices/86033.rs: fixed with errors #1040

Merged
merged 1 commit into from
Dec 6, 2021
Merged

ices/86033.rs: fixed with errors #1040

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#86033

#![feature(generic_const_exprs)]

pub trait IsTrue<const T: bool> {}
impl IsTrue<true> for () {}

pub trait IsZST {}

impl<T> IsZST for T
where
    (): IsTrue<{ std::mem::size_of::<T>() == 0 }>
{}

fn func() -> impl IsZST {
    || {}
}
=== stdout ===
=== stderr ===
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/86033.rs:1:12
  |
1 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

error[E0601]: `main` function not found in crate `86033`
  --> /home/runner/work/glacier/glacier/ices/86033.rs:1:1
   |
1  | / #![feature(generic_const_exprs)]
2  | |
3  | | pub trait IsTrue<const T: bool> {}
4  | | impl IsTrue<true> for () {}
...  |
14 | |     || {}
15 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/86033.rs`

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/86033.rs:1:12
  |
1 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #76560 <rust-lang/rust#76560> for more information

error[E0601]: `main` function not found in crate `86033`
  --> /home/runner/work/glacier/glacier/ices/86033.rs:1:1
   |
1  | / #![feature(generic_const_exprs)]
2  | |
3  | | pub trait IsTrue<const T: bool> {}
4  | | impl IsTrue<true> for () {}
...  |
14 | |     || {}
15 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/86033.rs`

error: aborting due to previous error; 1 warning emitted

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/86033.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