Skip to content

Commit 77a824c

Browse files
bors[bot]kjeremy
andcommitted
Merge #741
741: Test more Self inference r=flodiebold a=kjeremy These cases didn't look covered. Co-authored-by: kjeremy <[email protected]>
2 parents cc3423c + 5227102 commit 77a824c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
---
2-
created: "2019-01-22T14:45:00.052694700+00:00"
3-
creator: insta@0.4.0
2+
created: "2019-02-04T19:40:48.826936500+00:00"
3+
creator: insta@0.5.3
44
expression: "&result"
5-
source: "crates\\ra_hir\\src\\ty\\tests.rs"
5+
source: crates/ra_hir/src/ty/tests.rs
66
---
77
[34; 38) 'self': &S
88
[40; 61) '{ ... }': ()
99
[50; 54) 'self': &S
1010
[75; 79) 'self': &S
1111
[88; 109) '{ ... }': ()
1212
[98; 102) 'self': &S
13+
[133; 153) '{ ... }': S
14+
[143; 147) 'S {}': S
15+
[177; 200) '{ ... }': S
16+
[187; 194) 'Self {}': S
1317

crates/ra_hir/src/ty/tests.rs

+6
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ impl S {
215215
fn test2(self: &Self) {
216216
self;
217217
}
218+
fn test3() -> Self {
219+
S {}
220+
}
221+
fn test4() -> Self {
222+
Self {}
223+
}
218224
}
219225
"#,
220226
);

0 commit comments

Comments
 (0)