summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-15034.rs
blob: 9ea6ed89ca249cb5a7a8f807be11338f43967525 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pub struct Lexer<'a> {
    input: &'a str,
}

impl<'a> Lexer<'a> {
    pub fn new(input: &'a str) -> Lexer<'a> {
        Lexer { input: input }
    }
}

struct Parser<'a> {
    lexer: &'a mut Lexer<'a>,
}

impl<'a> Parser<'a> {
    pub fn new(lexer: &'a mut Lexer) -> Parser<'a> {
        Parser { lexer: lexer }
        //~^ ERROR explicit lifetime required in the type of `lexer` [E0621]
    }
}

fn main() {}