| // Test that we correctly consider the type of `match` to be the LUB |
| // of the various arms, particularly in the case where regions are |
| // ignore-compare-mode-nll |
| //[nll] compile-flags: -Z borrowck=mir |
| pub fn opt_str0<'a>(maybestr: &'a Option<String>) -> &'a str { |
| pub fn opt_str1<'a>(maybestr: &'a Option<String>) -> &'a str { |
| pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str { |
| //[nll]~^^ ERROR lifetime may not live long enough |
| pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str { |
| //[nll]~^^ ERROR lifetime may not live long enough |