Alex Chi
51d66714ac
fix panic on GAT
...
Signed-off-by: Alex Chi <iskyzh@gmail.com>
2022-04-11 13:52:02 +08:00
Jonas Schievink
5d8b4c40eb
Determine function unsafety semantically
2022-04-07 18:33:03 +02:00
Florian Diebold
019f48673a
fix: Paper over GAT panic
...
TIL that Chalk expects the arguments to a generic associated type to
come *before* the ones for the parent trait, not *after* as we have been
doing with all other nested generics. Fixing this requires a larger
refactoring, so for now this just papers over the problem by completely
ignoring parameters of associated types.
Fixes #11769 .
2022-04-02 13:14:42 +02:00
hkalbasi
b301b040f5
Add const generics
2022-03-14 14:38:37 +03:30
hkalbasi
1282178783
insert dummy values for const generics in subst
2022-03-09 02:02:42 +03:30
hkalbasi
4fa8749c44
Preserve order of generic args
2022-03-04 11:46:14 +03:30
Florian Diebold
4ed5fe1554
Fix assoc type shorthand from method bounds
...
In code like this:
```rust
impl<T> Option<T> {
fn as_deref(&self) -> T::Target where T: Deref {}
}
```
when trying to resolve the associated type `T::Target`, we were only
looking at the bounds on the impl (where the type parameter is defined),
but the method can add additional bounds that can also be used to refer
to associated types. Hence, when resolving such an associated type, it's
not enough to just know the type parameter T, we also need to know
exactly where we are currently.
This fixes #11364 (beta apparently switched some bounds around).
2022-02-03 13:15:02 +01:00
Laurențiu Nicola
32b6f103a6
Bump chalk
2021-12-19 18:58:39 +02:00
Lukas Wirth
1bbc255ec5
Remove some allocations
2021-12-10 20:01:24 +01:00
Jonas Schievink
b365b6119c
Treat extern blocks as item containers
2021-12-07 17:31:26 +01:00
Laurențiu Nicola
ca44b6892e
Use array IntoIter
2021-10-22 09:23:29 +03:00
Jonas Schievink
3aa37d7f80
Avoid cycle when lowering predicates for associated item lookup
2021-10-04 17:39:55 +02:00
Dawer
d9e6377b91
adjust hir_def::TypeBound::as_path
2021-08-04 19:49:19 +05:00
Jonas Schievink
88a86d4ff9
Fix deduction of dyn Fn
closure parameter types
2021-06-30 15:04:04 +02:00
Florian Diebold
2d20ab7eaf
Rewrite all_super_trait_refs as an iterator
...
Doesn't fix the bug I was trying to fix, but now that I did it anyway it
seems fine to keep.
2021-04-29 20:18:41 +02:00
Kirill Bulatov
739edfd5cf
Exclude inherent traits from flyimports
2021-04-16 11:13:17 +03:00
Florian Diebold
d992736e79
Remove unused
2021-04-08 14:36:14 +02:00
Florian Diebold
b25b147e86
Fix shifted_{in,out} calls
2021-04-08 14:08:55 +02:00
Florian Diebold
6777a4975d
Move hir_trait_id to extension trait
2021-04-07 20:40:01 +02:00
Jonas Schievink
e9752308bb
infer: remove record_field_resolutions
field
...
It stores no useful data, since we can derive all fields from
`variant_resolutions`
2021-04-06 17:59:18 +02:00
Florian Diebold
a316d58360
Rename shift_bound_vars{_out} to align with Chalk
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
Jonas Schievink
7c0c713a10
Intern GenericParams
...
Also share the same instance between `ItemTree` and `generic_params`
query.
2021-04-05 03:50:10 +02:00
Jonas Schievink
24e876b52e
Intern more TypeRef
s in generics
...
Saves ~3 MB
2021-04-05 02:03:37 +02:00
Florian Diebold
a4d7bdf1c8
Replace Substitution::bound_vars and ::type_params_for_generics
2021-04-04 13:16:39 +02:00
Florian Diebold
b4c20e3589
Fix chalk_ir assertion
...
Fixes #8150 .
2021-03-24 23:10:13 +01:00
Florian Diebold
1d5c4a77fb
Use QuantifiedWhereClause in generic_predicates as well
...
Still far too much binder skipping going on; I find it hard to imagine
this is all correct, but the tests pass.
2021-03-21 18:01:14 +01:00
Florian Diebold
7a5fb37cf1
Rename GenericPredicate -> WhereClause
2021-03-20 10:46:36 +01:00
Florian Diebold
7a7e47eab7
Chalkify TraitRef
2021-03-18 21:53:19 +01:00
Jonas Schievink
a430549aa6
Stop using ContainerId
in AssocContainerId
2021-03-09 18:27:23 +01:00
Lukas Wirth
fa65d6ba85
Higher-ranked trait bounds for where clauses
2020-12-17 22:01:42 +01:00
Lukas Wirth
11f8664182
Add Lifetimes to the HIR
2020-12-12 00:56:52 +01:00
Aleksey Kladov
6a77ec7bbe
Rename ra_hir_ty -> hir_ty
2020-08-13 16:35:29 +02:00