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

ices/108952.rs: fixed with errors #1651

Merged
merged 1 commit into from
Oct 15, 2023
Merged

ices/108952.rs: fixed with errors #1651

merged 1 commit into from
Oct 15, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#108952

#![allow(incomplete_features)]
#![feature(adt_const_params)]

struct LifetimeGeneric<'a>(&'a ());

struct UwU<'b, const T: LifetimeGeneric>(&'b ());

fn main() {}
=== stdout ===
=== stderr ===
error[E0106]: missing lifetime specifier
 --> /home/runner/work/glacier/glacier/ices/108952.rs:6:25
  |
6 | struct UwU<'b, const T: LifetimeGeneric>(&'b ());
  |                         ^^^^^^^^^^^^^^^ expected named lifetime parameter

error[E0741]: `LifetimeGeneric<'_>` must implement `ConstParamTy` to be used as the type of a const generic parameter
 --> /home/runner/work/glacier/glacier/ices/108952.rs:6:25
  |
6 | struct UwU<'b, const T: LifetimeGeneric>(&'b ());
  |                         ^^^^^^^^^^^^^^^
  |
help: add `#[derive(ConstParamTy, PartialEq, Eq)]` to the struct
  |
4 + #[derive(ConstParamTy, PartialEq, Eq)]
5 | struct LifetimeGeneric<'a>(&'a ());
  |

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0106]: missing lifetime specifier
 --> /home/runner/work/glacier/glacier/ices/108952.rs:6:25
  |
6 | struct UwU<'b, const T: LifetimeGeneric>(&'b ());
  |                         ^^^^^^^^^^^^^^^ expected named lifetime parameter

error[E0741]: `LifetimeGeneric<'_>` must implement `ConstParamTy` to be used as the type of a const generic parameter
 --> /home/runner/work/glacier/glacier/ices/108952.rs:6:25
  |
6 | struct UwU<'b, const T: LifetimeGeneric>(&'b ());
  |                         ^^^^^^^^^^^^^^^
  |
help: add `#[derive(ConstParamTy, PartialEq, Eq)]` to the struct
  |
4 + #[derive(ConstParamTy, PartialEq, Eq)]
5 | struct LifetimeGeneric<'a>(&'a ());
  |

error: aborting due to 2 previous errors

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