Skip to content

Fix TyKind::is_simple_path - #103176

Merged
bors merged 2 commits into
rust-lang:masterfrom
nnethercote:fix-TyKind-is_simple_path
Oct 19, 2022
Merged

Fix TyKind::is_simple_path#103176
bors merged 2 commits into
rust-lang:masterfrom
nnethercote:fix-TyKind-is_simple_path

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

To include some `Option<>` fields of different types in a single enum.
The test output is currently buggy, but the next commit will fix that.
PR rust-lang#98758 introduced code to avoid redundant assertions in derived code
like this:
```
let _: ::core::clone::AssertParamIsClone<u32>;
let _: ::core::clone::AssertParamIsClone<u32>;
```
But the predicate `is_simple_path` introduced as part of this failed to
account for generic arguments. Therefore the deriving code erroneously
considers types like `Option<bool>` and `Option<f32>` to be the same.
This commit fixes `is_simple_path`.
Fixesrust-lang#103157.
@rustbotrustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 18, 2022
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 18, 2022
@nnethercote

Copy link
Copy Markdown
ContributorAuthor

@bors rollup=always

@spastorino

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Oct 18, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 9a23f60 has been approved by spastorino

It is now in the queue for this repository.

@borsbors 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 Oct 18, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 19, 2022
…iaskrgr
Rollup of 4 pull requests
Successful merges:
- rust-lang#103166 (Optimize `slice_iter.copied().next_chunk()`)
- rust-lang#103176 (Fix `TyKind::is_simple_path`)
- rust-lang#103178 (Partially fix `src/test/run-make/coverage-reports` when cross-compiling)
- rust-lang#103198 (Update cargo)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit e86bc89 into rust-lang:masterOct 19, 2022
@rustbotrustbot added this to the 1.66.0 milestone Oct 19, 2022
@nnethercote
nnethercote deleted the fix-TyKind-is_simple_path branch October 19, 2022 09:02
@apiraino

Copy link
Copy Markdown
Contributor

I'm going to ask T-compiler about a backport (either or both stable/beta)

@rustbot label beta-nominated stable-nominated

@rustbotrustbot added beta-nominated Nominated for backporting to the compiler in the beta channel. stable-nominated Nominated for backporting to the compiler in the stable channel. labels Oct 19, 2022
@Noratrieb

Copy link
Copy Markdown
Member

I agree that this should go at least back to beta

  • it's a small and obvious change
  • it can break code that compiled with the previous compiler
    Backporting it would minimize churn for users at little maintenance cost

@apiraino

apiraino commented Oct 20, 2022

Copy link
Copy Markdown
Contributor

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbotrustbot added beta-accepted Accepted for backporting to the compiler in the beta channel. stable-accepted Accepted for backporting to the compiler in the stable channel. labels Oct 20, 2022
@apirainoapiraino removed the stable-accepted Accepted for backporting to the compiler in the stable channel. label Oct 20, 2022
@cuvipercuviper mentioned this pull request Oct 20, 2022
@cuvipercuviper modified the milestones: 1.66.0, 1.65.0Oct 20, 2022
@cuvipercuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 20, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 21, 2022
[beta] backports
- Use rebind instead of dummy binder in `SameTypeModuloInfer` relation rust-lang#102059
- Add missing space between notable trait tooltip and where clause rust-lang#102107
- Avoid repeated re-initialization of the BufReader buffer rust-lang#102760
- Ensure enum cast moves rust-lang#103016
- Fix `TyKind::is_simple_path` rust-lang#103176
- Do anonymous lifetimes remapping correctly for nested rpits rust-lang#103205
- [beta] Cargo backport 1.65.0 rust-lang#103303
- linker: Fix weak lang item linking with combination windows-gnu + LLD + LTO rust-lang#103092
r? `@ghost`
@spastorino

spastorino commented Oct 21, 2022

Copy link
Copy Markdown
Member

This one was also stable-acceptedhttps://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202022-10-20/near/305212449.

@apiraino did you intend to remove stable-accepted for some reason?. Maybe I have missed some conversation or something.

I think as with #103205, this one needs @rustbot label +stable-accepted -stable-nominated too.

@apirainoapiraino added the stable-accepted Accepted for backporting to the compiler in the stable channel. label Oct 21, 2022
@cuviper

Copy link
Copy Markdown
Member

I'm general, backports should keep both the nominated and accepted label until they've actually been backported.

@Mark-SimulacrumMark-Simulacrum removed stable-nominated Nominated for backporting to the compiler in the stable channel. stable-accepted Accepted for backporting to the compiler in the stable channel. labels Mar 19, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

Illegal Eq derive in an enum with Option<f64>

9 participants

@nnethercote@spastorino@bors@apiraino@Noratrieb@cuviper@Mark-Simulacrum@rust-highfive@rustbot