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