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

ices/110726.rs: fixed with errors #1720

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#110726

fn foo<'a>() -> impl Sized + 'a {
    let i: i32 = foo();
    i
}

fn main() {}
=== stdout ===
=== stderr ===
warning: function cannot return without recursing
 --> /home/runner/work/glacier/glacier/ices/110726.rs:1:1
  |
1 | fn foo<'a>() -> impl Sized + 'a {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2 |     let i: i32 = foo();
  |                  ----- recursive call site
  |
  = help: a `loop` may express intention better if this is on purpose
  = note: `#[warn(unconditional_recursion)]` on by default

error[E0792]: expected generic lifetime parameter, found `'_`
 --> /home/runner/work/glacier/glacier/ices/110726.rs:2:18
  |
1 | fn foo<'a>() -> impl Sized + 'a {
  |                              -- this generic parameter must be used with a generic lifetime parameter
2 |     let i: i32 = foo();
  |                  ^^^^^

error: aborting due to 1 previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0792`.
==============

=== stdout ===
=== stderr ===
warning: function cannot return without recursing
 --> /home/runner/work/glacier/glacier/ices/110726.rs:1:1
  |
1 | fn foo<'a>() -> impl Sized + 'a {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
2 |     let i: i32 = foo();
  |                  ----- recursive call site
  |
  = help: a `loop` may express intention better if this is on purpose
  = note: `#[warn(unconditional_recursion)]` on by default

error[E0792]: expected generic lifetime parameter, found `'_`
 --> /home/runner/work/glacier/glacier/ices/110726.rs:2:18
  |
1 | fn foo<'a>() -> impl Sized + 'a {
  |                              -- this generic parameter must be used with a generic lifetime parameter
2 |     let i: i32 = foo();
  |                  ^^^^^

error: aborting due to 1 previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0792`.
==============
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant