diff options
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index e088df97c..8cc771084 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -693,6 +693,31 @@ pub fn primitive_type() { | |||
693 | ); | 693 | ); |
694 | } | 694 | } |
695 | 695 | ||
696 | #[test] | ||
697 | fn infer_std_crash_5() { | ||
698 | // taken from rustc | ||
699 | check_inference( | ||
700 | "infer_std_crash_5", | ||
701 | r#" | ||
702 | fn extra_compiler_flags() { | ||
703 | for content in doesnt_matter { | ||
704 | let name = if doesnt_matter { | ||
705 | first | ||
706 | } else { | ||
707 | &content | ||
708 | }; | ||
709 | |||
710 | let content = if ICE_REPORT_COMPILER_FLAGS_STRIP_VALUE.contains(&name) { | ||
711 | name | ||
712 | } else { | ||
713 | content | ||
714 | }; | ||
715 | } | ||
716 | } | ||
717 | "#, | ||
718 | ); | ||
719 | } | ||
720 | |||
696 | fn infer(content: &str) -> String { | 721 | fn infer(content: &str) -> String { |
697 | let (db, _, file_id) = MockDatabase::with_single_file(content); | 722 | let (db, _, file_id) = MockDatabase::with_single_file(content); |
698 | let source_file = db.parse(file_id); | 723 | let source_file = db.parse(file_id); |