aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r--crates/ra_hir/src/ty/tests.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index 0f2172ddf..5d8ad4aa7 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -1792,6 +1792,29 @@ fn test<R>(query_response: Canonical<QueryResponse<R>>) {
1792} 1792}
1793 1793
1794#[test] 1794#[test]
1795fn bug_1030() {
1796 assert_snapshot_matches!(infer(r#"
1797struct HashSet<T, H>;
1798struct FxHasher;
1799type FxHashSet<T> = HashSet<T, FxHasher>;
1800
1801impl<T, H> HashSet<T, H> {
1802 fn default() -> HashSet<T, H> {}
1803}
1804
1805pub fn main_loop() {
1806 FxHashSet::default();
1807}
1808"#),
1809 @r###"
1810[144; 146) '{}': ()
1811[169; 198) '{ ...t(); }': ()
1812[175; 193) 'FxHash...efault': fn default<{unknown}, {unknown}>() -> HashSet<T, H>
1813[175; 195) 'FxHash...ault()': HashSet<{unknown}, {unknown}>"###
1814 );
1815}
1816
1817#[test]
1795fn cross_crate_associated_method_call() { 1818fn cross_crate_associated_method_call() {
1796 let (mut db, pos) = MockDatabase::with_position( 1819 let (mut db, pos) = MockDatabase::with_position(
1797 r#" 1820 r#"