aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-16 10:21:29 +0100
committerGitHub <[email protected]>2021-06-16 10:21:29 +0100
commit8022e6ad6f951d86ce8f24335053fcaaeb7b296b (patch)
tree88eefd90d8cca113dfe2758def3fb3266ce56a68 /crates/ide_completion
parent2980fd430dbe30d5d8fd28091a8c47b3ffd4008f (diff)
parent8a4d9bb80a484193dc24c474af30d0d0e091963b (diff)
Merge #9297
9297: internal: add fn to minicore r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide_completion')
-rw-r--r--crates/ide_completion/src/render.rs22
1 files changed, 6 insertions, 16 deletions
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs
index 3eb51e80b..fac83b650 100644
--- a/crates/ide_completion/src/render.rs
+++ b/crates/ide_completion/src/render.rs
@@ -1191,21 +1191,11 @@ fn main() {
1191 fn suggest_deref_mut() { 1191 fn suggest_deref_mut() {
1192 check_relevance( 1192 check_relevance(
1193 r#" 1193 r#"
1194#[lang = "deref"] 1194//- minicore: deref_mut
1195trait Deref {
1196 type Target;
1197 fn deref(&self) -> &Self::Target;
1198}
1199
1200#[lang = "deref_mut"]
1201pub trait DerefMut: Deref {
1202 fn deref_mut(&mut self) -> &mut Self::Target;
1203}
1204
1205struct S; 1195struct S;
1206struct T(S); 1196struct T(S);
1207 1197
1208impl Deref for T { 1198impl core::ops::Deref for T {
1209 type Target = S; 1199 type Target = S;
1210 1200
1211 fn deref(&self) -> &Self::Target { 1201 fn deref(&self) -> &Self::Target {
@@ -1213,7 +1203,7 @@ impl Deref for T {
1213 } 1203 }
1214} 1204}
1215 1205
1216impl DerefMut for T { 1206impl core::ops::DerefMut for T {
1217 fn deref_mut(&mut self) -> &mut Self::Target { 1207 fn deref_mut(&mut self) -> &mut Self::Target {
1218 &mut self.0 1208 &mut self.0
1219 } 1209 }
@@ -1232,12 +1222,12 @@ fn main() {
1232 lc m [local] 1222 lc m [local]
1233 lc t [local] 1223 lc t [local]
1234 lc &mut t [type+local] 1224 lc &mut t [type+local]
1235 tt DerefMut []
1236 tt Deref []
1237 fn foo(…) []
1238 st T [] 1225 st T []
1239 st S [] 1226 st S []
1240 fn main() [] 1227 fn main() []
1228 fn foo(…) []
1229 md core []
1230 tt Sized []
1241 "#]], 1231 "#]],
1242 ) 1232 )
1243 } 1233 }