Calendar tier list when
Posts by Lukas Wirth
congrats!
But even without macros I don't think I would change my mind on this, it is just weird having a float token from the lexer stage that can be part of a field access chain depending on the preceding context and the actual text of the token itself, it unnecessarily complicates the parser imo.
So one solution would've been to completely revamp how we deal with the lexer output (both rustc and r-a use the same lexer), parser and macro TokenTree handling which for obvious reasons no one would ever want to bother with as that is way too much work.
I think kind of both? Rust's macro system forces you to think about two different sources of tokens, and rust-analyzer's current parser system makes specific requirements to the input. We differ a fair bit from rustc in how we model the parser input though I don't recall as to why.
It was a pain to make it work with macros in rust-analyzer, so much so that it took us years to fix. So this choice basically enforces specific requirements for your parser (which r-a's did not really support).
Starting the morning by having to review a pull request that merely changes a complex regex. Thus my morning is already in shambles as I am tasked to review a change in an unreadable language.
Removing field syntax for tuples/tuple struct, that is no `foo.0` etc. It makes parsing so incredibly annoying in Rust as you might have to split float tokens from the lexer depending on what was preceding it
** Speaker announcement ** Catch Vlad Beskrovny & Lukas Wirth's talk 'One Language, Two IDE Engines' at RustWeek 2026!
Info & tickets: 2026.rustweek.org/talks/ides/
See you in Utrecht May 18-23, 2026!
@lukaswirth.dev
#rustweek2026 #rustlang
oh sweet, I was wondering whether that was a thing already or not
Usually you want a reference to the `dyn Any` inside the box, `&Box<dyn Any>` will unfortunately be a reference to the box itself, just that the box is now unsized to `dyn Any`.
The RustWeek 2026 schedule, including the talk details for RustWeek 2026, is now published!
2026.rustweek.org/schedule/tue...
2026.rustweek.org/schedule/wed...
Don't forget to buy your ticket!
#rustweek2026 #rust
The fact that `&Box<dyn Any>` is coercible to `&dyn Any` is such a big footgun ...
This might get me to watch eurovision again, love that guy and some of his songs
** RustWeek Speakers Announced! **
Check out the selected speakers and talks here:
2026.rustweek.org/blog/2026-02...
Thanks to everyone who submitted to our CFP!
#rust #rustweek2026
"Vestige"
It's been a while since I last dedicated an illustration to this duo and I wanted to practice drawing desert scenes again, so here's the result c:
hey uhhh. I got fired yesterday. if anyone has rust positions in the Netherlands let me know!
People are on it, we presume we are overloading rust-analyzer with diagnostic requests, filling the threadpool queue with lots of blocking work github.com/zed-industri...
This can vastly speed up initial project indexing depending on your project as the proc-macro server process can only expand a single macro at a given time (due to macros observing the process environment). Once rust-analyzer becomes a bit more parallel it will also speed up things in general.
If you are on the preview rust-analyzer releases you can now enable using multiple proc-macro servers (or on stable next monday) by setting the `procMacro.processes` config to a higher number than one 1.
github.com/rust-lang/ru...
Oh so that's what you changed on my PR, this diff had me so confused lol
Gotta put rust-analyzer on this list as well
my "this isn't meant to be used for harassment" sign i put on my list of enemies is raising a lot of questions answered by the sign
Or well, I suppose turning the reference impl back into something template-ish for codegen is just far more annoying.
Curious why you used an LLM to duplicate this instead of having a codegen script with the codegen checked out in-tree over a macro then. The codegen approach would allow you to predictably make the same change across all places easily later. I guess because to be able to dupe the documentation?
error[E0277]: the trait bound `NoopEviction: HasCapacity` is not satisfied --> tests\cycle.rs:1306:5 | 1306 | #[salsa::tracked] | ^^^^^^^^^^^^^^^^^ the trait `HasCapacity` is not implemented for `NoopEviction` | help: the trait `HasCapacity` is implemented for `Lru` --> C:\Workspace\salsa\src\function\eviction\lru.rs:75:1 | 75 | impl HasCapacity for Lru {} | ^^^^^^^^^^^^^^^^^^^^^^^^ = help: see issue #48214 = note: this error originates in the macro `salsa::plumbing::setup_tracked_fn` which comes from the expansion of the attribute macro `salsa::tracked` (in Nightly builds, run with -Z macro-backtrace for more info) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 7 + #![feature(trivial_bounds)] |
fn set_lru_capacity(db: &mut dyn $Db, value: usize) where for<'trivial_bounds> $Eviction: $zalsa::function::HasCapacity { $Configuration::fn_ingredient_mut(db).set_capacity(value); }
`#![feature(trivial_bounds)]` or as I like to call it on stable: `for<'trivial_bounds> Type: Bound`
we'd still only be able to execute proc-macros in parallel if they are run within the same environment (working dir, env vars) which only happens within the same crate really. So the alternative we are likely looking at is to just spawn multiple servers and handle them like a process pool.
The annoying part, you can't trivially parallelize this on the proc-macro server because proc-macros execute in (and are in control 😵💫 of) the process environment, so technically running multiple at once can cause issues. But even ignoring that they can change the environment,
And some additional notes for parallel proc-macro expansion, today r-a spawns a single proc-macro server that does expansion one at a time, meaning whenever r-a wants to expand a proc-macro, it takes a global lock on the proc-macro server!
For context as to why we still cannot implement `expand_expr`, that feature effectively turns all proc-macro into eager macro expansions which would basically prevent rust-analyzer from doing a lot of incremental caching, so we just cannot implement this as designed doc.rust-lang.org/stable/proc_...