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

Auto traits are not handled for generic closures #734

Closed
matthewjasper opened this issue Nov 29, 2021 · 8 comments · Fixed by #755
Closed

Auto traits are not handled for generic closures #734

matthewjasper opened this issue Nov 29, 2021 · 8 comments · Fixed by #755
Assignees
Labels
C-chalk-solve Issues related to the chalk-solve crate good first issue A good issue to start working on Chalk with

Comments

@matthewjasper
Copy link
Contributor

matthewjasper commented Nov 29, 2021

The following test fails with both solvers (returning ambiguous).

program {
      #[auto]
      trait Send { }

      closure with_ty<T>(self,) { T }
}

goal {
    forall<T> { if (T: Send) { with_ty<T>: Send } }
} yields {
    "Unique"
}

The empty substs here seem suspicious.

.closure_upvars(*closure_id, &Substitution::empty(interner));

@jackh726 jackh726 added C-chalk-solve Issues related to the chalk-solve crate good first issue A good issue to start working on Chalk with labels Dec 24, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 12, 2022
…niverses, r=jackh726

Improve chalk integration

- Support subtype bounds in chalk lowering
- Handle universes in canonicalization
- Handle type parameters in chalk responses
- Use `chalk_ir::LifetimeData::Empty` for `ty::ReEmpty`
- Remove `ignore-compare-mode-chalk` for tests that no longer hang (they may still fail or ICE)

This is enough to get a hello world program to compile with `-Zchalk` now. Some of the remaining issues that are needed to get Chalk integration working on larger programs are:

- rust-lang/chalk#234
- rust-lang/chalk#548
- rust-lang/chalk#734
- Generators are handled differently in chalk and rustc

r? `@jackh726`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 12, 2022
…niverses, r=jackh726

Improve chalk integration

- Support subtype bounds in chalk lowering
- Handle universes in canonicalization
- Handle type parameters in chalk responses
- Use `chalk_ir::LifetimeData::Empty` for `ty::ReEmpty`
- Remove `ignore-compare-mode-chalk` for tests that no longer hang (they may still fail or ICE)

This is enough to get a hello world program to compile with `-Zchalk` now. Some of the remaining issues that are needed to get Chalk integration working on larger programs are:

- rust-lang/chalk#234
- rust-lang/chalk#548
- rust-lang/chalk#734
- Generators are handled differently in chalk and rustc

r? ``@jackh726``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 13, 2022
…niverses, r=jackh726

Improve chalk integration

- Support subtype bounds in chalk lowering
- Handle universes in canonicalization
- Handle type parameters in chalk responses
- Use `chalk_ir::LifetimeData::Empty` for `ty::ReEmpty`
- Remove `ignore-compare-mode-chalk` for tests that no longer hang (they may still fail or ICE)

This is enough to get a hello world program to compile with `-Zchalk` now. Some of the remaining issues that are needed to get Chalk integration working on larger programs are:

- rust-lang/chalk#234
- rust-lang/chalk#548
- rust-lang/chalk#734
- Generators are handled differently in chalk and rustc

r? `@jackh726`
@pierwill
Copy link
Member

I'm interested in learning more about chalk, so I'll @rustbot claim.

@shamatar
Copy link
Contributor

Can I mark it somehow for review and resolution via rustbot?

@pierwill
Copy link
Member

@rustbot release-assignment

@shamatar
Copy link
Contributor

@rustbot claim I suppose

@rustbot
Copy link
Collaborator

rustbot commented Mar 13, 2022

Error: Parsing assign command in comment failed: ...'tbot claim' | error: expected end of command at >| ' I suppose'...

Please let @rust-lang/release know if you're having trouble with this bot.

@shamatar
Copy link
Contributor

@rustbot claim

@mvaled
Copy link
Contributor

mvaled commented Jul 28, 2022

Hi @shamatar, are you still working on this?

@mvaled
Copy link
Contributor

mvaled commented Jul 28, 2022

Oh! I see now, @shamatar created PR #755 for this.

@bors bors closed this as completed in f5c7ee1 Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-chalk-solve Issues related to the chalk-solve crate good first issue A good issue to start working on Chalk with
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants