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

ices/113462.rs: fixed with errors #1652

Merged
merged 1 commit into from
Oct 15, 2023
Merged

ices/113462.rs: fixed with errors #1652

merged 1 commit into from
Oct 15, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#113462

#[derive(Default)]
struct NonGeneric<'a, const N: NonGeneric> {}
=== stdout ===
=== stderr ===
error[E0106]: missing lifetime specifier
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:32
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                ^^^^^^^^^^ expected named lifetime parameter

error[E0601]: `main` function not found in crate `113462`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:46
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                              ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/113462.rs`

error[E0107]: missing generics for struct `NonGeneric`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:32
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                ^^^^^^^^^^ expected 1 generic argument
  |
note: struct defined here, with 1 generic parameter: `N`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:8
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |        ^^^^^^^^^^     -------------------
help: add missing generic argument
  |
2 | struct NonGeneric<'a, const N: NonGeneric<N>> {}
  |                                          +++

error[E0391]: cycle detected when computing type of `NonGeneric::N`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:32
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                ^^^^^^^^^^
  |
  = note: ...which immediately requires computing type of `NonGeneric::N` again
note: cycle used when computing type of `NonGeneric`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:1
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0391]: cycle detected when computing type of `NonGeneric`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:1
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: ...which requires computing type of `NonGeneric::N`...
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:32
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                ^^^^^^^^^^
  = note: ...which again requires computing type of `NonGeneric`, completing the cycle
note: cycle used when collecting item types in top-level module
 --> /home/runner/work/glacier/glacier/ices/113462.rs:1:1
  |
1 | / #[derive(Default)]
2 | | struct NonGeneric<'a, const N: NonGeneric> {}
  | |_____________________________________________^
  = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0106, E0107, E0391, E0601.
For more information about an error, try `rustc --explain E0106`.
==============

=== stdout ===
=== stderr ===
error[E0106]: missing lifetime specifier
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:32
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                ^^^^^^^^^^ expected named lifetime parameter

error[E0601]: `main` function not found in crate `113462`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:46
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                              ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/113462.rs`

error[E0107]: missing generics for struct `NonGeneric`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:32
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                ^^^^^^^^^^ expected 1 generic argument
  |
note: struct defined here, with 1 generic parameter: `N`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:8
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |        ^^^^^^^^^^     -------------------
help: add missing generic argument
  |
2 | struct NonGeneric<'a, const N: NonGeneric<N>> {}
  |                                          +++

error[E0391]: cycle detected when computing type of `NonGeneric::N`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:32
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                ^^^^^^^^^^
  |
  = note: ...which immediately requires computing type of `NonGeneric::N` again
note: cycle used when computing type of `NonGeneric`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:1
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0391]: cycle detected when computing type of `NonGeneric`
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:1
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: ...which requires computing type of `NonGeneric::N`...
 --> /home/runner/work/glacier/glacier/ices/113462.rs:2:32
  |
2 | struct NonGeneric<'a, const N: NonGeneric> {}
  |                                ^^^^^^^^^^
  = note: ...which again requires computing type of `NonGeneric`, completing the cycle
note: cycle used when collecting item types in top-level module
 --> /home/runner/work/glacier/glacier/ices/113462.rs:1:1
  |
1 | / #[derive(Default)]
2 | | struct NonGeneric<'a, const N: NonGeneric> {}
  | |_____________________________________________^
  = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0106, E0107, E0391, E0601.
For more information about an error, try `rustc --explain E0106`.
==============
@JohnTitor JohnTitor merged commit 2c15b21 into master Oct 15, 2023
@JohnTitor JohnTitor deleted the autofix/ices/113462.rs branch October 15, 2023 03:03
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