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

ices/78246.rs: fixed with errors #656

Merged
merged 1 commit into from
Feb 17, 2021
Merged

ices/78246.rs: fixed with errors #656

merged 1 commit into from
Feb 17, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#78246

#![feature(const_generics, const_evaluatable_checked)]

pub trait Ice {
    type Array;

    fn into_bytes(self) -> Self::Array;
}

impl<T: Ice, const N: usize> Ice for [T; N]
where
    [(); std::mem::size_of::<T::Array>() * N]: ,
{
    type Array = [(); std::mem::size_of::<T::Array>() * N];

    fn into_bytes(self) -> Self::Array {}
}

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

warning: the feature `const_evaluatable_checked` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/78246.rs:1:28
  |
1 | #![feature(const_generics, const_evaluatable_checked)]
  |                            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

error[E0308]: mismatched types
  --> /home/runner/work/glacier/glacier/ices/78246.rs:15:28
   |
15 |     fn into_bytes(self) -> Self::Array {}
   |        ----------          ^^^^^^^^^^^ expected array `[(); _]`, found `()`
   |        |
   |        implicitly returns `()` as its body has no tail or `return` expression

error: aborting due to previous error; 2 warnings emitted

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

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

warning: the feature `const_evaluatable_checked` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/78246.rs:1:28
  |
1 | #![feature(const_generics, const_evaluatable_checked)]
  |                            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <rust-lang/rust#76560> for more information

error[E0308]: mismatched types
  --> /home/runner/work/glacier/glacier/ices/78246.rs:15:28
   |
15 |     fn into_bytes(self) -> Self::Array {}
   |        ----------          ^^^^^^^^^^^ expected array `[(); _]`, found `()`
   |        |
   |        implicitly returns `()` as its body has no tail or `return` expression

error: aborting due to previous error; 2 warnings emitted

For more information about this error, try `rustc --explain E0308`.
==============
@JohnTitor JohnTitor merged commit 7270038 into master Feb 17, 2021
@JohnTitor JohnTitor deleted the autofix/ices/78246.rs branch February 17, 2021 16:45
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