aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/tests')
-rw-r--r--crates/ra_hir_ty/src/tests/method_resolution.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests/method_resolution.rs b/crates/ra_hir_ty/src/tests/method_resolution.rs
index f9b394f05..af3e5b12c 100644
--- a/crates/ra_hir_ty/src/tests/method_resolution.rs
+++ b/crates/ra_hir_ty/src/tests/method_resolution.rs
@@ -1049,6 +1049,25 @@ where
1049} 1049}
1050 1050
1051#[test] 1051#[test]
1052fn method_resolution_3373() {
1053 let t = type_at(
1054 r#"
1055//- /main.rs
1056struct A<T>(T);
1057
1058impl A<i32> {
1059 fn from(v: i32) -> A<i32> { A(v) }
1060}
1061
1062fn main() {
1063 A::from(3)<|>;
1064}
1065"#,
1066 );
1067 assert_eq!(t, "A<i32>");
1068}
1069
1070#[test]
1052fn method_resolution_slow() { 1071fn method_resolution_slow() {
1053 // this can get quite slow if we set the solver size limit too high 1072 // this can get quite slow if we set the solver size limit too high
1054 let t = type_at( 1073 let t = type_at(