]>
git.proxmox.com Git - rustc.git/blob - tests/ui/nll/lub-match.rs
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 {
15 pub fn opt_str1
<'a
>(maybestr
: &'a Option
<String
>) -> &'a
str {
25 pub fn opt_str2
<'a
>(maybestr
: &'a Option
<String
>) -> &'
static str {
31 //~^ ERROR lifetime may not live long enough
36 pub fn opt_str3
<'a
>(maybestr
: &'a Option
<String
>) -> &'
static str {
41 //~^ ERROR lifetime may not live long enough