-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
A-chalkchalk related issuechalk related issueA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bugS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
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()
}
kornelski, Trard, edmorley and your-diaryTommyAmberson
Metadata
Metadata
Assignees
Labels
A-chalkchalk related issuechalk related issueA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bugS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now