Commit graph

16311 commits

Author SHA1 Message Date
Aleksey Kladov
8fe20b19d4 More robust status notifications 2021-04-06 15:45:31 +03:00
Lukas Wirth
a43409fa43 Panic when creating a HirDisplayWrapper with DisplayTarget::SourceCode 2021-04-06 14:42:34 +02:00
Lukas Wirth
ffdb2da49d Don't use HirDisplayWrapper when displaying SourceCode 2021-04-06 14:21:35 +02:00
Lukas Wirth
bc993bbe85 Remove TyExt::dyn_trait_ref 2021-04-06 13:58:51 +02:00
Lukas Wirth
9b4699a9be Move Ty accessors to TyExt 2021-04-06 13:58:48 +02:00
bors[bot]
002e72a28d
Merge #8366
8366: Add chalk_ir::Const to TyKind::Array r=flodiebold a=Veykril

CC #8313

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-06 11:34:34 +00:00
Aleksey Kladov
9143e3925c Prepare for more stateless status reporting 2021-04-06 13:23:09 +03:00
Aleksey Kladov
e3c47ccefc Use autoreload config to gate execution rather that staleness 2021-04-06 13:10:50 +03:00
Lukas Wirth
9fbba7bc45 Add chalk_ir::Const to TyKind::Array 2021-04-06 11:45:41 +02:00
Aleksey Kladov
3698b3eab8 Avoid duplicate cargo checks 2021-04-06 12:40:31 +03:00
Aleksey Kladov
9ca59733e3 Improve readability
It's better to order functions in the order they are called, if there's
ordering between them.
2021-04-06 12:35:40 +03:00
Aleksey Kladov
aaa8c208b1 internal: do not drop errors from cargo metadata/check
Work towards #3155
2021-04-06 12:33:19 +03:00
bors[bot]
047b531301
Merge #8359
8359: Add Lifetime to TyKind::Ref and DynTy r=flodiebold a=Veykril

CC #8313

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-06 08:52:02 +00:00
Lukas Wirth
08dc69599e Use a constructor function for Static lifetimes 2021-04-06 10:50:55 +02:00
Lukas Wirth
b98c681cb7 Always use Static lifetimes in chalk mapping 2021-04-06 10:45:34 +02:00
Lukas Wirth
9da191c7e0 Add Lifetime to DynTy 2021-04-06 10:45:34 +02:00
Lukas Wirth
96756f1b1d Add Lifetime to TyKind::Ref 2021-04-06 10:45:30 +02:00
bors[bot]
4bc8a01830
Merge #8360
8360: Fix shifting of binders in FnPointer r=flodiebold a=flodiebold

 - don't shift in/out for Chalk mapping (we want to have the same binders now)
 - do shift in when creating the signature for a closure (though it shouldn't matter much)
 - do shift in when lowering a `fn()` type
 - correctly deal with the implied binder in TypeWalk

Tested with the binders validator on various repos, so I'm pretty sure this doesn't mess things up 😬 

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-04-05 21:03:01 +00:00
Florian Diebold
1ae967bf8e Fix shifting of binders in FnPointer
- don't shift in/out for Chalk mapping (we want to have the same
   binders now)
 - do shift in when creating the signature for a closure (though it
   shouldn't matter much)
 - do shift in when lowering a `fn()` type
 - correctly deal with the implied binder in TypeWalk
2021-04-05 23:00:50 +02:00
bors[bot]
7ce0e9c9ca
Merge #8358
8358: Align FnPointer with Chalk r=flodiebold a=flodiebold

CC #8313

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-04-05 20:25:13 +00:00
Florian Diebold
edc59d897d Align FnPointer with Chalk 2021-04-05 22:23:30 +02:00
bors[bot]
f25c1e7c6a
Merge #8356
8356: Align more methods to Chalk r=flodiebold a=flodiebold

Related to #8313.

Move some inherent methods that don't exist in Chalk to an extension trait, remove some others.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-04-05 19:59:25 +00:00
Florian Diebold
b67148daea Substitution::prefix -> subst_prefix
I probably want to get rid of this function completely later.
2021-04-05 21:58:53 +02:00
Florian Diebold
2a83645e1b Get rid of Substitution::suffix 2021-04-05 21:58:03 +02:00
Florian Diebold
b443e5304e Remove some unused methods, move some to types.rs 2021-04-05 21:58:03 +02:00
Florian Diebold
738174671a Binders::wrap_empty -> wrap_empty_binders 2021-04-05 21:58:03 +02:00
Florian Diebold
2f5a77658b Substitution::single -> from1 2021-04-05 21:58:03 +02:00
Florian Diebold
788533d380 Move ProjectionTy methods to extension trait 2021-04-05 21:58:01 +02:00
bors[bot]
8c96a7d81e
Merge #8353
8353: Replace hir_ty::Lifetime with chalk equivalent r=flodiebold a=Veykril

Our `Lifetime` isn't really used yet so this is a rather simple change

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-05 19:34:50 +00:00
bors[bot]
72781085bb
Merge #8352
8352: Remove dead legacy macro expansion code r=lnicola a=brandondong

I was investigating some unrelated macro issue when I noticed this dead code. This legacy macro expansion logic was changed in https://github.com/rust-analyzer/rust-analyzer/pull/8128.

Co-authored-by: Brandon <brandondong604@hotmail.com>
2021-04-05 19:00:27 +00:00
Brandon
4dbec2d545 Remove dead legacy macro expansion code 2021-04-05 11:47:06 -07:00
Lukas Wirth
d587ca2991 Replace unused hir_ty::Lifetime with chalk equivalents 2021-04-05 20:46:15 +02:00
bors[bot]
453f2360d3
Merge #8351
8351: Use more assoc. type aliases in the chalk interner r=flodiebold a=jonas-schievink

Makes it sligthly easier to swap out these types

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-04-05 18:38:32 +00:00
Jonas Schievink
f48dd154a5 Use more assoc. type aliases in the chalk interner
Makes it sligthly easier to swap out these types
2021-04-05 20:15:07 +02:00
bors[bot]
87e56eb94c
Merge #8350
8350: internal: prepare to store OpQueue results in the queue itself r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-05 17:49:48 +00:00
Aleksey Kladov
7099438e0c internal: prepare to store OpQueue results in the queue itself 2021-04-05 20:49:00 +03:00
bors[bot]
c91b537683
Merge #8348
8348: Make `Binders` more like Chalk r=flodiebold a=flodiebold

Working towards #8313.
 - hide `value`
 - use `VariableKinds`
 - adjust `subst` to be like Chalk's `substitute`
 - also clean up some other `TypeWalk` stuff to prepare for it being replaced by Chalk's `Fold`

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-04-05 17:25:19 +00:00
Florian Diebold
a316d58360 Rename shift_bound_vars{_out} to align with Chalk 2021-04-05 19:21:03 +02:00
Florian Diebold
fbab69cbff Get rid of subst_bound_vars uses 2021-04-05 19:21:03 +02:00
Florian Diebold
e28f0c98ba Get rid of some walk_mut uses 2021-04-05 19:21:03 +02:00
Florian Diebold
30a339e038 Add Interner parameter to Binders::substitute 2021-04-05 19:21:01 +02:00
Florian Diebold
05eba0db3d Binders::subst -> substitute 2021-04-05 19:20:28 +02:00
Florian Diebold
ad20f00844 Use VariableKinds in Binders 2021-04-05 19:19:18 +02:00
Florian Diebold
69714d36e6 Hide Binders internals more 2021-04-05 19:19:18 +02:00
bors[bot]
467a5c6cd1
Merge #8347
8347: Minor interning improvements r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-04-05 17:17:07 +00:00
bors[bot]
6e9798a992
Merge #8346
8346: Use arrayvec 0.7 to avoid perf regression in 0.6.1 r=lnicola a=kjeremy

See: https://github.com/bluss/arrayvec/issues/182

Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-04-05 17:05:30 +00:00
kjeremy
b246f57fad Use arrayvec 0.7 to avoid perf regression in 0.6.1
See: https://github.com/bluss/arrayvec/issues/182
2021-04-05 12:58:35 -04:00
bors[bot]
013cc7dd8b
Merge #8344
8344: Pass interner to `ProjectionTy::self_type_parameter` and `TraitRef::self_type_parameter` r=flodiebold a=lnicola

CC #8313

changelog skip

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-04-05 15:47:09 +00:00
Jonas Schievink
b57462d60d Interned<T>: Only hash the pointer 2021-04-05 17:07:53 +02:00
Jonas Schievink
a0b50bcf1e Make impl_internable! macro public 2021-04-05 16:59:13 +02:00