2024-02-16 20:02:50 +00:00
|
|
|
//@ run-rustfix
|
2022-12-26 15:43:31 -08:00
|
|
|
|
|
|
|
#![allow(warnings)]
|
|
|
|
|
2023-09-08 01:35:51 +00:00
|
|
|
fn no_restriction<'a, T: 'a>(x: &'a ()) -> &'a () {
|
2022-12-26 15:43:31 -08:00
|
|
|
with_restriction::<T>(x) //~ ERROR E0311
|
|
|
|
}
|
|
|
|
|
|
|
|
fn with_restriction<'a, T: 'a>(x: &'a ()) -> &'a () {
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|