4183: Introduce new semantic highlight token for format specifier r=matklad a=ltentrup
Follow up from #4006: Instead of using the `attribute` highlight token, introduce a new semantic token for format specifier.
Co-authored-by: Leander Tentrup <leander.tentrup@gmail.com>
4173: Use core instead of std for builtin derive macros r=edwin0cheng a=edwin0cheng
Fixed#4087.
We can't use `$crate` here right now because :
1. We have to able to detect `macro` 2.0 in collecting phase for finding `rustc_builtin_macro` attrs.
2. And we have to make hygiene works for builtin derive macro.
r= @flodiebold
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4159: For associated type shorthand (T::Item), use the substs from the where clause r=matklad a=flodiebold
So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower
that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`.
4146: Don't add call parens when an fn type is expected r=matklad a=jonas-schievink
This is pretty useful when dealing with callback- or fn-pointer-heavy FFI code, as I have recently.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4113: Support returning non-hierarchical symbols r=matklad a=kjeremy
If `hierarchicalDocumentSymbolSupport` is not true in the client capabilites
then it does not support the `DocumentSymbol[]` return type from the
`textDocument/documentSymbol` request and we must fall back to `SymbolInformation[]`.
This is one of the few requests that use the client capabilities to
differentiate between return types and could cause problems for clients.
See https://github.com/microsoft/language-server-protocol/pull/538#issuecomment-442510767 for more context.
Found while looking at #144
4136: add support for cfg feature attributes on expression #4063 r=matklad a=bnjjj
close issue #4063
4141: Fix typo r=matklad a=Veetaha
4142: Remove unnecessary async from vscode language client creation r=matklad a=Veetaha
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: veetaha <veetaha2@gmail.com>
4139: Add check for rules that no repetition which could match an empty token r=matklad a=edwin0cheng
Fix#4103
for `/ui/issues/issue-57597.rs`
This is `ParseError` of the macro rules , because it is how rustc handle it :
a58b1ed44f/src/librustc_expand/mbe/macro_rules.rs (L558)
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>