aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-14 09:21:38 +0100
committerGitHub <[email protected]>2019-09-14 09:21:38 +0100
commit04789ef37b1d26017717a5eeacf0d706f2b14f1b (patch)
tree1692df9c257da5d52fa59633e0c21a64bd0351b7 /crates
parent4ed44c80db3a31a516d2761d0d9f7c0e1e381597 (diff)
parentdc935be1b511d1179b6b0d1cf1b80c6c931724e4 (diff)
Merge #1844
1844: Support bare `Trait` without dyn r=flodiebold a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/ty/lower.rs3
-rw-r--r--crates/ra_hir/src/ty/tests.rs20
2 files changed, 11 insertions, 12 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index 3fdb2ca92..6ead3846a 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -124,8 +124,7 @@ impl Ty {
124 Ty::Unknown 124 Ty::Unknown
125 } 125 }
126 } else { 126 } else {
127 // FIXME dyn Trait without the dyn 127 Ty::Dyn(Arc::new([GenericPredicate::Implemented(trait_ref)]))
128 Ty::Unknown
129 }; 128 };
130 } 129 }
131 TypeNs::GenericParam(idx) => { 130 TypeNs::GenericParam(idx) => {
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index 9a5f6949d..f6a2a658f 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -3626,19 +3626,19 @@ fn test(x: Trait, y: &Trait) -> u64 {
3626 @r###" 3626 @r###"
3627 [27; 31) 'self': &Self 3627 [27; 31) 'self': &Self
3628 [61; 63) '{}': () 3628 [61; 63) '{}': ()
3629 [73; 74) 'x': {unknown} 3629 [73; 74) 'x': dyn Trait
3630 [83; 84) 'y': &{unknown} 3630 [83; 84) 'y': &dyn Trait
3631 [101; 176) '{ ...o(); }': () 3631 [101; 176) '{ ...o(); }': ()
3632 [107; 108) 'x': {unknown} 3632 [107; 108) 'x': dyn Trait
3633 [114; 115) 'y': &{unknown} 3633 [114; 115) 'y': &dyn Trait
3634 [125; 126) 'z': {unknown} 3634 [125; 126) 'z': dyn Trait
3635 [129; 132) 'bar': fn bar() -> {unknown} 3635 [129; 132) 'bar': fn bar() -> dyn Trait
3636 [129; 134) 'bar()': {unknown} 3636 [129; 134) 'bar()': dyn Trait
3637 [140; 141) 'x': {unknown} 3637 [140; 141) 'x': dyn Trait
3638 [140; 147) 'x.foo()': u64 3638 [140; 147) 'x.foo()': u64
3639 [153; 154) 'y': &{unknown} 3639 [153; 154) 'y': &dyn Trait
3640 [153; 160) 'y.foo()': u64 3640 [153; 160) 'y.foo()': u64
3641 [166; 167) 'z': {unknown} 3641 [166; 167) 'z': dyn Trait
3642 [166; 173) 'z.foo()': u64 3642 [166; 173) 'z.foo()': u64
3643 "### 3643 "###
3644 ); 3644 );