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

ices/62879.rs: fixed with errors #437

Merged
merged 1 commit into from
Jul 17, 2020
Merged

ices/62879.rs: fixed with errors #437

merged 1 commit into from
Jul 17, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#62879

#![feature(const_generics)]

fn foo<const N: usize, const A: [u8; N]>() {}

fn bar() {
    foo::<1, {[1]}>();
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0770]: the type of const parameters must not depend on other generic parameters
 --> /home/runner/work/glacier/glacier/ices/62879.rs:3:38
  |
3 | fn foo<const N: usize, const A: [u8; N]>() {}
  |                                      ^ the type must not depend on the parameter `N`

warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/62879.rs: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

error: constant expression depends on a generic parameter
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:14
  |
6 |     foo::<1, {[1]}>();
  |              ^^^^^
  |
  = note: this may fail depending on what value the parameter takes

error: aborting due to 2 previous errors; 1 warning emitted

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

=== stdout ===
=== stderr ===
error[E0770]: the type of const parameters must not depend on other generic parameters
 --> /home/runner/work/glacier/glacier/ices/62879.rs:3:38
  |
3 | fn foo<const N: usize, const A: [u8; N]>() {}
  |                                      ^ the type must not depend on the parameter `N`

warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/62879.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44580 <rust-lang/rust#44580> for more information

error: constant expression depends on a generic parameter
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:14
  |
6 |     foo::<1, {[1]}>();
  |              ^^^^^
  |
  = note: this may fail depending on what value the parameter takes

error: aborting due to 2 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0770`.
==============
@Alexendoo Alexendoo merged commit 0d5743e into master Jul 17, 2020
@JohnTitor JohnTitor deleted the autofix/ices/62879.rs branch July 19, 2020 14:34
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