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

Refactor liveness to work on the CFG and use dataflow #14971

Closed
nikomatsakis opened this issue Jun 17, 2014 · 2 comments
Closed

Refactor liveness to work on the CFG and use dataflow #14971

nikomatsakis opened this issue Jun 17, 2014 · 2 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)

Comments

@nikomatsakis
Copy link
Contributor

Now that @pnkfelix has landed CFG and is about to land dataflow, it's time for liveness code to be rewritten to use it.

Currently liveness has two responsibilities:

  • issuing warnings for dead writes
  • checking that functions always return a value or fail

Probably liveness as a pass should go away and be moved into borrowck.

cc @zwarich

@steveklabnik steveklabnik added the A-frontend Area: Compiler frontend (errors, parsing and HIR) label Jan 23, 2015
@steveklabnik
Copy link
Member

I think frontend is the right tag?

@arielb1
Copy link
Contributor

arielb1 commented Sep 14, 2015

This is now a part of the MIR issue.

@arielb1 arielb1 closed this as completed Sep 14, 2015
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
…r, r=HKalbasi

fix: consider outer binders when folding captured items' type

Fixes rust-lang#14966

Basically, the crash is caused by us producing a broken type and passing it to chalk: `&dyn for<type> [for<> Implemented(^1.0: A<^0.0>)]` (notice the innermost bound var `^0.0` has no corresponding binder). It's created in `CapturedItemWithoutTy::with_ty()`, which didn't consider outer binders when folding types to replace placeholders with bound variables.

The fix is one-liner, but I've also refactored the surrounding code a little.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)
Projects
None yet
Development

No branches or pull requests

3 participants