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

ices/97625.sh: fixed with errors #1338

Merged
merged 1 commit into from
Jul 12, 2022
Merged

ices/97625.sh: fixed with errors #1338

merged 1 commit into from
Jul 12, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#97625

#!/bin/sh

rustc -Cinstrument-coverage - << EOF

#![feature(adt_const_params)]
#![allow(incomplete_features)]

fn eval<const N: f32>() -> f32 {
  N
}

fn main() {
  println!("{}", eval::<0.5>());
}

EOF
=== stdout ===
=== stderr ===
error[E0741]: `f32` is forbidden as the type of a const generic parameter
 --> <anon>:5:18
  |
5 | fn eval<const N: f32>() -> f32 {
  |                  ^^^
  |
  = note: floats do not derive `Eq` or `Ord`, which are required for const parameters

error: aborting due to previous error

For more information about this error, try `rustc --explain E0741`.
==============

=== stdout ===
=== stderr ===
error[E0741]: `f32` is forbidden as the type of a const generic parameter
 --> <anon>:5:18
  |
5 | fn eval<const N: f32>() -> f32 {
  |                  ^^^
  |
  = note: floats do not derive `Eq` or `Ord`, which are required for const parameters

error: aborting due to previous error

For more information about this error, try `rustc --explain E0741`.
==============
@Alexendoo Alexendoo merged commit 86f8f03 into master Jul 12, 2022
@Alexendoo Alexendoo deleted the autofix/ices/97625.sh branch July 12, 2022 12:03
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