2022-12-26 15:43:31 -08:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
#![allow(warnings)]
|
|
|
|
|
2022-08-26 15:01:49 -04:00
|
|
|
fn no_restriction<T>(x: &()) -> &() {
|
|
|
|
with_restriction::<T>(x) //~ ERROR E0311
|
2022-08-19 06:27:31 -04:00
|
|
|
}
|
|
|
|
|
2022-08-26 15:01:49 -04:00
|
|
|
fn with_restriction<'a, T: 'a>(x: &'a ()) -> &'a () {
|
|
|
|
x
|
2022-08-19 06:27:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|