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

ices/111433.rs: fixed with errors #1683

Merged
merged 1 commit into from
Sep 21, 2023
Merged

ices/111433.rs: fixed with errors #1683

merged 1 commit into from
Sep 21, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#111433

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

const fn inner<'a>() -> usize where &'a (): Sized {
    3
}

fn test<'a>() {
    let _: [u8; inner::<'a>()];
    let _ = [0; inner::<'a>()];
}

fn main() {
    test();
}
=== stdout ===
=== stderr ===
error: cannot capture late-bound lifetime in constant
 --> /home/runner/work/glacier/glacier/ices/111433.rs:9:25
  |
8 | fn test<'a>() {
  |         -- lifetime defined here
9 |     let _: [u8; inner::<'a>()];
  |                         ^^

error: cannot capture late-bound lifetime in constant
  --> /home/runner/work/glacier/glacier/ices/111433.rs:10:25
   |
8  | fn test<'a>() {
   |         -- lifetime defined here
9  |     let _: [u8; inner::<'a>()];
10 |     let _ = [0; inner::<'a>()];
   |                         ^^

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error: cannot capture late-bound lifetime in constant
 --> /home/runner/work/glacier/glacier/ices/111433.rs:9:25
  |
8 | fn test<'a>() {
  |         -- lifetime defined here
9 |     let _: [u8; inner::<'a>()];
  |                         ^^

error: cannot capture late-bound lifetime in constant
  --> /home/runner/work/glacier/glacier/ices/111433.rs:10:25
   |
8  | fn test<'a>() {
   |         -- lifetime defined here
9  |     let _: [u8; inner::<'a>()];
10 |     let _ = [0; inner::<'a>()];
   |                         ^^

error: aborting due to 2 previous errors

==============
@JohnTitor JohnTitor merged commit afe0159 into master Sep 21, 2023
@JohnTitor JohnTitor deleted the autofix/ices/111433.rs branch September 21, 2023 18:32
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