rust/tests/ui/feature-gates/feature-gate-shorter_tail_lifetimes.rs
2024-06-18 04:14:43 +08:00

9 lines
157 B
Rust

fn f() -> usize {
let c = std::cell::RefCell::new("..");
c.borrow().len() //~ ERROR: `c` does not live long enough
}
fn main() {
let _ = f();
}