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

ices/54038.rs: fixed with errors #576

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#54038

struct Foo<'a> {
    data: &'a [u8],
}

impl<'a> Foo<'a> {
    const LEN: usize = 4;
    fn bar(buf: &mut [u8; Self::LEN]) {
        unimplemented!()
    }
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `54038`
  --> /home/runner/work/glacier/glacier/ices/54038.rs:1:1
   |
1  | / struct Foo<'a> {
2  | |     data: &'a [u8],
3  | | }
4  | |
...  |
9  | |     }
10 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/54038.rs`

error: generic `Self` types are currently not permitted in anonymous constants
 --> /home/runner/work/glacier/glacier/ices/54038.rs:7:27
  |
7 |     fn bar(buf: &mut [u8; Self::LEN]) {
  |                           ^^^^^^^^^
  |
note: not a concrete type
 --> /home/runner/work/glacier/glacier/ices/54038.rs:5:10
  |
5 | impl<'a> Foo<'a> {
  |          ^^^^^^^

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `54038`
  --> /home/runner/work/glacier/glacier/ices/54038.rs:1:1
   |
1  | / struct Foo<'a> {
2  | |     data: &'a [u8],
3  | | }
4  | |
...  |
9  | |     }
10 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/54038.rs`

error: generic `Self` types are currently not permitted in anonymous constants
 --> /home/runner/work/glacier/glacier/ices/54038.rs:7:27
  |
7 |     fn bar(buf: &mut [u8; Self::LEN]) {
  |                           ^^^^^^^^^
  |
note: not a concrete type
 --> /home/runner/work/glacier/glacier/ices/54038.rs:5:10
  |
5 | impl<'a> Foo<'a> {
  |          ^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0601`.
==============
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/54038.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