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

ices/90847.rs: fixed with errors #1092

Merged
merged 1 commit into from
Jan 17, 2022
Merged

ices/90847.rs: fixed with errors #1092

merged 1 commit into from
Jan 17, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#90847

#![feature(generic_const_exprs)]

struct Foo<const A: [(); 0 + 0]>
    where [(); 0 + 0]: Sized;

pub fn main() {}
=== 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/90847.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: `[(); _]` is forbidden as the type of a const generic parameter
 --> /home/runner/work/glacier/glacier/ices/90847.rs:3:21
  |
3 | struct Foo<const A: [(); 0 + 0]>
  |                     ^^^^^^^^^^^
  |
  = note: the only supported types are integers, `bool` and `char`
  = help: more complex types are supported with `#![feature(adt_const_params)]`

error: aborting due to previous error; 1 warning emitted

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

=== 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/90847.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: `[(); _]` is forbidden as the type of a const generic parameter
 --> /home/runner/work/glacier/glacier/ices/90847.rs:3:21
  |
3 | struct Foo<const A: [(); 0 + 0]>
  |                     ^^^^^^^^^^^
  |
  = note: the only supported types are integers, `bool` and `char`
  = help: more complex types are supported with `#![feature(adt_const_params)]`

error: aborting due to previous error; 1 warning emitted

==============
Copy link
Member

@Alexendoo Alexendoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't ICE with #![feature(adt_const_params)] added either

@Alexendoo Alexendoo merged commit 0e2b1bd into master Jan 17, 2022
@Alexendoo Alexendoo deleted the autofix/ices/90847.rs branch January 17, 2022 12:38
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