rust/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs
Eric Huss 2da2ade0f7 Rename tests to ensure they don't have overlapping names.
Some tests will delete their output directory before starting.
The output directory is based on the test names.
If one test is the prefix of another test, then when that test
starts, it could try to delete the output directory of the other
test with the longer path.
2023-03-22 21:12:40 -07:00

13 lines
268 B
Rust

// Test that multiple lifetimes are allowed in impl trait types.
// build-pass (FIXME(62277): could be check-pass?)
trait X<'x>: Sized {}
impl<U> X<'_> for U {}
fn multiple_lifeteimes<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl X<'b> + 'a {
x
}
fn main() {}