-
Notifications
You must be signed in to change notification settings - Fork 0
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 PoC for impl Trait
in impl Fn
return in fn parameters
#1
Conversation
@@ -1327,6 +1327,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { | |||
attributes to enable", | |||
); | |||
} | |||
// Explodes here |
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.
// Explodes here |
No longer explodes here. Now explodes in self.find_entry(id).unwrap_or_else(|| panic!("Can't find Entry for HirId {:?}", id))
, below.
@@ -503,7 +503,11 @@ impl<'hir> Map<'hir> { | |||
/// Retrieves the `Node` corresponding to `id`, returning `None` if cannot be found. | |||
pub fn find(&self, hir_id: HirId) -> Option<Node<'hir>> { | |||
self.find_entry(hir_id).and_then(|entry| { | |||
if let Node::Crate(..) = entry.node { None } else { Some(entry.node) } | |||
if let Node::Crate(..) = entry.node { |
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.
Nothing to see here. Just my rust-analyser not being set up correctly.
impl Trait
in impl Fn
return in fn parameters
Just closing some old PRs. Nothing to see here. |
My amateurish attempts at getting rust-lang#45994 to work (I've never done rustc development before. Only contributed test cases so far).
I managed to make the ast lowering step accept the syntax, but I am definitely doing something wrong, because I'm not sure what to do with the
impl Trait
bound, so I'm dropping it on the floor. When the HIR lowering code tries to use it, it's not found in the HIR map, so it explodes (I added some debugging, and it's definitely theimpl Trait
bit that's going missing.)