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 #218

Merged
merged 1 commit into from
Dec 5, 2019
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 5, 2019

Issue: rust-lang/rust#62879

#![feature(const_generics)]
trait Foo {}

impl<const N: usize> Foo for [(); N]
where
    Self:FooImpl<{N==0}>
{}

trait FooImpl<const IS_ZERO: bool>{}

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

error[E0391]: cycle detected when const-evaluating + checking `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
  |
note: ...which requires const-evaluating + checking `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`...
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
note: ...which requires const-evaluating `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`...
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
note: ...which requires processing `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`...
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
note: ...which requires processing `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`...
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
  = note: ...which again requires const-evaluating + checking `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`, completing the cycle
note: cycle used when processing `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>`
 --> /home/runner/work/glacier/glacier/ices/62879.rs:4:1
  |
4 | / impl<const N: usize> Foo for [(); N]
5 | | where
6 | |     Self:FooImpl<{N==0}>
7 | | {}
  | |__^

error: aborting due to previous error

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

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

error[E0391]: cycle detected when const-evaluating + checking `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
  |
note: ...which requires const-evaluating + checking `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`...
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
note: ...which requires const-evaluating `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`...
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
note: ...which requires processing `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`...
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
note: ...which requires processing `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`...
 --> /home/runner/work/glacier/glacier/ices/62879.rs:6:18
  |
6 |     Self:FooImpl<{N==0}>
  |                  ^^^^^^
  = note: ...which again requires const-evaluating + checking `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>::{{constant}}#0`, completing the cycle
note: cycle used when processing `<impl at /home/runner/work/glacier/glacier/ices/62879.rs:4:1: 7:3>`
 --> /home/runner/work/glacier/glacier/ices/62879.rs:4:1
  |
4 | / impl<const N: usize> Foo for [(); N]
5 | | where
6 | |     Self:FooImpl<{N==0}>
7 | | {}
  | |__^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0391`.
==============
@Alexendoo Alexendoo merged commit 8a8f4d0 into master Dec 5, 2019
@Alexendoo Alexendoo deleted the autofix/ices/62879.rs branch December 5, 2019 17:49
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