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

ices/86953.sh: fixed with no errors #907

Merged
merged 1 commit into from
Aug 23, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#86953

#!/usr/bin/env bash

rustc - --crate-type=lib -C incremental=foo << 'EOF'
#![feature(const_generics)]
#![feature(const_evaluatable_checked)]

use std::ops::Add;

pub struct StackBitSet<const N: usize> where [(); 0]: Sized;

impl<const N: usize, const M: usize> Add<&StackBitSet<M>> for StackBitSet<N>
where
    [(); 0+0]: Sized, // changing 0+0 to 0 makes this work
    [(); 0]: Sized,
    [(); 0]: Sized,
{
    type Output = StackBitSet<0>;
    fn add(self, _: &StackBitSet<M>) -> Self::Output {
        loop {}
    }
}

#[test]
fn bitset_create() {
    let _a: StackBitSet<42> = StackBitSet;
}
EOF
=== stdout ===
=== stderr ===
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
 --> <anon>: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
 --> <anon>: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
 --> <anon>: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
 --> <anon>:2:12
  |
2 | #![feature(const_evaluatable_checked)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <rust-lang/rust#76560> for more information

warning: 2 warnings emitted

==============
@Alexendoo Alexendoo merged commit 057f144 into master Aug 23, 2021
@Alexendoo Alexendoo deleted the autofix/ices/86953.sh branch August 23, 2021 13:39
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