bitgaoshu
1ef5e14c2c
goto where trait method impl
2022-06-23 14:01:22 +02:00
XFFXFF
6df969f5f4
the offset used for the completion cursor should always be relative to the original file and not to the marco file
2022-06-16 20:34:37 +08:00
XFFXFF
fbf8e12234
the scope of the return type is not the body of the function
2022-06-16 16:24:18 +08:00
Lukas Wirth
6b696fced8
feat: Add binding mode inlay hints
2022-05-14 14:58:35 +02:00
bitgaoshu
5d1aff3357
#11973 associated type is unresolved
2022-04-24 20:51:48 +08:00
Lukas Wirth
4b4a34327e
Remove duplicated crate id field from hir::Type
2022-04-15 20:14:35 +02:00
Lukas Wirth
3632d5946f
minor: Remove pointless rebindings
2022-04-07 01:29:31 +02:00
Lukas Wirth
4a1423337f
fix: Attempt to resolve paths in const arguments heuristically
...
While we don't support const args in type inference yet, we can at least
make use of the fallback path resolution to resolve paths in const args
in the IDE layer to enable some features for them.
2022-04-06 20:24:24 +02:00
Lukas Wirth
7959c24876
fix: Fix path qualifiers not resolving generic type params when shadowed by trait
2022-04-06 19:38:45 +02:00
Jonas Schievink
872b7b9660
Wrap macros in expr position in MacroExpr
node
2022-04-05 17:43:34 +02:00
Lukas Wirth
c290e68ff9
internal: Remove PathResolution::AssocItem
2022-04-01 18:32:05 +02:00
Lukas Wirth
75689f2ad8
internal: Enforce Resolver to always have a module scope
2022-03-31 11:12:08 +02:00
Lukas Wirth
ddf144051a
internal: Treat {global_}asm macros as unsafe
2022-03-20 19:31:00 +01:00
Lukas Wirth
68de7b30e0
feat: Tag macro calls as unsafe if they expand to unsafe expressions
2022-03-20 19:07:44 +01:00
Lukas Wirth
37b48ceb8f
feat: Visualize compiler inserted reborrows via inlay hints
2022-03-20 14:38:16 +01:00
Matthias Krüger
7912e33ed6
fix clippy::needless_borrow
2022-03-12 16:50:49 +01:00
Lukas Wirth
c04b0f435b
Move hir to new MacroId
2022-03-08 23:51:48 +01:00
hkalbasi
660fd4ab41
Resolve only type params in type ns
2022-03-04 12:30:53 +03:30
hkalbasi
4fa8749c44
Preserve order of generic args
2022-03-04 11:46:14 +03:30
Lukas Wirth
7b89d5ede2
internal: Expand the derive attribute into a pseudo expansion
2022-02-22 10:20:40 +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
82fccb971e
feat: Add very simplistic ident completion for format_args! macro input
2022-01-15 12:23:26 +01:00
Lukas Wirth
dc135cc076
internal: Support registered tools and attributes in ide layer
2022-01-06 14:56:50 +01:00
Lukas Wirth
762a3b3030
Fix tool module classification not working correctly
2022-01-02 23:14:18 +01:00
Lukas Wirth
37a87708ae
internal: Don't kick off inference in Semantics::descend_into_macros_impl
2021-12-20 13:19:48 +01:00
Laurențiu Nicola
32b6f103a6
Bump chalk
2021-12-19 18:58:39 +02:00
Lukas Wirth
9915103c9e
Simplify
2021-12-14 12:38:20 +01:00
Lukas Wirth
89e1d19ec5
internal: Prefer resolution of inert attributes
2021-12-05 16:28:08 +01:00
Lukas Wirth
d174158abc
Rename things: Tool -> ToolModule
2021-12-03 17:15:19 +01:00
Lukas Wirth
db559e5049
Simplify
2021-12-03 17:07:06 +01:00
Lukas Wirth
e58af219a4
feat: Resolve builtin-attr and tools in ide layer
2021-12-03 16:32:17 +01:00
Jake Heinz
fec2d39f3c
simplify??
2021-12-01 09:23:42 +00:00
Jake Heinz
a1b2d25810
hir: resolve assoc trait type
2021-12-01 08:44:30 +00:00
Lukas Wirth
26419c0379
Fix proc-macro attributes being shadowed by their functions in IDE layer
2021-11-08 14:49:50 +01:00
Lukas Wirth
aa9d093488
Resolve derive attributes even when shadowed
2021-10-19 13:42:36 +02:00
Aleksey Kladov
73b0f9dc04
internal: remove dead code
2021-09-15 21:22:06 +03:00
Laurențiu Nicola
c9f448a834
Fix some clippy lints
2021-08-16 22:04:26 +03:00
Lukas Wirth
25ff7171c4
Introduce TypeInfo
2021-08-03 16:41:53 +02:00
Lukas Wirth
486603d559
Show coerced types on type hover
2021-08-02 17:10:36 +02:00
Lukas Wirth
c6b6f18520
Simplify Semantics::type_of_expr_with_coercion
2021-07-11 14:44:10 +02:00
Lukas Wirth
9e1eb77f6b
Respect coercions in inline_call
2021-07-10 19:24:49 +02:00
Lukas Wirth
7e6f40b6f1
Expose coercions for patterns and expressions in semantics
2021-07-10 19:03:46 +02:00
Lukas Wirth
576e3a4e12
add_explicit_type
respects coercions
2021-07-10 18:19:46 +02:00
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30
Lukas Wirth
26e784a575
simplify
2021-05-26 21:09:27 +02:00
bors[bot]
495c9586ec
Merge #8945
...
8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold
Also makes call info show the correct types for generic methods.
![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png )
![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png )
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-05-23 21:55:51 +00:00
Florian Diebold
b8262099cc
Get rid of field_type again
2021-05-23 23:54:35 +02:00
Lukas Tobias Wirth
da74c66947
Correctly resolve crate name in use paths when import shadows itself
2021-05-23 19:37:01 +02:00
Florian Diebold
4a6cdd776d
Record method call substs and use them in call info
2021-05-23 18:24:21 +02:00
Jonas Schievink
20ae41c1a1
Reuse database in LowerCtx
2021-05-06 23:23:50 +02:00