blob: 960f2f1bb13f1927fb740acd432fc57208439f14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//@ run-rustfix
//@ rustfix-only-machine-applicable
// Make sure that simple overcapture suggestions remain machine applicable.
#![allow(unused)]
#![deny(impl_trait_overcaptures)]
fn named<'a>(x: &'a i32) -> impl Sized + use<> { *x }
//~^ ERROR `impl Sized` will capture more lifetimes than possibly intended in edition 2024
//~| WARN this changes meaning in Rust 2024
fn main() {}
|