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

ices/69414.sh: fixed with errors #438

Merged
merged 1 commit into from
Jul 17, 2020
Merged

ices/69414.sh: fixed with errors #438

merged 1 commit into from
Jul 17, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#69414

#!/bin/bash

rustc -Zsave-analysis - <<END
use std::marker::PhantomData;

struct B<T, const N: T>(PhantomData<[T; N]>); //~ ERROR const generics are unstable
//~^ ERROR the types of const generic parameters must derive `PartialEq` and `Eq`

fn main() {}
END
=== stdout ===
=== stderr ===
/home/runner/work/glacier/glacier/ices/69414.sh: line 3: PartialEq: command not found
/home/runner/work/glacier/glacier/ices/69414.sh: line 3: Eq: command not found
error[E0770]: the type of const parameters must not depend on other generic parameters
 --> <anon>:3:22
  |
3 | struct B<T, const N: T>(PhantomData<[T; N]>); //~ ERROR const generics are unstable
  |                      ^ the type must not depend on the parameter `T`

error[E0658]: const generics are unstable
 --> <anon>:3:19
  |
3 | struct B<T, const N: T>(PhantomData<[T; N]>); //~ ERROR const generics are unstable
  |                   ^
  |
  = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
  = help: add `#![feature(const_generics)]` to the crate attributes to enable

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0658, E0770.
For more information about an error, try `rustc --explain E0658`.
==============

=== stdout ===
=== stderr ===
/home/runner/work/glacier/glacier/ices/69414.sh: line 3: PartialEq: command not found
/home/runner/work/glacier/glacier/ices/69414.sh: line 3: Eq: command not found
error[E0770]: the type of const parameters must not depend on other generic parameters
 --> <anon>:3:22
  |
3 | struct B<T, const N: T>(PhantomData<[T; N]>); //~ ERROR const generics are unstable
  |                      ^ the type must not depend on the parameter `T`

error[E0658]: const generics are unstable
 --> <anon>:3:19
  |
3 | struct B<T, const N: T>(PhantomData<[T; N]>); //~ ERROR const generics are unstable
  |                   ^
  |
  = note: see issue #44580 <rust-lang/rust#44580> for more information
  = help: add `#![feature(const_generics)]` to the crate attributes to enable

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0658, E0770.
For more information about an error, try `rustc --explain E0658`.
==============
@Alexendoo Alexendoo merged commit 8b46d33 into master Jul 17, 2020
@JohnTitor JohnTitor deleted the autofix/ices/69414.sh 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