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

ices/113481.rs: fixed with errors #1645

Merged
merged 1 commit into from
Oct 15, 2023
Merged

ices/113481.rs: fixed with errors #1645

merged 1 commit into from
Oct 15, 2023

Conversation

github-actions[bot]
Copy link
Contributor

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

Issue: rust-lang/rust#113481

trait Foo {
    type Bar<'x>
    where
        Self: 'x;
}

fn baz() -> impl for<'y> Foo<Bar<'y> = impl ToString> {
    42
}

impl Foo for i32 {
    type Bar<'x> = &'x str;
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `113481`
  --> /home/runner/work/glacier/glacier/ices/113481.rs:13:2
   |
13 | }
   |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/113481.rs`

error[E0700]: hidden type for `impl ToString` captures lifetime that does not appear in bounds
 --> /home/runner/work/glacier/glacier/ices/113481.rs:8:5
  |
7 | fn baz() -> impl for<'y> Foo<Bar<'y> = impl ToString> {
  |                      --                ------------- opaque type defined here
  |                      |
  |                      hidden type `&'y str` captures the lifetime `'y` as defined here
8 |     42
  |     ^^

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 `113481`
  --> /home/runner/work/glacier/glacier/ices/113481.rs:13:2
   |
13 | }
   |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/113481.rs`

error[E0700]: hidden type for `impl ToString` captures lifetime that does not appear in bounds
 --> /home/runner/work/glacier/glacier/ices/113481.rs:8:5
  |
7 | fn baz() -> impl for<'y> Foo<Bar<'y> = impl ToString> {
  |                      --                ------------- opaque type defined here
  |                      |
  |                      hidden type `&'y str` captures the lifetime `'y` as defined here
8 |     42
  |     ^^

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 ff3e9b1 into master Oct 15, 2023
@JohnTitor JohnTitor deleted the autofix/ices/113481.rs branch October 15, 2023 03:08
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