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

ices/111906-3.rs: fixed with no errors #1722

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#111906

fn foo<'a: 'a>() -> impl Sized + 'a {
    let _: *mut &'a () = foo::<'a>();
    loop {}
}

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

warning: function `foo` is never used
 --> /home/runner/work/glacier/glacier/ices/111906-3.rs:1:4
  |
1 | fn foo<'a: 'a>() -> impl Sized + 'a {
  |    ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 2 warnings emitted

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

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

warning: function `foo` is never used
 --> /home/runner/work/glacier/glacier/ices/111906-3.rs:1:4
  |
1 | fn foo<'a: 'a>() -> impl Sized + 'a {
  |    ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 2 warnings emitted

==============
# 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