Lukas Wirth
7beac14cba
Internal: Cleanup proc-macro error handling
2024-07-26 14:38:19 +02:00
Lukas Wirth
9cbafa2d49
Remove Params and Fields from AstIdMap
2024-07-25 10:22:05 +02:00
Vincent Esche
acb50efb3a
Add method Impl::all_in_module(…)
for supporting more localized querying
2024-07-23 14:43:38 +02:00
Lukas Wirth
7c374a10bd
internal: Shrink size of Binding
2024-07-22 17:14:17 +02:00
Lukas Wirth
5806950712
Remove incorrect never! invocations
2024-07-22 10:53:18 +02:00
Lukas Wirth
5264f86242
Encode edition within FileId in the hir layer
2024-07-18 08:49:10 +02:00
Lukas Wirth
2346a80ab4
Remove Name::to_smol_str
2024-07-16 12:43:58 +02:00
Lukas Wirth
df5f1777b8
More symbol usage
2024-07-16 12:05:16 +02:00
Lukas Wirth
93024ad411
Switch token trees to use Symbols
2024-07-16 10:11:59 +02:00
Lukas Wirth
f2d51073d2
Use statics + clone instead of const until const can access statics
2024-07-14 17:52:59 +02:00
Lukas Wirth
3fe815b0f3
Use Symbol in Name
2024-07-12 16:06:44 +02:00
beetrees
d5db933f9d
Add f16
and f128
support
2024-07-10 10:43:14 +01:00
Lukas Wirth
966798b7ba
Make GenericParams::lifetimes private
2024-07-02 13:45:53 +02:00
Lukas Wirth
372e2d22e6
Make GenericParams::type_or_consts private
2024-07-02 13:45:48 +02:00
Lukas Wirth
1a929d6485
Fix lifetime parameters moving paramter defaults
2024-07-02 12:34:32 +02:00
Lukas Wirth
21a3d01875
Remove inline rust_2018_idioms, unused_lifetimes
lint warn, Cargo.toml already enforces this
2024-06-30 15:23:54 +02:00
Lukas Wirth
8df034d453
Shrink mbe's Op
2024-06-24 10:07:32 +02:00
Lukas Wirth
3168ab5b99
Enum variants are not generic def ids
2024-06-24 10:07:31 +02:00
roife
d5bb2f0cba
fix: use ItemInNs::Macros to convert ModuleItem to ItemInNs
2024-06-21 21:05:14 +08:00
Lukas Wirth
8520a0c585
Thread more HasSource::source calls through Semantics for caching
2024-06-10 10:33:07 +02:00
Wilfred Hughes
27182bb96b
chore: Prefer tracing span shorthand macros
2024-06-06 16:52:25 -07:00
Lukas Wirth
9349045e09
Use dyn cache for Semantics macro resolution
2024-06-04 16:25:38 +02:00
Lukas Wirth
6f0207d594
Cleanup some inert attribute stuff
2024-06-04 12:38:20 +02:00
bors
cb6b808185
Auto merge of #17315 - hamirmahal:style/simplify-string-interpolation, r=Veykril
...
style: simplify string interpolation
2024-06-03 12:29:27 +00:00
Hamir Mahal
7c34eb3880
style: simplify string interpolation
2024-05-30 16:18:49 -07:00
Vincent Esche
7b75f1113c
Add Function::fn_ptr_type(…)
for obtaining name-erased function type
2024-05-29 19:41:55 +02:00
David Barsky
a0d3a81a19
fix: ensure implied bounds from associated types are considered in autocomplete
2024-05-22 16:16:20 -04:00
David Barsky
b75301cec8
internal: refactor prefer_no_std
/prefer_prelude
bools into a struct
2024-05-22 20:46:30 +02:00
bors
6a16749eb0
Auto merge of #17277 - Veykril:find-path-fixes, r=Veykril
...
fix: Various find path fixes
Fixes https://github.com/rust-lang/rust-analyzer/issues/17271
2024-05-22 18:22:32 +00:00
Lukas Wirth
c88b421853
fix: Fix general find-path inconsistencies
2024-05-22 14:05:24 +02:00
Lukas Wirth
7bd343e085
Show fn traits in signature info for trait implementors
2024-05-18 16:22:59 +02:00
Lukas Wirth
ff79903cf6
Render closure fn trait kind in siganture help
2024-05-18 15:01:37 +02:00
Lukas Wirth
7c6f31a45b
Allow hir::Param to refer to other entity params aside from functions
2024-05-18 12:35:55 +02:00
Lukas Wirth
cd9e90cc71
Update builtin tool list
2024-05-18 10:52:05 +02:00
Lukas Wirth
aaa5426fec
internal: Add StaticLifetime to hir API
2024-05-16 08:02:51 +02:00
bors
b98690ba74
Auto merge of #17221 - Veykril:lazier-validation, r=Veykril
...
internal: Lazier macro parse tree validation
2024-05-13 15:16:46 +00:00
Lukas Wirth
caddcccea5
parse_macro_expansion_error
almost never contains values so Option
it
2024-05-13 17:02:08 +02:00
Lukas Wirth
56552f4839
Push macro-parsing error calculation out of fundamental queries
2024-05-13 16:56:26 +02:00
Lukas Wirth
253929f6ae
Fix literal hovers being confusing and wrong for floats
2024-05-13 12:26:45 +02:00
Wilfred Hughes
c981ff0944
fix: Tracing span names should match function names
...
When viewing traces, it's slightly confusing when the span name doesn't
match the function name. Ensure the names are consistent.
(It might be worth moving most of these to use #[tracing::instrument]
so the name can never go stale. @davidbarsky suggested that is marginally
slower, so I've just done the simple change here.)
2024-04-30 11:22:47 -07:00
bors
84ef3cfa91
Auto merge of #17138 - Kohei316:generate-function-assist-for-new, r=Veykril
...
feature: Make generate function assist generate a function as a constructor if the generated function has the name "new" and is an asscociated function.
close #17050
This PR makes `generate function assist` generate a function as a constructor if the generated function has the name "new" and is an asscociated function.
If the asscociate type is a record struct, it generates the constructor like this.
```rust
impl Foo {
fn new() -> Self {
Self { field_1: todo!(), field_2: todo!() }
}
}
```
If the asscociate type is a tuple struct, it generates the constructor like this.
```rust
impl Foo {
fn new() -> Self {
Self(todo!(), todo!())
}
}
```
If the asscociate type is a unit struct, it generates the constructor like this.
```rust
impl Foo {
fn new() -> Self {
Self
}
}
```
If the asscociate type is another adt, it generates the constructor like this.
```rust
impl Foo {
fn new() -> Self {
todo!()
}
}
```
2024-04-30 12:09:34 +00:00
morine0122
ff2629d651
Make generate function assist generate a function as a constructor if the name of function is new
2024-04-30 17:02:48 +09:00
David Barsky
5ba37f3f8e
chore: fix a few spans without .entered()
2024-04-17 12:44:49 -04:00
Lukas Wirth
531a270d91
Generally optimize diagnostics performance
2024-04-15 22:15:41 +02:00
Lukas Wirth
1915980031
fix: Fix impl Trait<Self>
causing stackoverflows
2024-04-15 15:41:20 +02:00
Lukas Wirth
a82e028e30
Cleanup util::Generics method names
2024-04-06 14:29:40 +02:00
Lukas Wirth
f3567bb604
Arc CrateData::cfg_options
2024-04-06 13:55:10 +02:00
Lukas Wirth
5957835cdf
Consider exported_name="main"
functions in test modules as tests
2024-04-04 14:51:10 +02:00
Lukas Wirth
86967032f7
Consider ADT generic parameter defaults for unsubstituted layout calculations
2024-04-03 09:01:27 +02:00
bors
c3b8c2a254
Auto merge of #16996 - Veykril:lt-err, r=Veykril
...
internal: Lower outlive goals, respect them in display impls
2024-04-02 14:13:22 +00:00