]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generic-associated-types/bugs/issue-87803.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / bugs / issue-87803.rs
CommitLineData
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
7trait 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
14struct IdScanner();
15
16impl 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
25fn main() {}