dfireBird
d6e3929841
include lifetime in ParamKind and in Generics::provenance_split
2024-03-18 17:18:08 +05:30
dfireBird
e463a3e1cf
update make_binders to include lifetimes in generics
...
adds a bunch of iter methods that include lifetimes
2024-03-18 17:18:08 +05:30
dfireBird
16493e301e
fix index returned for the use of BoundVar
2024-03-18 17:18:08 +05:30
bors
d3eeadc242
Auto merge of #16852 - ShoyuVanilla:atpit, r=Veykril
...
feat: Implement ATPIT
Resolves #16584
Note: This implementation only works for ATPIT, not for TAIT.
The main hinderence that blocks the later is the defining sites of TAIT can be inner blocks like in;
```rust
type X = impl Default;
mod foo {
fn bar() -> super::X {
()
}
}
```
So, to figure out we are defining it or not, we should recursively probe for nested modules and bodies.
For ATPIT, we can just look into current body because `error[E0401]: can't use 'Self' from outer item` prevent such nested structures;
```rust
trait Foo {
type Item;
fn foo() -> Self::Item;
}
struct Bar;
impl Foo for Bar {
type Item = impl Default;
fn foo() -> Self::Item {
fn bar() -> Self::Item {
^^^^^^^^^^
|
use of `Self` from outer item
refer to the type directly here instead
5
}
bar()
}
}
```
But this implementation does not checks for unification of same ATPIT between different bodies, monomorphization, nor layout for similar reason. (But these can be done with lazyness if we can utilize something like "mutation of interned value" with `db`. I coundn't find such thing but I would appreciate it if such thing exists and you could let me know 😅 )
2024-03-18 10:38:24 +00:00
Nadrieril
8d59aaf735
Use in-tree rustc_pattern_analysis
2024-03-17 14:16:30 +01:00
Shoyu Vanilla
d2aba91a0c
feat: Implement ATPIT
2024-03-16 03:31:12 +09:00
Tavo Annus
bb3c7cff60
Introduce term search to rust-analyzer
2024-02-11 13:33:29 +02:00
Lukas Wirth
5136705fad
internal: Remove SELF_REF hack for self referential SyntaxContexts
2024-02-10 16:20:02 +01:00
Tetsuharu Ohzeki
c6637f39c0
clippy: Enable borrowed_box rule
2024-02-10 00:14:17 +09:00
clubby789
a1fdb876c3
Remove abi_amdgpu_kernel references
2024-01-31 19:06:10 +00:00
Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
Nadrieril
2370b70f25
Replace local copy of exhaustiveness checking with upstream librarified version
2024-01-23 15:54:00 +01:00
Johann Hemmann
9dd07f0bc4
should_implement_trait
2024-01-19 17:53:09 +01:00
Lukas Wirth
46e38318a2
Stub out FnAbi::partial_eq as a workaround for now
2024-01-19 15:15:23 +01:00
Lukas Wirth
3a722bdf2e
feat:Record FnAbi
2024-01-19 15:15:23 +01:00
Johann Hemmann
fad4fa163c
cargo clippy --fix
2024-01-18 13:59:49 +01:00
Lukas Wirth
f972da70d4
Remove rustc_dependencies crate
2024-01-08 15:39:35 +01:00
Lukas Wirth
5ac0c14384
Remove some vec clones in const-eval
2024-01-06 21:33:47 +01:00
Lukas Wirth
5125063a21
Remove unnecessary cloning
2024-01-06 17:48:07 +01:00
Lukas Wirth
c9c4053eed
More aliases
2024-01-06 16:58:15 +01:00
Lukas Wirth
143203b713
Make TraitEnvironment's constructor private
2023-12-08 10:47:36 +01:00
David Barsky
c17dcc8d90
internal: switch to Arc::from_iter
2023-12-06 13:08:45 -05:00
Johannes Hostert
374affea3c
make ParamLoweringMode accessible
2023-12-06 15:12:55 +01:00
Igor Matuszewski
a7224c998d
Don't explicitly warn against semicolon_in_expressions_from_macros
...
This has been warn-by-default for two years now and has already been
added to the future-incompat lints in 1.68.
2023-12-05 11:35:09 +01:00
Laurențiu Nicola
6b53c09ef5
Merge branch 'master' into sync-from-rust
2023-11-15 09:46:27 +02:00
Lukas Wirth
6ddccc9a6e
Diagnose some orphan trait impl cases
2023-11-14 18:09:34 +01:00
Laurențiu Nicola
b6951defa6
Add missing rustc_private features
2023-11-13 21:38:57 +02:00
Laurențiu Nicola
30d8aa1bec
Merge commit ' 9b3d03408c' into sync-from-ra
2023-08-21 12:44:09 +03:00
ponyii
e4c45427dc
refactoring
2023-08-08 21:57:55 +04:00
ponyii
61cabe029f
the "add missing members" assists: supported bracketed default const values
2023-08-08 21:57:55 +04:00
ponyii
4ebdc6f052
syntax update: the default value of ConstParam turned from Expr into ConstArg
2023-08-08 21:57:54 +04:00
ponyii
52b4392724
the "add missing members" assists: implemented substitution of default values of const params
2023-08-08 21:57:54 +04:00
Laurențiu Nicola
4704881b64
Merge commit ' 37f84c101b' into sync-from-ra
2023-07-17 16:49:15 +03:00
hkalbasi
6f7452882a
Fix layout of simd types and respect align in mir interpreter
2023-07-02 00:42:33 +03:30
Laurențiu Nicola
c48062fe2a
Merge commit ' aa9bc86125' into sync-from-ra
2023-06-05 12:04:23 +03:00
hkalbasi
f9e3b180b7
Add enum, reference, array and slice to render_const_scalar
2023-06-02 13:47:02 +03:30
hkalbasi
cbcafd3539
MIR episode 5
2023-05-12 18:17:15 +03:30
Lukas Wirth
8081a654da
feat: Closure capture inlay hints
2023-05-05 13:38:22 +02:00
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
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
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
fc840dbb2d
internal: Don't expose InferenceTable outside of hir-ty
2023-03-30 13:27:10 +02:00
Lukas Wirth
251b3a47af
Simplify
2023-03-30 09:21:10 +02:00
bors
7a98e24777
Auto merge of #14431 - Veykril:simplify, r=Veykril
...
minor: Simplify
2023-03-29 07:28:42 +00:00
Lukas Wirth
8ea1afce28
Simplify
2023-03-28 16:32:26 +02:00
Lukas Wirth
342fd2b9f3
fix: Properly handle local trait impls
2023-03-28 08:34:29 +02:00
hkalbasi
a063f000ff
Support function pointer MIR lowering
2023-03-17 13:08:35 +03:30
Laurențiu Nicola
b2f6fd4f96
⬆️ rust-analyzer
2023-03-13 10:42:24 +02:00