mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-30 00:03:49 +00:00

Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
15 lines
253 B
Rust
15 lines
253 B
Rust
//@ run-pass
|
|
// Test lifetimes are linked properly when we autoslice a vector.
|
|
// Issue #3148.
|
|
|
|
|
|
fn subslice<F>(v: F) -> F where F: FnOnce() { v }
|
|
|
|
fn both<F>(v: F) -> F where F: FnOnce() {
|
|
subslice(subslice(v))
|
|
}
|
|
|
|
pub fn main() {
|
|
both(main);
|
|
}
|