Skip to content
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

Incorrect lambda kind inferred in block tail position #2773

Closed
brson opened this issue Jul 2, 2012 · 1 comment
Closed

Incorrect lambda kind inferred in block tail position #2773

brson opened this issue Jul 2, 2012 · 1 comment
Labels
A-type-system Area: Type system

Comments

@brson
Copy link
Contributor

brson commented Jul 2, 2012

fn unique() -> fn~() { || () }

This fails because || () is inferred as fn@(). fn unique() -> fn~ { ret || (); } works as expected. Test case will be in run-pass/newlambdas-ret-infer2.

@ghost ghost assigned catamorphism Nov 24, 2012
@emberian
Copy link
Member

Fixed, closed with #7346

RalfJung pushed a commit to RalfJung/rust that referenced this issue Feb 26, 2023
lnicola pushed a commit to lnicola/rust that referenced this issue Mar 13, 2023
Handle trait alias definitions

Part of rust-lang#2773

This PR adds a bunch of structs and enum variants for trait aliases. Trait aliases should be handled as an independent item because they are semantically distinct from traits.

I basically started by adding `TraitAlias{Id, Loc}` to `hir_def::item_tree` and iterated adding necessary stuffs until compiler stopped complaining what's missing. Let me know if there's still anything I need to add.

I'm opening up this PR for early review and stuff. I'm planning to add tests for IDE functionalities in this PR, but not type-related support, for which I put FIXME notes.
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

3 participants