Hey, I was looking at things blocking
proc_macro_hygiene and realized that https://github.com/rust-lang/rust/issues/55414 is labelled as E-help-wanted and E-mentor. I would love to fix this. But I have no idea where to start. @Vadim Petrochenkov , you are the mentor, right?
@Vadim Petrochenkov , you are the mentor, right?
Yes, I am!
Looks like you haven't worked on
The first thing to understand here is how
rustc's Abstract Syntax Tree is organized (
src\libsyntax\ast.rs) and how visitor pattern is used for walking AST immutably (
src\libsyntax\visit.rs) or mutably (
InvocationCollector's implementation of
MutVisitor needs to be tweaked to implement the new behavior for attributes, this comments https://github.com/rust-lang/rust/issues/55414#issuecomment-554005412 describes some details.
(Of course, before that you'll need to build rustc (https://github.com/rust-lang/rust/blob/master/README.md) and be able to run tests (
./x.py test --bless --stage 1 src/test/ui --test-args my_test_name).)
Got the tests working
@Vadim Petrochenkov should I add a test to
ui folder for this issue as first step? I am asking because I am not sure where to add the test
Yes, tests usually go into subdirectories of
test\ui\attributes in this case.
@pksunkara The rustc-guide can be a good starting point for general rustc questions: https://rust-lang.github.io/rustc-guide/
In particular: https://rust-lang.github.io/rustc-guide/building/suggested.html and https://rust-lang.github.io/rustc-guide/tests/intro.html and https://rust-lang.github.io/rustc-guide/compiler-debugging.html
Any news? Do you have a branch in progress so I could look at it and give some feedback?
Unfortunately no, I have been travelling last week. I should have some stuff for you to look at this week. Sorry.
Hey @Vadim Petrochenkov, with the stabilisation of fn-like macros for expressions, my main reason for picking this up is gone. I am not interested in attribute macros for expressions. I would much rather focus my effort on getting
type_ascription stable. But I really would love to get back to this sometime.