Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 493 Bytes
// run-pass
// Test an edge case in region inference: the lifetime of the borrow
// of `*x` must be extended to at least 'a.
// pretty-expanded FIXME #23616
fn foo<'a,'b>(x: &'a &'b mut isize) -> &'a isize {
let y = &*x; // should be inferred to have type &'a &'b mut isize...
// ...because if we inferred, say, &'x &'b mut isize where 'x <= 'a,
// this reborrow would be illegal:
pub fn main() {
/* Just want to know that it compiles. */
You can’t perform that action at this time.