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

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Aug 5, 2023

Issue: rust-lang/rust#97099

pub trait Trait<'a> {
    type Assoc;
}

struct Struct;
impl<'a> Trait<'a> for Struct {
    type Assoc = &'a u32;
}

fn blah() -> impl for<'a> Trait<'a, Assoc = impl Sized> {
    Struct
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `97099_1`
  --> /home/runner/work/glacier/glacier/ices/97099-1.rs:12:2
   |
12 | }
   |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/97099-1.rs`

error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
  --> /home/runner/work/glacier/glacier/ices/97099-1.rs:11:5
   |
10 | fn blah() -> impl for<'a> Trait<'a, Assoc = impl Sized> {
   |                       --                    ---------- opaque type defined here
   |                       |
   |                       hidden type `&'a u32` captures the lifetime `'a` as defined here
11 |     Struct
   |     ^^^^^^

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `97099_1`
  --> /home/runner/work/glacier/glacier/ices/97099-1.rs:12:2
   |
12 | }
   |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/97099-1.rs`

error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
  --> /home/runner/work/glacier/glacier/ices/97099-1.rs:11:5
   |
10 | fn blah() -> impl for<'a> Trait<'a, Assoc = impl Sized> {
   |                       --                    ---------- opaque type defined here
   |                       |
   |                       hidden type `&'a u32` captures the lifetime `'a` as defined here
11 |     Struct
   |     ^^^^^^

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0601, E0700.
For more information about an error, try `rustc --explain E0601`.
==============
@JohnTitor JohnTitor merged commit a64dca4 into master Sep 17, 2023
@JohnTitor JohnTitor deleted the autofix/ices/97099-1.rs branch September 17, 2023 14:35
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