1 // Test that we correctly consider the type of `match` to be the LUB
2 // of the various arms, particularly in the case where regions are
5 pub fn opt_str0<'a>(maybestr: &'a Option<String>) -> &'a str {
6 if maybestr.is_none() {
9 let s: &'a str = maybestr.as_ref().unwrap();
14 pub fn opt_str1<'a>(maybestr: &'a Option<String>) -> &'a str {
15 if maybestr.is_some() {
16 let s: &'a str = maybestr.as_ref().unwrap();
23 pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
24 if maybestr.is_none() {
27 let s: &'a str = maybestr.as_ref().unwrap();
32 pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
33 if maybestr.is_some() {
34 let s: &'a str = maybestr.as_ref().unwrap();