File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
branches/snap-stage3/src/test/compile-fail Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: c29a7520e7fb4a5b4d4eccfc594e05793ef6688d
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 590a61f788e058d7ae95806f55258bce3ae45567
4
+ refs/heads/snap-stage3: f4a7d32c8b53649d20735c8a90469b08fe7cc3dc
5
5
refs/heads/try: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
+ // Test static calls to make sure that we align the Self and input
12
+ // type parameters on a trait correctly.
13
+
11
14
trait Tr < T > {
12
15
fn op ( T ) -> Self ;
13
16
}
14
17
15
- // these compile as if Self: Tr<U>, even tho only Self: Tr<Self or T>
16
18
trait A : Tr < Self > {
17
19
fn test < U > ( u : U ) -> Self {
18
20
Tr :: op ( u) //~ ERROR not implemented
19
21
}
20
22
}
23
+
21
24
trait B < T > : Tr < T > {
22
25
fn test < U > ( u : U ) -> Self {
23
26
Tr :: op ( u) //~ ERROR not implemented
24
27
}
25
28
}
26
29
27
- impl < T > Tr < T > for T {
28
- fn op ( t : T ) -> T { t }
29
- }
30
- impl < T > A for T { }
31
-
32
30
fn main ( ) {
33
- std:: io:: println ( A :: test ( ( & 7306634593706211700 , 8 ) ) ) ;
34
31
}
35
32
You can’t perform that action at this time.
0 commit comments