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

Fix feature = "nightly" in the new trait solver #126649

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

compiler-errors
Copy link
Member

r? lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 18, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jun 18, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me after nits :(

Comment on lines +307 to +310
// FIXME: let_chains
let kind = kind_ty.to_opt_closure_kind();
let coroutine_ty = if kind.is_some() && !args.tupled_upvars_ty().is_ty_var() {
let closure_kind = kind.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// FIXME: let_chains
let kind = kind_ty.to_opt_closure_kind();
let coroutine_ty = if kind.is_some() && !args.tupled_upvars_ty().is_ty_var() {
let closure_kind = kind.unwrap();
let coroutine_ty = if let Some(kind) = kind_ty.to_opt_closure_kind().filter(|_| !args.tupled_upvars_ty().is_ty_var()) {

Copy link
Member Author

@compiler-errors compiler-errors Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is so much harder to read. I'd really rather unwrap, or restructure the whole block to just be nested ifs.


// FIXME: let_chains
let kind = kind_ty.to_opt_closure_kind();
let coroutine_ty = if kind.is_some() && !args.tupled_upvars_ty().is_ty_var() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@lcnr
Copy link
Contributor

lcnr commented Jun 20, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 20, 2024

📌 Commit 9b0f9ef has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 20, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#126620 (Actually taint InferCtxt when a fulfillment error is emitted)
 - rust-lang#126649 (Fix `feature = "nightly"` in the new trait solver)
 - rust-lang#126652 (Clarify that anonymous consts still do introduce a new scope)
 - rust-lang#126703 (reword the hint::blackbox non-guarantees)
 - rust-lang#126708 (Minimize `can_begin_literal_maybe_minus` usage)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8ddc892 into rust-lang:master Jun 20, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 20, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 20, 2024
Rollup merge of rust-lang#126649 - compiler-errors:nightly, r=lcnr

Fix `feature = "nightly"` in the new trait solver

r? lcnr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants