Lukas Wirth
4f97950595
fix: Fix uncorrect use of double braces in HirDisplay implementations
2022-05-02 12:39:38 +02:00
Jonas Schievink
5d8b4c40eb
Determine function unsafety semantically
2022-04-07 18:33:03 +02:00
Laurențiu Nicola
bd570903b0
Add and use HirFormatter::write_{str,char}
2022-04-07 16:41:07 +03:00
hkalbasi
b301b040f5
Add const generics
2022-03-14 14:38:37 +03:30
Lukas Wirth
6c8c02f625
Don't parse source files to generate macro completion details
2022-03-10 22:21:58 +01:00
hkalbasi
1282178783
insert dummy values for const generics in subst
2022-03-09 02:02:42 +03:30
Andy Russell
49fab593ad
show variadic args in hover function signature
2022-03-04 16:44:31 -05:00
hkalbasi
4fa8749c44
Preserve order of generic args
2022-03-04 11:46:14 +03:30
Lukas Wirth
661d721e20
Add completion module tailored towards use trees
2022-02-03 15:51:57 +01:00
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
Lukas Wirth
cd9d76e0ca
internal: Store function param names in ItemTree
2021-12-20 15:24:37 +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
Jake Heinz
7cbc6ae920
ide: hover omits unnamed where preds
2021-11-20 11:45:12 +00:00
Lukas Wirth
7776aad166
internal: Flatten Definition::ModuleDef
variant
2021-11-11 00:05:53 +01:00
Jonas Schievink
3aa37d7f80
Avoid cycle when lowering predicates for associated item lookup
2021-10-04 17:39:55 +02:00
Lukas Wirth
b6ed91a6de
Rename *Owner
traits to Has*
2021-09-27 12:54:24 +02:00
Dawer
dfb15292c2
fix: Type param hover shows correct sized bounds.
2021-09-10 20:48:39 +05:00
Dawer
5f2486e9a8
Handle impl ?Sized
. Fix tests.
2021-08-04 20:20:10 +05:00
Dawer
421979bc68
HirDisplay prints ?Sized
bounds now; impl Trait: Sized
by default.
2021-08-04 20:05:46 +05:00
Dawer
3981373b93
internal: add implicit Sized
bounds to type parameters.
2021-08-04 19:04:21 +05:00
Laurențiu Nicola
2268a220e4
Don't store supertraits in ItemTree
2021-05-27 16:52:30 +03:00
Jonas Schievink
8ebb8d29e1
internal: intern TypeBound
s
...
Doesn't save much memory (~2 mb), but interning things is generally a
good pattern to follow
2021-05-24 15:13:23 +02:00
Aleksey Kladov
cb3ef552e8
internal: normalize name
...
All def types in hir are unsubstituted
2021-04-30 11:52:31 +03: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
ebdfc932e7
Replace Substitution::type_params
2021-04-04 13:16:39 +02:00
Jonas Schievink
ee4b5a34d8
Use bitflags to compress function properties
...
Very minor savings, only 1 MB or so
2021-04-03 20:58:42 +02:00
Jonas Schievink
b00266b79f
Global TypeRef/TraitRef interning
2021-04-01 19:46:43 +02:00
Florian Diebold
c4fd3f47f5
Align InEnvironment with Chalk
...
This in particular means storing a chalk_ir::Environment, not our
TraitEnvironment. This makes InEnvironment not usable for Type, where we
need to keep the full TraitEnvironment.
2021-03-21 20:19:07 +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
590c416359
Introduce QuantifiedWhereClause and DynTy analogous to Chalk
...
This introduces a bunch of new binders in lots of places, which we have
to be careful about, but we had to add them at some point.
2021-03-21 18:01:14 +01:00
Florian Diebold
ce2cae45b5
Rename Substs -> Substitution
2021-03-16 17:58:17 +01:00
Lukas Wirth
4d1e1daa31
Implement HirDisplay for some more types
2021-03-16 16:36:34 +01:00
oxalica
73fc05fdca
Pretty print root module of extern crates
2021-03-16 01:24:21 +08:00
oxalica
7101bada0f
Fix trait type parameter
2021-03-16 01:04:33 +08:00
oxalica
87171238c6
Use hir formatter more
2021-03-16 01:04:33 +08:00
oxalica
ef416e0154
Impl HirDisplay for function hover message
2021-03-16 01:04:20 +08:00
oxalica
b9c172a977
Collect HirDisplay impls to a single file
2021-03-16 01:02:33 +08:00