-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
WIP Add late desugaring to rustc_resolve #120247
Conversation
rustc_resolve::late::LateResolutionVisitor contained a typo, claiming that `in_func_body` could hold a `None` value. From context clues, I am guessing that at some point `in_func_body` was an optional.
still need to correctly construct TraitObject kind from res
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
FYI - this is a draft PR. It's definitely not ready for review. I'm using it to track my progress and coordinate. |
Okay. |
@@ -273,7 +273,7 @@ fn configure_and_expand( | |||
|
|||
// Done with macro expansion! | |||
|
|||
resolver.resolve_crate(&krate); | |||
resolver.resolve_crate(&mut krate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the new pass is supposed to run right after this function finishes, at least for the step 1 in #99669 (comment).
Also makes sense to put this pass into a separate file.
(I'm still not sure it's a good idea, all in all, maybe it will become more visible once the step 1 is finished.)
compiler/rustc_resolve/src/late.rs
Outdated
{ | ||
debug!("[Desugar][Ty][BareTrait][{:?}] {:?}\n{:#?}", ty.span, res, ty); | ||
|
||
let trait_obj = TyKind::TraitObject(vec![], TraitObjectSyntax::None); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are creating a trait object with a single generic bound, which is a trait with no bound generics (for<'a>
) and no modifiers (?Foo
, const Bar
). The trait's path is _path
from the type.
Closing - no longer working on this issue. |
Closes #99669