Rename the ConstS::val field as kind.#97935
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 14, 2022
Merged
Conversation
Contributor
lcnr
reviewed
Jun 10, 2022
Contributor
There was a problem hiding this comment.
Suggested change
| write!(f, "Const {{ ty: {:?}, val: {:?} }}", self.ty(), self.kind()) | |
| write!(f, "Const {{ ty: {:?}, kind: {:?} }}", self.ty(), self.kind()) |
Contributor
|
r? @lcnr r=me after that nit |
5e2d8e6 to
97e6652
Compare
Contributor
Author
|
I fixed the nit, and adjusted the expected output of one test affected by it. @bors r=lcnr |
Collaborator
|
📌 Commit 97e66523e1bd6663ec52f82020ea1d6f3fa9dac9 has been approved by |
This comment has been minimized.
This comment has been minimized.
Member
|
@bors r- |
Collaborator
|
☔ The latest upstream changes (presumably #97778) made this pull request unmergeable. Please resolve the merge conflicts. |
97e6652 to
95f2ac3
Compare
This comment has been minimized.
This comment has been minimized.
And likewise for the `Const::val` method. Because its type is called `ConstKind`. Also `val` is a confusing name because `ConstKind` is an enum with seven variants, one of which is called `Value`. Also, this gives consistency with `TyS` and `PredicateS` which have `kind` fields. The commit also renames a few `Const` variables from `val` to `c`, to avoid confusion with the `ConstKind::Value` variant.
95f2ac3 to
93e4b6e
Compare
Member
|
@bors r=lcnr |
Collaborator
|
📌 Commit 93e4b6e has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 14, 2022
Rollup of 5 pull requests Successful merges: - rust-lang#97869 (BTree: tweak internal comments) - rust-lang#97935 (Rename the `ConstS::val` field as `kind`.) - rust-lang#97948 (lint: add diagnostic translation migration lints) - rust-lang#98042 (Fix compat_fn option method on miri) - rust-lang#98069 (rustdoc: remove link on slice brackets) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
celinval
added a commit
to celinval/kani-dev
that referenced
this pull request
Jul 6, 2022
The updates required were related to the following changes:
- Simplify memory ordering intrinsics
- rust-lang/rust#97423
- once cell renamings
- rust-lang/rust#98165
- Rename the ConstS::val field as kind
- rust-lang/rust#97935
- Remove the source archive functionality of ArchiveWriter
- rust-lang/rust#98098
- Use valtrees as the type-system representation for constant values
- rust-lang/rust#96591
4 tasks
celinval
added a commit
to model-checking/kani
that referenced
this pull request
Jul 6, 2022
* Update toolchain to 2022-07-05
The updates required were related to the following changes:
- Simplify memory ordering intrinsics
- rust-lang/rust#97423
- once cell renamings
- rust-lang/rust#98165
- Rename the ConstS::val field as kind
- rust-lang/rust#97935
- Remove the source archive functionality of ArchiveWriter
- rust-lang/rust#98098
- Use valtrees as the type-system representation for constant values
- rust-lang/rust#96591
* Codegen unimplemented for unsupported constant slices
See #1339 for more details.
* Fix copyright check
* Use codegen_option_span instead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
And likewise for the
Const::valmethod.Because its type is called
ConstKind. Alsovalis a confusing namebecause
ConstKindis an enum with seven variants, one of which iscalled
Value. Also, this gives consistency withTySandPredicateSwhich have
kindfields.The commit also renames a few
Constvariables fromvaltoc, toavoid confusion with the
ConstKind::Valuevariant.r? @BoxyUwU