-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Missing assert_eq
suggestion
#1727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Related to #1688 |
I think we have these macros in the global macro scope when we run The problem is, that the global macro scope is a mutable map, which is cleared after we have processed the crate. We could record snapshots of the map as we process the crate, but that would put an IDE specific concern into the compiler. A more clean separation would be to just traverse the crate in dfs order up to completion point in the ide, collecting macros along the way. This would duplicate nameres logic in IDE though. A nice short-term 80% solution would be to only process macros from |
1784: Support textual scoped macros r=matklad a=uHOOCCOOHu Refactor the old simulation with `global_macro_scope`. Now it is quite accurate to resolve textual scoped macros. - Expand textual scoped macros in item and non-item place. - Support `#[macro_use]` on `mod`. - Textual scoped macros are collected into `nameres::ModuleScope`, so I think it makes #1727 easier to fix. - It is implemented in a simple way to `clone()` current scoped macro ids into sub-modules. Though only indices are cloned, it will still increase some resolving time. Well, I've not bench-marked yet. In my test with vscode extension, it can now successfully expand `dbg!` from `std` without `std::` prefix. "Goto definition" also works. Screenshot here: <img width="281" alt="Screenshot_20190907_043442" src="https://user-images.githubusercontent.com/14816024/64458794-ddb47900-d128-11e9-95e3-1c8569978825.png"> Co-authored-by: uHOOCCOOHu <hooccooh1896@gmail.com>
I don't get any suggestions for
assert_eq
. This was a completely blank project and I tried restarting rust-analyzer.These are the only
as*
suggestions I see:Ref #1710 re posting these
The text was updated successfully, but these errors were encountered: