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

ices/52808.rs: fixed with errors #575

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#52808

struct Foo<'a> { x: &'a () }

impl<'a> Foo<'a> {
    const X: usize = 0;

    fn foo(_: [u8; Self::X]) {}
}


fn main() {}
=== stdout ===
=== stderr ===
error: generic `Self` types are currently not permitted in anonymous constants
 --> /home/runner/work/glacier/glacier/ices/52808.rs:6:20
  |
6 |     fn foo(_: [u8; Self::X]) {}
  |                    ^^^^^^^
  |
note: not a concrete type
 --> /home/runner/work/glacier/glacier/ices/52808.rs:3:10
  |
3 | impl<'a> Foo<'a> {
  |          ^^^^^^^

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error: generic `Self` types are currently not permitted in anonymous constants
 --> /home/runner/work/glacier/glacier/ices/52808.rs:6:20
  |
6 |     fn foo(_: [u8; Self::X]) {}
  |                    ^^^^^^^
  |
note: not a concrete type
 --> /home/runner/work/glacier/glacier/ices/52808.rs:3:10
  |
3 | impl<'a> Foo<'a> {
  |          ^^^^^^^

error: aborting due to previous error

==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was closed as duplicate.

@Alexendoo Alexendoo deleted the autofix/ices/52808.rs branch January 2, 2021 14:07
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