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

ices/63695.rs: fixed with errors #318

Merged
merged 1 commit into from
Mar 24, 2020
Merged

ices/63695.rs: fixed with errors #318

merged 1 commit into from
Mar 24, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#63695

#![feature(const_generics)]
fn test<const A: i32>() -> i32 { A }

trait T {
    fn test<const A: i32>(&self) -> i32 { A }
}

struct S();

impl T for S {}

fn main() {
  let foo = S();
  println!("{}", test::<{8i32}>());
  println!("{}", foo.test::<{16i32}>());  // <- Causes ICE
}
=== stdout ===
=== stderr ===
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
 --> /home/runner/work/glacier/glacier/ices/63695.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default

error: erroneous constant encountered
 --> /home/runner/work/glacier/glacier/ices/63695.rs:5:43
  |
5 |     fn test<const A: i32>(&self) -> i32 { A }
  |                                           ^

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
 --> /home/runner/work/glacier/glacier/ices/63695.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default

error: erroneous constant encountered
 --> /home/runner/work/glacier/glacier/ices/63695.rs:5:43
  |
5 |     fn test<const A: i32>(&self) -> i32 { A }
  |                                           ^

error: aborting due to previous error

==============
@Alexendoo Alexendoo merged commit 814e8f4 into master Mar 24, 2020
@Alexendoo Alexendoo deleted the autofix/ices/63695.rs branch March 24, 2020 12:29
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