Skip to content

lint/ty: move fns to avoid abstraction violation #75099

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 19, 2020

Conversation

davidtwco
Copy link
Member

This PR moves transparent_newtype_field and is_zst to LateContext where they are used, rather than being on the VariantDef and TyS types, hopefully addressing @eddyb's concern from this comment.

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 3, 2020
@davidtwco davidtwco force-pushed the is-zst-abstraction-violation branch from 50d97c0 to 6e550b9 Compare August 17, 2020 15:58
@davidtwco davidtwco force-pushed the is-zst-abstraction-violation branch from 6e550b9 to 474f3d2 Compare August 18, 2020 13:50
@bors

This comment has been minimized.

@davidtwco davidtwco force-pushed the is-zst-abstraction-violation branch from 474f3d2 to 6cc6900 Compare August 27, 2020 10:46
@bors

This comment has been minimized.

@davidtwco davidtwco force-pushed the is-zst-abstraction-violation branch from 6cc6900 to 623851e Compare August 30, 2020 12:56
@bors

This comment has been minimized.

This commit moves `transparent_newtype_field` and `is_zst` to
`LateContext` where they are used, rather than being on the `VariantDef`
and `TyS` types.

Signed-off-by: David Wood <david@davidtw.co>
@davidtwco davidtwco force-pushed the is-zst-abstraction-violation branch from 623851e to 0f2bd56 Compare August 30, 2020 17:57
@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 18, 2020
@eddyb
Copy link
Member

eddyb commented Sep 18, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 18, 2020

📌 Commit 0f2bd56 has been approved by eddyb

@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 Sep 18, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 19, 2020
…ion, r=eddyb

lint/ty: move fns to avoid abstraction violation

This PR moves `transparent_newtype_field` and `is_zst` to `LateContext` where they are used, rather than being on the `VariantDef` and `TyS` types, hopefully addressing @eddyb's concern [from this comment](rust-lang#74340 (comment)).
@RalfJung
Copy link
Member

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2020
Rollup of 14 pull requests

Successful merges:

 - rust-lang#73963 (deny(unsafe_op_in_unsafe_fn) in libstd/path.rs)
 - rust-lang#75099 (lint/ty: move fns to avoid abstraction violation)
 - rust-lang#75502 (Use implicit (not explicit) rules for promotability by default in `const fn`)
 - rust-lang#75580 (Add test for checking duplicated branch or-patterns)
 - rust-lang#76310 (Add `[T; N]: TryFrom<Vec<T>>` (insta-stable))
 - rust-lang#76400 (Clean up vec benches bench_in_place style)
 - rust-lang#76434 (do not inline black_box when building for Miri)
 - rust-lang#76492 (Add associated constant `BITS` to all integer types)
 - rust-lang#76525 (Add as_str() to string::Drain.)
 - rust-lang#76636 (assert ScalarMaybeUninit size)
 - rust-lang#76749 (give *even better* suggestion when matching a const range)
 - rust-lang#76757 (don't convert types to the same type with try_into (clippy::useless_conversion))
 - rust-lang#76796 (Give a better error message when x.py uses the wrong stage for CI)
 - rust-lang#76798 (Build fixes for RISC-V 32-bit Linux support)

Failed merges:

r? `@ghost`
@bors bors merged commit aa25f9e into rust-lang:master Sep 19, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 19, 2020
@davidtwco davidtwco deleted the is-zst-abstraction-violation branch September 21, 2020 12:53
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants