]>
Commit | Line | Data |
---|---|---|
5099ac24 | 1 | // check-fail |
064997fb | 2 | // known-bug: #87803 |
5099ac24 FG |
3 | |
4 | // This should pass, but using a type alias vs a reference directly | |
5 | // changes late-bound -> early-bound. | |
6 | ||
5099ac24 FG |
7 | trait Scanner { |
8 | type Input<'a>; | |
9 | type Token<'a>; | |
10 | ||
11 | fn scan<'a>(&mut self, i : Self::Input<'a>) -> Self::Token<'a>; | |
12 | } | |
13 | ||
14 | struct IdScanner(); | |
15 | ||
16 | impl Scanner for IdScanner { | |
17 | type Input<'a> = &'a str; | |
18 | type Token<'a> = &'a str; | |
19 | ||
20 | fn scan<'a>(&mut self, s : &'a str) -> &'a str { | |
21 | s | |
22 | } | |
23 | } | |
24 | ||
25 | fn main() {} |