Skip to content

Conversation

est31
Copy link
Member

@est31 est31 commented Sep 18, 2020

Removes some unused feature gates from library crates. It's likely not a complete list as I only tested a subset for which it's more likely that it is unused.

Libc isn't used by alloc.
And std and panic_* use libc from crates.io now,
which isn't feature gated.
@rust-highfive
Copy link
Contributor

r? @LukasKalbertodt

(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 Sep 18, 2020
@lcnr
Copy link
Contributor

lcnr commented Sep 18, 2020

r? @lcnr

Feel free to either move this up or just merge this as is

@bors rollup
@bors delegate+

@bors
Copy link
Collaborator

bors commented Sep 18, 2020

✌️ @est31 can now approve this pull request

@lcnr
Copy link
Contributor

lcnr commented Sep 18, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 18, 2020

📌 Commit f272896 has been approved by lcnr

@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
Remove unused feature gates from library/ crates

Removes some unused feature gates from library crates. It's likely not a complete list as I only tested a subset for which it's more likely that it is unused.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
Remove unused feature gates from library/ crates

Removes some unused feature gates from library crates. It's likely not a complete list as I only tested a subset for which it's more likely that it is unused.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
Remove unused feature gates from library/ crates

Removes some unused feature gates from library crates. It's likely not a complete list as I only tested a subset for which it's more likely that it is unused.
@Dylan-DPC-zz
Copy link

failed in rollup

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 19, 2020
@est31
Copy link
Member Author

est31 commented Sep 20, 2020

Huh, interesting. The only x86_64 target where base.max_atomic_width is set to Some(128) is the apple family of targets. That's why I didn't catch it. Does this make sense? It's for a separate issue/PR to figure that out though.

@est31
Copy link
Member Author

est31 commented Sep 20, 2020

$ rg max_atomic_width | rg 128
compiler/rustc_target/src/spec/aarch64_linux_android.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_unknown_none.rs:        max_atomic_width: Some(128),
compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_apple_ios.rs:            max_atomic_width: Some(128),
compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_apple_darwin.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/x86_64_apple_darwin.rs:    base.max_atomic_width = Some(128); // core2 support cmpxchg16b
compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs:        max_atomic_width: Some(128),
compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_apple_tvos.rs:            max_atomic_width: Some(128),
compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_unknown_redox.rs:    base.max_atomic_width = Some(128);
compiler/rustc_target/src/spec/aarch64_fuchsia.rs:    base.max_atomic_width = Some(128);

All aarch64 platforms except for 86_64_apple_darwin.rs. Does an instruction simply disappear on other OSs? Does apple ship custom microcode? :p.

@est31
Copy link
Member Author

est31 commented Sep 20, 2020

The issue needs fixing one way or another. It's been fixed by re-adding the feature gate. re-r? @lcnr

@est31
Copy link
Member Author

est31 commented Sep 20, 2020

Regarding my question, see #76952

@est31
Copy link
Member Author

est31 commented Sep 20, 2020

@bors r+ r=lcnr

@bors
Copy link
Collaborator

bors commented Sep 20, 2020

📌 Commit 562422e has been approved by est31

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 20, 2020
@bors
Copy link
Collaborator

bors commented Sep 20, 2020

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Sep 20, 2020

📌 Commit 562422e has been approved by lcnr

RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 20, 2020
Remove unused feature gates from library/ crates

Removes some unused feature gates from library crates. It's likely not a complete list as I only tested a subset for which it's more likely that it is unused.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 20, 2020
Rollup of 15 pull requests

Successful merges:

 - rust-lang#76732 (Add docs for `BasicBlock`)
 - rust-lang#76832 (Let backends define custom targets)
 - rust-lang#76866 (Remove unused feature gates from library/ crates)
 - rust-lang#76875 (Move to intra-doc links in library/alloc/src/collections/binary_heap.rs)
 - rust-lang#76876 (Move to intra-doc links in collections/btree/map.rs and collections/linked_list.rs)
 - rust-lang#76877 (Move to intra-doc links in collections/vec_deque.rs and collections/vec_deque/drain.rs)
 - rust-lang#76878 (Move the version number to a plaintext file)
 - rust-lang#76883 (README.md: Remove prompts from code blocks)
 - rust-lang#76887 (Add missing examples on HashSet iter types)
 - rust-lang#76890 (use matches!() macro for simple if let conditions)
 - rust-lang#76891 (don't take `TyCtxt` by reference)
 - rust-lang#76910 (transmute: use diagnostic item)
 - rust-lang#76924 (Add tracking issue for feature(unix_socket_peek))
 - rust-lang#76926 (BTreeMap: code readability tweaks)
 - rust-lang#76940 (Don't allow implementing trait directly on type-alias-impl-trait)

Failed merges:

r? `@ghost`
@bors bors merged commit bea0ae7 into rust-lang:master Sep 20, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 20, 2020
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.

7 participants