3 // Test a corner case of LUB coercion. In this case, one arm of the
4 // match requires a deref coercion and the other doesn't, and there
5 // is an extra `&` on the `rc`. We want to be sure that the lifetime
6 // assigned to this `&rc` value is not `'a` but something smaller. In
7 // other words, the type from `rc` is `&'a Rc<String>` and the type
8 // from `&rc` should be `&'x &'a Rc<String>`, where `'x` is something
19 impl<'mir> Cached<'mir> {
20 fn get_ref<'a>(&'a self) -> &'a String {
23 Cached::Owned(ref rc) => &rc,