Open
Description
rust-analyzer version: bc08b8e 2022-03-28 stable
rustc version: 1.59.0 (9d1b2106e 2022-02-23)
I tried the example in https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/ and found that r-a gives wrong diagnostics.
The source code:
use std::fmt::Debug;
fn print_me_later(x: &dyn Debug) -> impl FnOnce() + '_ {
move || println!("{x:?}")
}
fn main() {
let f = print_me_later(&22);
f()
}