8426: Track recursion limit when expanding custom derive r=jonas-schievink a=jonas-schievink
You can write a custom derive that expands to itself:
```rust
#[proc_macro_derive(Derive)]
pub fn derive(item: TokenStream) -> TokenStream {
let mut out: TokenStream = "#[derive(Derive)]".parse().unwrap();
out.extend(item);
out
}
```
rustc reports a recursion limit error, but rust-analyzer used to spin in name resolution and eventually fail with "name resolution is stuck". This makes it fail fast by respecting the recursion depth of the invocation.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
8419: Move hir_ty to Chalk IR r=flodiebold a=flodiebold
Closes#8313.
There's some further cleanups to do:
- we're still using our `TypeWalk` in lots of places (not for mutating/folding though, just for walking)
- we're still using our own canonicalization and unification and our `InferenceTable`
- ~`ToChalk` still exists and gets called, it's just the identity in most cases now (I'll probably clean those up before merging this)~
8423: Bump lsp-types and syn r=kjeremy a=kjeremy
This lsp-types now supports a default InsertTextMode for completion and a per-completion item commit_characters
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
8408: Update `OUT_DIR` diagnostic to match setting r=jonas-schievink a=jonas-schievink
The setting was renamed, so the diagnostic should follow
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
8407: Move `equals_ctor` to `TyExt` r=flodiebold a=flodiebold
I'd prefer getting rid of it, but it's used in the impl search and not super easy to replace there (I think ideally the impl search would do proper unification, but that's a bit more complicated).
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
I'd prefer getting rid of it, but it's used in the impl search and not
super easy to replace there (I think ideally the impl search would do
proper unification, but that's a bit more complicated).
8402: Remove Ty::substs{_mut} r=flodiebold a=flodiebold
Almost all uses actually only care about ADT substs, so it's better to be explicit. The methods were a bad abstraction anyway since they already didn't include the inner types of e.g. `TyKind::Ref` anymore.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Almost all uses actually only care about ADT substs, so it's better to
be explicit. The methods were a bad abstraction anyway since they
already didn't include the inner types of e.g. `TyKind::Ref` anymore.