hkalbasi
8b82ea4f51
Store binding mode for each instance independently
2023-10-22 23:35:33 +03:30
Lukas Wirth
8f5fee4a5a
Diagnose incorrect and private fields in record structs
2023-09-09 10:45:29 +02:00
Lukas Wirth
55c75450fb
Diagnose private fields in record constructor
2023-09-08 23:19:30 +02:00
Lukas Wirth
8654a098c7
Diagnose mismatched arg count for tuple struct patterns
2023-09-08 14:54:43 +02:00
Lukas Wirth
a17d73ad36
Thread imports through the resolver
2023-08-17 10:52:13 +02:00
Ryo Yoshida
074488b290
Properly infer types with type casts
2023-07-13 00:14:15 +09:00
hkalbasi
3a1054fc1c
Replace x
with it
2023-07-06 17:33:17 +03:30
Lukas Wirth
69cd3c30ac
Format let-else
2023-07-03 20:34:09 +02:00
Lukas Wirth
abe249559d
internal: Give ConstBlockId and InTypeConstId named Location types
2023-06-12 18:21:17 +02:00
hkalbasi
a4695788ca
Add a bunch of fixme comments
2023-06-12 00:37:11 +03:30
hkalbasi
d9136df9e5
Handle return types for in type const bodies
2023-06-11 00:39:28 +03:30
hkalbasi
a481e004b0
Lower const params with a bad id
2023-06-11 00:39:28 +03:30
Ryo Yoshida
f549cacc1d
Destructure InferenceResult
in resolve_all()
...
so that whenever new fields are added we don't forget to handle them.
2023-06-04 20:38:40 +09:00
Ryo Yoshida
a3789eabc9
Minor refactorings
...
- use `DefWithBodyId::as_generic_def_id()`
- add comments on `InferenceResult` invariant
- move local helper function to bottom to comply with style guide
2023-06-04 19:39:49 +09:00
hkalbasi
51368793b4
MIR episode 6
2023-05-28 23:25:15 +03:30
Lukas Wirth
8bc826dd53
Add diagnostic for _
expressions (typed holes)
2023-05-28 14:55:28 +02:00
hkalbasi
c5ea2d7adc
handle match scrutinee in closure captures
2023-05-19 12:04:12 +03:30
hkalbasi
aafe9b1e06
Lazy evaluate consts in path_to_const
2023-05-05 01:17:11 +03:30
Laurențiu Nicola
7197a27028
Use triomphe Arc
2023-05-02 20:02:43 +03:00
hkalbasi
6312fbf521
MIR episode 4
2023-05-01 23:23:10 +03:30
hkalbasi
5df545b3f0
Add hover for closure
2023-04-30 14:31:43 +03:30
Ryo Yoshida
12ba5cab11
Register obligations during path inference
2023-04-24 12:39:48 +09:00
bors
2400b36a2e
Auto merge of #14577 - jsoref:spelling, r=lnicola
...
Spelling
This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling ).
The misspellings have been reported at https://github.com/jsoref/rust-analyzer/actions/runs/4699991040#summary-12751355796
The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust-analyzer/actions/runs/4699991284#summary-12751356293
closes #14567
2023-04-19 14:05:40 +00:00
Josh Soref
bc7d84c3ce
Spelling
...
* a rule
* access
* after
* amount
* annotations
* assignment
* assist
* associated
* attribute
* borrowed
* built-in type
* clarification
* command
* const
* constructor
* corresponding
* counterparts
* curlies
* dependencies
* deterministic
* diagnostic
* duplicates
* edge
* edited
* efficient
* elsewhere
* execution
* expression
* extensions
* extracted
* fill
* github
* helper
* heuristic
* incomplete
* indent end
* inlay
* invocation
* lifetime
* looking
* maybe
* move
* mutability
* mutable
* necessarily
* necessary
* negative
* nonexistent
* occurred
* offsets
* offsetted
* overridden
* parameters
* params
* params_and_where_preds_in_scope
* paredit
* parent
* parentheses
* prepended if
* punctuation
* receive
* receiver
* referring
* repeated
* representing
* semantically
* separately
* shouldnot
* siblings
* similar
* something's
* statement
* struct
* structure
* surprise
* the
* this
* transparent
* unimplemented
* unnamed
* unnecessary
* unneeded
* unreachable
* unterminated
* utilities
* variant
* variants
* visibility
* work around (v)
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-19 09:45:55 -04:00
Lukas Wirth
0bb9a17312
internal: Move layout logic from hir-def to hir-ty
2023-04-16 12:21:12 +02:00
hkalbasi
a584cb998f
Infer types of nested RPITs
2023-04-11 04:32:11 +03:30
hkalbasi
59b6f2d9f2
Compute closure captures
2023-04-10 23:04:34 +03:30
Lukas Wirth
a1b96b1e00
Remove unnecessary Names from FunctionData::params
2023-04-06 20:14:51 +02:00
Lukas Wirth
99b69525f4
hir_def::expr -> hir_def::hir, hir_def::type_ref -> hir_def::hir::type_ref
2023-04-06 19:36:25 +02:00
Lukas Wirth
fbb1bd5880
Re-enable controlflow outside loop diagnostic
2023-04-06 15:37:53 +02:00
Lukas Wirth
0e7117900c
internal: Resolve labels in body lowering
2023-04-06 14:21:20 +02:00
bors
a1ca52e2a9
Auto merge of #14486 - HKalbasi:dev, r=Veykril
...
Desugar async fn completely
fix #14479
2023-04-05 13:58:38 +00:00
bors
af30656785
Auto merge of #14436 - lowr:patch/normalize-assoc-type-in-path-expr, r=HKalbasi
...
Normalize associated types in paths in expressions
Part of #14393
When we resolve paths in expressions (either path expressions or paths in struct expressions), there's a need of projection normalization, which `TyLoweringContext` cannot do on its own. We've been properly applying normalization for paths in struct expressions without type anchor, but not for others:
```rust
enum E {
S { v: i32 }
Empty,
}
impl Foo for Bar {
type Assoc = E;
fn foo() {
let _ = Self::Assoc::S { v: 42 }; // path in struct expr without type anchor; we already support this
let _ = <Self>::Assoc::S { v: 42 }; // path in struct expr with type anchor; resolves with this PR
let _ = Self::Assoc::Empty; // path expr; resolves with this PR
}
}
```
With this PR we correctly resolve the whole path, but we need some more tweaks in HIR and/or IDE layers to properly resolve a qualifier (prefix) of such paths and provide IDE features that are pointed out in #14393 to be currently broken.
2023-04-05 10:47:47 +00:00
hkalbasi
c26b12d01c
Desugar async fn completely
2023-04-04 23:07:38 +03:30
hkalbasi
8a6ca86247
Use async block in async fn type inference
2023-04-01 04:35:28 +03:30
Ryo Yoshida
8aef04f1a7
Resolve and normalize path segments one by one in variant resolution
2023-03-29 23:32:37 +09:00
Lukas Wirth
bea1c71f83
Use struct_tail_without_normalization in Expectation::rvalue_hint
2023-03-29 14:49:06 +02:00
Lukas Wirth
342fd2b9f3
fix: Properly handle local trait impls
2023-03-28 08:34:29 +02:00
hkalbasi
8e73ea5253
Desugar try blocks
2023-03-19 13:02:51 +03:30
hkalbasi
eb4939e217
Support overloaded deref MIR lowering
2023-03-17 14:02:55 +03:30
hkalbasi
a063f000ff
Support function pointer MIR lowering
2023-03-17 13:08:35 +03:30
hkalbasi
b7b9ae59a0
desugar ? operator
2023-03-17 13:08:35 +03:30
bors
ecc32c2f85
Auto merge of #14271 - Veykril:ty-diag-err, r=Veykril
...
Don't trigger unresolved method/field diagnostics on types containing errors
2023-03-07 14:25:20 +00:00
Lukas Wirth
d45708fabe
Don't trigger unresolved method/field diagnostics on types containing errors
2023-03-07 15:24:43 +01:00
hkalbasi
af90ec8096
Partially support "overloaded deref" MIR lowering
2023-03-06 21:09:09 +03:30
hkalbasi
6377d50bd1
Support "for loop" MIR lowering
2023-03-06 21:09:09 +03:30
hkalbasi
61ad6a96ad
Add BindingId
2023-03-06 21:09:08 +03:30
Lukas Wirth
a51267c5e0
Allocate traits in scope upfront when type checking instead of recollecting them everytime
2023-03-05 15:04:46 +01:00
Lukas Wirth
a8606e5363
Re-use the resolver in InferenceContext instead of rebuilding it on every expression change
2023-03-05 14:37:44 +01:00
Lukas Wirth
e7485a0416
Diagnose unresolved method calls
2023-03-03 20:43:13 +01:00