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

Conversation

@github-actions
Copy link
Contributor

Issue: rust-lang/rust#80561

#![feature(const_generics)]
#![feature(const_evaluatable_checked)]
pub struct SimpleStruct<const N: usize>([u8; N]);

impl<const N: usize> SimpleStruct<N> {
    pub fn new() -> Self {
        loop {}
    }
}

pub trait TraitA {
    const SIZE: usize;
    fn zero()
    where
        [(); Self::SIZE]: ,
    {
        let _ = SimpleStruct::<{ Self::SIZE }>::new();
    }
}

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/80561.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = 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/80561.rs:2:12
  |
2 | #![feature(const_evaluatable_checked)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

warning: 2 warnings emitted

==============

=== 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/80561.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = 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/80561.rs:2:12
  |
2 | #![feature(const_evaluatable_checked)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <rust-lang/rust#76560> for more information

warning: 2 warnings emitted

==============
@JohnTitor JohnTitor merged commit ce36f96 into master Feb 17, 2021
@JohnTitor JohnTitor deleted the autofix/ices/80561.rs branch February 17, 2021 16:44
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