Lukas Wirth
33591cd3f4
Calculate the TargetDataLayout correctly for the selected target
2022-12-21 15:11:24 +01:00
Ryo Yoshida
bb99d2a6fb
fix: resolve all inference vars in InferenceResult::assoc_resolutions
2022-12-14 23:07:43 +09:00
Florian Diebold
d3cb032f7e
Make assoc_resolutions always have a Substitution
2022-12-10 17:05:33 +01:00
bors
a3ea20a142
Auto merge of #13725 - bvanjoi:resolve-const-triat-impls, r=flodiebold
...
feat: resolve const for trait impls
Fixed #13694
2022-12-10 13:58:28 +00:00
bvanjoi
7012b50db5
feat: resolve const for trait impls( close #13694 )
2022-12-10 20:06:25 +08:00
bors
632f804797
Auto merge of #13750 - lowr:fix/rpit-in-projection, r=flodiebold
...
fix: normalize projection after discarding free `BoundVar`s in RPIT
Fixes #13307
When we lower the return type of a function, it may contain free `BoundVar`s in `OpaqueType`'s substitution, which would cause panic during canonicalization as part of projection normalization. Those `BoundVar`s are irrelevant in this context and will be discarded, and we should defer projection normalization until then.
2022-12-10 11:30:14 +00:00
bors
518e39bfe6
Auto merge of #13742 - lowr:fix/assoc-type-shorthand-with-gats, r=flodiebold
...
fix: only shift `BoundVar`s that come from outside lowering context
Fixes #13734
There are some free functions `TyLoweringContext` methods call, which do not know anything about current binders in scope. We need to shift in the `BoundVar`s in substitutions that we get from them (#4952 ), but not those we get from `TyLoweringContext` methods.
2022-12-10 11:17:18 +00:00
Ryo Yoshida
34b11d9981
fix: normalize projection after discarding free BoundVar
s in RPIT
2022-12-10 04:23:23 +09:00
Lukas Wirth
e80674e6b3
Show type info on hover of enum variant fields
2022-12-09 10:09:55 +01:00
Ryo Yoshida
19e3085481
Only shift BoundVar
s that come from outside TyLoweringContext
2022-12-08 21:17:13 +09:00
Ryo Yoshida
46e1486a90
Disallow access to free BoundVar
s outside TyLoweringContext
2022-12-08 20:52:03 +09:00
bors
6e8a54d0f6
Auto merge of #13490 - HKalbasi:layout, r=jonas-schievink
...
Compute data layout of types
cc #4091
Things that aren't working:
* Closures
* Generators (so no support for `Future` I think)
* Opaque types
* Type alias and associated types which may need normalization
Things that show wrong result:
* ~Enums with explicit discriminant~
* SIMD types
* ~`NonZero*` and similar standard library items which control layout with special attributes~
At the user level, I didn't put much work, since I wasn't confident about what is the best way to present this information. Currently it shows size and align for ADTs, and size, align, offset for struct fields, in the hover, similar to clangd. I used it some days and I feel I liked it, but we may consider it too noisy and move it to an assist or command.
2022-12-07 15:22:03 +00:00
hkalbasi
948a8f030b
Add a fixme comment in current_target_data_layout
2022-12-07 02:29:50 +03:30
hkalbasi
05906da0ec
use rustc crates instead of copy paste
2022-12-07 01:59:38 +03:30
Wilco Kusee
a75bffc729
Increase Chalk fuel from 100 to 1000
...
The old value was for the old chalk-engine solver, nowadays the newer chalk-recursive solver is used.
The new solver currently uses fuel a bit more quickly, so a higher value is needed.
Running analysis-stats showed that a value of 100 increases the amount of unknown types,
while for a value of 1000 it's staying mostly the same.
2022-12-05 18:13:11 +01:00
Wilco Kusee
fc627e637b
Update to Chalk 88
2022-12-05 17:29:23 +01:00
Lukas Wirth
ca1389ef9f
Support rustc_has_incoherent_inherent_impls
2022-12-04 20:37:17 +01:00
hkalbasi
f2c9502185
support nonzero* niche optimizations
2022-12-04 00:29:34 +03:30
hkalbasi
86b5b609f1
Compute data layout of types
2022-12-04 00:29:34 +03:30
Wilco Kusee
16bf32fcdd
Update Chalk to version 87
2022-11-29 15:25:09 +01:00
Crauzer
b3bd5a471e
implement vararg type collection from function params
2022-11-29 00:32:13 +01:00
Laurențiu Nicola
a2a1d99545
⬆️ rust-analyzer
2022-11-23 17:24:03 +02:00
Laurențiu Nicola
79923c382a
⬆️ rust-analyzer
2022-11-09 21:49:10 +02:00
Laurențiu Nicola
c60b1f6414
⬆️ rust-analyzer
2022-11-01 11:31:31 +02:00
Laurențiu Nicola
8807fc4cc3
⬆️ rust-analyzer
2022-10-26 17:40:41 +03:00
Laurențiu Nicola
a99a48e786
⬆️ rust-analyzer
2022-10-18 09:12:49 +03:00
Laurențiu Nicola
4f55ebbd4f
⬆️ rust-analyzer
2022-10-11 10:37:35 +03:00
lcnr
6f13f12301
rustc_typeck to rustc_hir_analysis
2022-09-27 10:37:23 +02:00
Laurențiu Nicola
f5fde4df43
⬆️ rust-analyzer
2022-09-20 17:39:17 +03:00
Laurențiu Nicola
459bbb4222
⬆️ rust-analyzer
2022-09-13 15:38:11 +03:00
Laurențiu Nicola
65e1dc4d9c
⬆️ rust-analyzer
2022-09-06 21:20:49 +03:00
Laurențiu Nicola
3e358a6827
⬆️ rust-analyzer
2022-08-30 14:51:24 +03:00
Laurențiu Nicola
31519bb394
⬆️ rust-analyzer
2022-08-23 10:05:52 +03:00
Laurențiu Nicola
8231fee466
⬆️ rust-analyzer
2022-08-16 11:24:50 +03:00
Laurențiu Nicola
22c8c9c401
⬆️ rust-analyzer
2022-08-09 07:23:57 +03:00
Laurențiu Nicola
9d2cb42a41
⬆️ rust-analyzer
2022-08-02 09:05:16 +03:00
Amos Wenger
a1f1b95d00
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
2022-07-26 11:53:50 +02:00
bors
84a6fac37a
Auto merge of #12841 - Veykril:query-fix, r=Veykril
...
fix: Fix `trait_impls_in_deps_query` being called directly instead of as a query
Fixes the inlay hint performance regression introdcuced by https://github.com/rust-analyzer/rust-analyzer/issues/12549
2022-07-21 08:23:19 +00:00
Lukas Wirth
cfad882745
fix: Fix trait_impls_in_deps_query
being called directly instead of as a query
2022-07-21 10:23:07 +02:00
Amos Wenger
ade31ad757
Rename proc macro server from 'Rustc' to 'RustAnalyzer'
2022-07-20 15:40:23 +02:00
Amos Wenger
7e285e1ef5
Run cargo fmt
2022-07-20 15:06:15 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
Amos Wenger
23d25a3094
Enable extra warnings required by rust-lang/rust
2022-07-20 15:00:17 +02:00
Amos Wenger
1b416473a3
Upgrade to expect-test@1.4.0
...
cf. https://github.com/rust-analyzer/expect-test/issues/33
cf. https://github.com/rust-lang/rust/pull/99444#issuecomment-1188844202
2022-07-19 13:00:45 +02:00
bors
22e53f1d33
Auto merge of #12549 - bitgaoshu:goto_where_trait_m_impl, r=Veykril
...
feat: Go to implementation of trait methods
try goto where the trait method implies, #4558
2022-07-18 16:29:23 +00:00
bors
db6a85d358
Auto merge of #12778 - Logarithmus:feature/fix-negative-const-generics, r=flodiebold
...
Support negative, `char` & `bool` const generics
Before:
![Before](https://user-images.githubusercontent.com/29541480/179379832-0c3b2a74-fef6-427e-b89f-7e31d9c37b3d.png )
After:
![After](https://user-images.githubusercontent.com/29541480/179379863-b62475dd-e7bf-41f2-b437-08dfe55951af.png )
I tried to implement stuff like `Const<{NUM1 + 3 + NUM2}>` by using already existing constant evaluation mechanism for ordinary constants, but turned out to be harder than I thought, maybe because I've never ever tinkered with compilers before
2022-07-17 17:17:39 +00:00
Artur Sinila
83177a7cfe
fix: address suggestions
2022-07-17 18:22:11 +03:00
iDawer
a0fd58bbbe
Check for local IDs belong to same definition
2022-07-17 11:43:08 +05:00
Artur Sinila
a96f0aa7cd
feat: support negative const generic parameters
...
* feat: support `bool` & `char` const generics
2022-07-17 04:18:53 +03:00
Jonas Schievink
6c6ae965ba
Update remaining GitHub URLs
2022-07-08 15:44:49 +02:00