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

effects: fix a comment #119089

Merged

Conversation

fmease
Copy link
Member

@fmease fmease commented Dec 18, 2023

r? fee1-dead or compiler

@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. labels Dec 18, 2023
@fmease fmease added the F-effects `#![feature(effects)]` label Dec 18, 2023
Comment on lines 390 to 396
&& !matches!(
arg,
GenericArg::Const(hir::ConstArg {
is_desugared_from_effects: true,
..
})
)
Copy link
Member Author

@fmease fmease Dec 18, 2023

Choose a reason for hiding this comment

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

Obviously I'm “treating symptoms” here but for the lowerer there's simply no way to know up front if the trait is non-const to avoid synthesizing host effect args.

@fmease fmease changed the title Don't crash on ~const trait bounds involving a non-const trait Don't crash on ~const trait bounds involving non-const traits Dec 18, 2023
@rustbot

This comment was marked as resolved.

@fee1-dead
Copy link
Member

I think this is fixed via 324ca87

@fmease fmease force-pushed the dont-ice-on-tilde-const-non-const-trait branch from 9746938 to b2e304e Compare December 19, 2023 11:48
@@ -262,7 +262,7 @@ pub fn create_args_for_parent_generic_args<'tcx, 'a>(
// impl const PartialEq for () {}
// ```
//
// Since this is a const impl, we need to insert `<false>` at the end of
Copy link
Member Author

Choose a reason for hiding this comment

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

It's not false but host in this case, therefore I've updated the comment.

@fmease
Copy link
Member Author

fmease commented Dec 19, 2023

I think this is fixed via 324ca87

Ah, yes, much better! Makes sense. I've pushed your suggested changes and made you the co-author.

@fee1-dead
Copy link
Member

That commit is actually contained in #119072, but feel free to change this to just the comment change and r=me.

@fmease fmease force-pushed the dont-ice-on-tilde-const-non-const-trait branch from b2e304e to ffdc6c7 Compare December 19, 2023 13:25
@fmease fmease changed the title Don't crash on ~const trait bounds involving non-const traits effects: fix a comment Dec 19, 2023
@rustbot

This comment was marked as resolved.

@fmease
Copy link
Member Author

fmease commented Dec 19, 2023

That commit is actually contained in #119072

Ah, lol 🤦

@bors r=fee1-dead rollup

@bors

This comment was marked as outdated.

@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 Dec 19, 2023
@bors

This comment was marked as resolved.

@bors
Copy link
Contributor

bors commented Dec 19, 2023

📌 Commit ffdc6c7 has been approved by fee1-dead

It is now in the queue for this repository.

compiler-errors added a commit to compiler-errors/rust that referenced this pull request Dec 19, 2023
…-const-trait, r=fee1-dead

effects: fix a comment

r? fee1-dead or compiler
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 19, 2023
…mpiler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#118691 (Add check for possible CStr literals in pre-2021)
 - rust-lang#118973 (rustc_codegen_ssa: Don't drop `IncorrectCguReuseType` , make `rustc_expected_cgu_reuse` attr work)
 - rust-lang#119071 (-Znext-solver: adapt overflow rules to avoid breakage)
 - rust-lang#119089 (effects: fix a comment)
 - rust-lang#119096 (Yeet unnecessary param envs)
 - rust-lang#119118 (Fix arm64e-apple-ios target)
 - rust-lang#119134 (resolve: Feed visibilities for unresolved trait impl items)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 20, 2023
…mpiler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#118691 (Add check for possible CStr literals in pre-2021)
 - rust-lang#118973 (rustc_codegen_ssa: Don't drop `IncorrectCguReuseType` , make `rustc_expected_cgu_reuse` attr work)
 - rust-lang#119071 (-Znext-solver: adapt overflow rules to avoid breakage)
 - rust-lang#119089 (effects: fix a comment)
 - rust-lang#119096 (Yeet unnecessary param envs)
 - rust-lang#119118 (Fix arm64e-apple-ios target)
 - rust-lang#119134 (resolve: Feed visibilities for unresolved trait impl items)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 20, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#118691 (Add check for possible CStr literals in pre-2021)
 - rust-lang#118973 (rustc_codegen_ssa: Don't drop `IncorrectCguReuseType` , make `rustc_expected_cgu_reuse` attr work)
 - rust-lang#119071 (-Znext-solver: adapt overflow rules to avoid breakage)
 - rust-lang#119089 (effects: fix a comment)
 - rust-lang#119094 (Add function ABI and type layout to StableMIR)
 - rust-lang#119102 (Add arm-none-eabi and armv7r-none-eabi platform-support documentation.)
 - rust-lang#119107 (subtype_predicate: remove unnecessary probe)

Failed merges:

 - rust-lang#119135 (Fix crash due to `CrateItem::kind()` not handling constructors)
 - rust-lang#119141 (Add method to get instance instantiation arguments)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f9c752d into rust-lang:master Dec 20, 2023
11 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 20, 2023
@fmease fmease deleted the dont-ice-on-tilde-const-non-const-trait branch December 20, 2023 11:13
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 20, 2023
Rollup merge of rust-lang#119089 - fmease:dont-ice-on-tilde-const-non-const-trait, r=fee1-dead

effects: fix a comment

r? fee1-dead or compiler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-effects `#![feature(effects)]` 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants