diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-20 08:47:42 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-20 08:47:42 +0000 |
commit | d24e8f9ea42dd2d08b2e02f8106690fd4baa8071 (patch) | |
tree | 3da030379556170d1d18235c234ae95bbe28fba4 /crates/ra_hir/src/ty/lower.rs | |
parent | 4340d9b0e435bde11c0cc79e9f284856a836ccdc (diff) | |
parent | 0e771915faf057ec4561224b75ec9b5be93d71c8 (diff) |
Merge #2321
2321: Allow non-path default type parameters r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r-- | crates/ra_hir/src/ty/lower.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index de3c56097..03db38605 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs | |||
@@ -611,9 +611,7 @@ pub(crate) fn generic_defaults_query(db: &impl HirDatabase, def: GenericDef) -> | |||
611 | let defaults = generic_params | 611 | let defaults = generic_params |
612 | .params_including_parent() | 612 | .params_including_parent() |
613 | .into_iter() | 613 | .into_iter() |
614 | .map(|p| { | 614 | .map(|p| p.default.as_ref().map_or(Ty::Unknown, |t| Ty::from_hir(db, &resolver, t))) |
615 | p.default.as_ref().map_or(Ty::Unknown, |path| Ty::from_hir_path(db, &resolver, path)) | ||
616 | }) | ||
617 | .collect(); | 615 | .collect(); |
618 | 616 | ||
619 | Substs(defaults) | 617 | Substs(defaults) |