aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/tests/method_resolution.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-02-20 20:17:14 +0000
committerGitHub <[email protected]>2021-02-20 20:17:14 +0000
commit62bc753f8b1957699288ceea90a4096667bf0ebc (patch)
tree3e21520683ad2fce54368614ff7e6b8b5ea62642 /crates/hir_ty/src/tests/method_resolution.rs
parentd0a787152d9f226707168f65ebfb215e23cedeed (diff)
parent0799288f0189c07907a30787e7d2f5f0bf960996 (diff)
Merge #7732
7732: Don't lower TypeBound::Lifetime as GenericPredicate::Error r=flodiebold a=Veykril Basically we just discard the typebound for now instead when lowering to `GenericPredicate`. I think this shouldn't have any other side effects? Fixes #7683(hopefully for real this time) I also played around with introducing `GenericPredicate::LifetimeOutlives` and `GenericPredicate::TypeOutlives`(see https://github.com/Veykril/rust-analyzer/commit/b9d69048451a5f2e9c5a72c800369bbeef36fdcf) but that won't fix this issue(at least not for now) due to lifetime predicate mismatches when resolving methods so I figure this is a good way to fix it for now. Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/tests/method_resolution.rs')
-rw-r--r--crates/hir_ty/src/tests/method_resolution.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/tests/method_resolution.rs b/crates/hir_ty/src/tests/method_resolution.rs
index 80e795fbf..659b8fce9 100644
--- a/crates/hir_ty/src/tests/method_resolution.rs
+++ b/crates/hir_ty/src/tests/method_resolution.rs
@@ -1114,14 +1114,14 @@ fn method_on_dyn_impl() {
1114trait Foo {} 1114trait Foo {}
1115 1115
1116impl Foo for u32 {} 1116impl Foo for u32 {}
1117impl dyn Foo { 1117impl dyn Foo + '_ {
1118 pub fn dyn_foo(&self) -> u32 { 1118 pub fn dyn_foo(&self) -> u32 {
1119 0 1119 0
1120 } 1120 }
1121} 1121}
1122 1122
1123fn main() { 1123fn main() {
1124 let f = &42u32 as &dyn Foo<u32>; 1124 let f = &42u32 as &dyn Foo;
1125 f.dyn_foo(); 1125 f.dyn_foo();
1126 // ^u32 1126 // ^u32
1127} 1127}