glacier
glacier copied to clipboard
ices/111906-3.rs: fixed with no errors
Issue: https://github.com/rust-lang/rust/issues/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
==============