diff options
author | Aleksey Kladov <[email protected]> | 2019-01-15 17:54:18 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-15 17:54:18 +0000 |
commit | 8ba9c2d4cedbcf8f1d2c644733d2b06fa1984d22 (patch) | |
tree | a97af07a664ce4be35f6a16409eebd6706296fff /crates/ra_hir/src/ty/tests.rs | |
parent | b871062e329301683083a1a2ff5eb476e6c397c7 (diff) |
remove Cancelable from type inference
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index b44ac9987..929fee04c 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -321,7 +321,7 @@ fn infer(content: &str) -> String { | |||
321 | .filter_map(ast::FnDef::cast) | 321 | .filter_map(ast::FnDef::cast) |
322 | { | 322 | { |
323 | let func = source_binder::function_from_source(&db, file_id, fn_def).unwrap(); | 323 | let func = source_binder::function_from_source(&db, file_id, fn_def).unwrap(); |
324 | let inference_result = func.infer(&db).unwrap(); | 324 | let inference_result = func.infer(&db); |
325 | let body_syntax_mapping = func.body_syntax_mapping(&db); | 325 | let body_syntax_mapping = func.body_syntax_mapping(&db); |
326 | let mut types = Vec::new(); | 326 | let mut types = Vec::new(); |
327 | for (pat, ty) in inference_result.type_of_pat.iter() { | 327 | for (pat, ty) in inference_result.type_of_pat.iter() { |
@@ -405,7 +405,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { | |||
405 | let func = source_binder::function_from_position(&db, pos).unwrap(); | 405 | let func = source_binder::function_from_position(&db, pos).unwrap(); |
406 | { | 406 | { |
407 | let events = db.log_executed(|| { | 407 | let events = db.log_executed(|| { |
408 | func.infer(&db).unwrap(); | 408 | func.infer(&db); |
409 | }); | 409 | }); |
410 | assert!(format!("{:?}", events).contains("infer")) | 410 | assert!(format!("{:?}", events).contains("infer")) |
411 | } | 411 | } |
@@ -424,7 +424,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { | |||
424 | 424 | ||
425 | { | 425 | { |
426 | let events = db.log_executed(|| { | 426 | let events = db.log_executed(|| { |
427 | func.infer(&db).unwrap(); | 427 | func.infer(&db); |
428 | }); | 428 | }); |
429 | assert!(!format!("{:?}", events).contains("infer"), "{:#?}", events) | 429 | assert!(!format!("{:?}", events).contains("infer"), "{:#?}", events) |
430 | } | 430 | } |