]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / lifetimes / issue-90600-expected-return-static-indirect.rs
1 use std::cell::RefCell;
2 use std::io::Read;
3
4 fn main() {}
5
6 fn inner(mut foo: &[u8]) {
7     let refcell = RefCell::new(&mut foo);
8     //~^ ERROR `foo` does not live long enough
9     let read = &refcell as &RefCell<dyn Read>;
10     //~^ ERROR lifetime may not live long enough
11
12     read_thing(read);
13 }
14
15 fn read_thing(refcell: &RefCell<dyn Read>) {}