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

rustc_target: Further cleanup use of target options #78875

Merged
merged 3 commits into from
Nov 11, 2020

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Nov 8, 2020

Follow up to #77729.

Implements items 2 and 4 from the list in #77729 (comment).

The first commit collapses uses of target.options.foo into target.foo.

The second commit renames some target options to avoid tautology:
target.target_endian -> target.endian
target.target_c_int_width -> target.c_int_width
target.target_os -> target.os
target.target_env -> target.env
target.target_vendor -> target.vendor
target.target_family -> target.os_family
target.target_mcount -> target.mcount

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 8, 2020
@est31
Copy link
Member

est31 commented Nov 8, 2020

@petrochenkov you mean 2 and 4?

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 8, 2020

📌 Commit e0a94f27913c9b2c476922aa47844d9375313a98 has been approved by Mark-Simulacrum

@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 Nov 8, 2020
with an eye on merging `TargetOptions` into `Target`.

`TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
`target.target_endian` -> `target.endian`
`target.target_c_int_width` -> `target.c_int_width`
`target.target_os` -> `target.os`
`target.target_env` -> `target.env`
`target.target_vendor` -> `target.vendor`
`target.target_family` -> `target.os_family`
`target.target_mcount` -> `target.mcount`
@petrochenkov
Copy link
Contributor Author

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Nov 8, 2020

📌 Commit 7f91175 has been approved by Mark-Simulacrum

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 11, 2020
…as-schievink

Rollup of 14 pull requests

Successful merges:

 - rust-lang#76765 (Make it more clear what an about async fn's returns when referring to what it returns)
 - rust-lang#78574 (Use check-pass instead of build-pass in regions ui test suite)
 - rust-lang#78669 (Use check-pass instead of build-pass in some consts ui test suits)
 - rust-lang#78847 (Assert that a return place is not used for indexing during integration)
 - rust-lang#78854 (Workaround for "could not fully normalize" ICE )
 - rust-lang#78875 (rustc_target: Further cleanup use of target options)
 - rust-lang#78887 (Add comments to explain memory usage optimization)
 - rust-lang#78890 (comment attribution fix)
 - rust-lang#78896 (Clarified description of write! macro)
 - rust-lang#78897 (Add missing newline to error message of the default OOM hook)
 - rust-lang#78898 (add regression test for rust-lang#78892)
 - rust-lang#78908 ((rustdoc) [src] link for types defined by macros shows invocation, not defintion)
 - rust-lang#78910 (Fix links to stabilized versions of some intrinsics)
 - rust-lang#78912 (Add macro test for min-const-generics)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 105f4b8 into rust-lang:master Nov 11, 2020
@rustbot rustbot added this to the 1.49.0 milestone Nov 11, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 15, 2020
rustc_target: Fix dash vs underscore mismatches in option names

Fixes rust-lang#78981 (regression from rust-lang#78875, the old option names used dashes)
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Nov 27, 2020
…lacrum

rustc_target: Further cleanup use of target options

Follow up to rust-lang#77729.

Implements items 2 and 4 from the list in rust-lang#77729 (comment).

The first commit collapses uses of `target.options.foo` into `target.foo`.

The second commit renames some target options to avoid tautology:
`target.target_endian` -> `target.endian`
`target.target_c_int_width` -> `target.c_int_width`
`target.target_os` -> `target.os`
`target.target_env` -> `target.env`
`target.target_vendor` -> `target.vendor`
`target.target_family` -> `target.os_family`
`target.target_mcount` -> `target.mcount`

r? `@Mark-Simulacrum`
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants