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

ices/100612.sh: fixed with no errors #1609

Merged
merged 1 commit into from
Jun 24, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#100612

#!/bin/bash

rustc "-Cdebuginfo=2" - <<'EOF'

// run-pass
#![feature(repr128, arbitrary_enum_discriminant)]
//~^ WARN the feature `repr128` is incomplete

#[derive(PartialEq, Debug)]
#[repr(i128)]
enum Test {
    A(Box<u64>) = 0,
    B(usize) = u64::MAX as i128 + 1,
}

fn main() {
    assert_ne!(Test::A(Box::new(2)), Test::B(0));
    // This previously caused a segfault.
    //
    // See https://github.com/rust-lang/rust/issues/70509#issuecomment-620654186
    // for a detailed explanation.
}

EOF
=== stdout ===
=== stderr ===
warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
 --> <anon>:3:12
  |
3 | #![feature(repr128, arbitrary_enum_discriminant)]
  |            ^^^^^^^
  |
  = note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
  = note: `#[warn(incomplete_features)]` on by default

warning: the feature `arbitrary_enum_discriminant` has been stable since 1.66.0 and no longer requires an attribute to enable
 --> <anon>:3:21
  |
3 | #![feature(repr128, arbitrary_enum_discriminant)]
  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

warning: 2 warnings emitted

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

=== stdout ===
=== stderr ===
warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
 --> <anon>:3:12
  |
3 | #![feature(repr128, arbitrary_enum_discriminant)]
  |            ^^^^^^^
  |
  = note: see issue #56071 <rust-lang/rust#56071> for more information
  = note: `#[warn(incomplete_features)]` on by default

warning: the feature `arbitrary_enum_discriminant` has been stable since 1.66.0 and no longer requires an attribute to enable
 --> <anon>:3:21
  |
3 | #![feature(repr128, arbitrary_enum_discriminant)]
  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

warning: 2 warnings emitted

==============
@JohnTitor JohnTitor merged commit 92cfad4 into master Jun 24, 2023
@JohnTitor JohnTitor deleted the autofix/ices/100612.sh branch June 24, 2023 05:37
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