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

Add #[repr(transparent)] to some libcore types #51395

Merged
merged 1 commit into from
Jul 4, 2018

Conversation

SimonSapin
Copy link
Contributor

@SimonSapin SimonSapin commented Jun 6, 2018

  • UnsafeCell
  • Cell
  • NonZero*
  • NonNull
  • Unique

CC #43036

@SimonSapin SimonSapin added A-attributes Area: #[attributes(..)] T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. B-RFC-implemented Blocker: Approved by a merged RFC and implemented. labels Jun 6, 2018
@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(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 Jun 6, 2018
@SimonSapin
Copy link
Contributor Author

Let’s get libs and lang team sign off for libcore types:

@rfcbot fcp merge

Are there more types that belong on this list?

@rfcbot
Copy link

rfcbot commented Jun 6, 2018

Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Jun 6, 2018
@eddyb
Copy link
Member

eddyb commented Jun 6, 2018

cc @RalfJung @rkruppe

@willmo
Copy link
Contributor

willmo commented Jun 7, 2018

Adding it to the atomic types would be very helpful, since it would allow them to be used in #[repr(C)] structs without an improper_ctypes warning.

@eddyb
Copy link
Member

eddyb commented Jun 7, 2018

Do we guarantee the size of atomic sizes, btw?

@SimonSapin
Copy link
Contributor Author

@willmo Good point, added.

@eddyb The current implementation has the size of each atomic type be what the name suggests, and makes some of them not available depending on the Target::max_atomic_width

@fitzgen
Copy link
Member

fitzgen commented Jun 7, 2018

IIRC, C++ will use mutexes and/or wider integers to simulate support when the target doesn't support the atomic's width. Are we sure that we don't intend to ever do that as well? Because giving guarantees about the size of an atomic would make that impossible, unless I am missing something.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:42:43]    Compiling rustc_asan v0.0.0 (file:///checkout/src/librustc_asan)
[00:42:43]    Compiling rustc_lsan v0.0.0 (file:///checkout/src/librustc_lsan)
[00:42:44]    Compiling rustc_tsan v0.0.0 (file:///checkout/src/librustc_tsan)
[00:42:44]    Compiling rustc_msan v0.0.0 (file:///checkout/src/librustc_msan)
[00:43:19] error: this feature has been stable since 1.28.0. Attribute no longer needed
[00:43:19]     |
[00:43:19]     |
[00:43:19] 104 | #![feature(repr_transparent)]
[00:43:19]     |
[00:43:19]     = note: `-D stable-features` implied by `-D warnings`
[00:43:19] 
[00:43:21] error: aborting due to previous error
[00:43:21] error: aborting due to previous error
[00:43:21] 
[00:43:21] error: Could not compile `core`.
[00:43:21] 
[00:43:21] Caused by:
[00:43:21]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name core libcore/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=e3f2b558276b578b -C extra-filename=-e3f2b558276b578b --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps` (exit code: 101)
[00:43:21] warning: build failed, waiting for other jobs to finish...
[00:43:49] error: build failed
[00:43:49] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:43:49] expected success, got: exit code: 101
[00:43:49] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:43:49] travis_fold:end:stage1-std

[00:43:49] travis_time:end:stage1-std:start=1528388177147867332,finish=1528388254729928162,duration=77582060830


[00:43:49] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:43:49] Build completed unsuccessfully in 0:17:13
[00:43:49] Makefile:28: recipe for target 'all' failed
[00:43:49] make: *** [all] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0fabf665
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@@ -124,6 +124,7 @@ pub fn spin_loop_hint() {
/// [`bool`]: ../../../std/primitive.bool.html
#[cfg(target_has_atomic = "8")]
#[stable(feature = "rust1", since = "1.0.0")]
#[repr(transparent)]
pub struct AtomicBool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit iffy I think. Presumably you'd expect it to be FFI compatible with a bool, not a u8, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not have AtomicBool on platforms without u8 atomics? I could've sworn we were using usize before, which would've made the AtomicBool change a breaking one - assuming there is a platform where usize atomics exist but not byte ones.

Also, why is this not wrapping AtomicU8? Seems like the code would be safer/cleaner that way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type has a #[cfg(target_has_atomic = "8")]. It should start wrapping AtomicU8, but it existed way before that type did.

@sfackler
Copy link
Member

sfackler commented Jun 7, 2018

@fitzgen There is the fallback of a single static mutex that isn't stored in the type, though that obviously has its own downsides! We've historically felt that we didn't want to do the mutex fallback, and instead have people opt into that via some library that wrapped the atomic types.

It has been a while so it would be good to make sure everyone's on board with that approach though.

@glandium
Copy link
Contributor

glandium commented Jun 7, 2018

In C++ std::atomic<bool> is not necessarily the size of a bool.

@eddyb
Copy link
Member

eddyb commented Jun 7, 2018

@sfackler What if we did the "mutex" thing but through a one-byte spinning "rw-lock" with no OS handoff for sleeping? It would work for bare-metal usecases just as well, assuming the types it's used with are small enough to not melt one core while another operates on the data.

@glandium
Copy link
Contributor

glandium commented Jun 7, 2018

@eddyb that wouldn't be "transparent".

@joshtriplett
Copy link
Member

I would argue that the atomic types should have the appropriate native size, and not exist if that type can't be atomic on the target platform. If we want a type based on a mutex, that should use a different structure that can embed some form of synchronization.

@SimonSapin
Copy link
Contributor Author

Alright, since atomic types being repr(transparent) is contentious I’ve removed that change from the PR. If someone still finds it valuable it can be proposed again separately.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:21:20]    Compiling alloc v0.0.0 (file:///checkout/src/liballoc)
[00:21:20]    Compiling std_unicode v0.0.0 (file:///checkout/src/libstd_unicode)
[00:21:21]    Compiling alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:21:21]    Compiling panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:21:25] error: this feature has been stable since 1.28.0. Attribute no longer needed
[00:21:25]     |
[00:21:25]     |
[00:21:25] 107 | #![feature(repr_transparent)]
[00:21:25]     |
[00:21:25]     = note: `-D stable-features` implied by `-D warnings`
[00:21:25] 
[00:21:25] error: aborting due to previous error
[00:21:25] error: aborting due to previous error
[00:21:25] 
[00:21:25] error: Could not compile `alloc`.
[00:21:25] 
[00:21:25] Caused by:
[00:21:25]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name alloc liballoc/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=629be8a8a92e38ff -C extra-filename=-629be8a8a92e38ff --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-e3f2b558276b578b.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-d5d59b383a13b958.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-57f7f72e03e89590/out` (exit code: 101)
[00:21:25] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:21:25] travis_fold:end:stage1-std


[00:21:25] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:21:25] travis_time:end:stage1-std:start=1528440401168445405,finish=1528440465637308376,duration=64468862971

[00:21:25] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:21:25] Build completed unsuccessfully in 0:16:52
[00:21:25] Build completed unsuccessfully in 0:16:52
[00:21:25] make: *** [all] Error 1
[00:21:25] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0ee12d25
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rfcbot
Copy link

rfcbot commented Jun 27, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Jun 27, 2018
@SimonSapin
Copy link
Contributor Author

@bors r+

@bors
Copy link
Contributor

bors commented Jul 3, 2018

📌 Commit 530d7bc has been approved by SimonSapin

@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-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Jul 3, 2018
@bors
Copy link
Contributor

bors commented Jul 3, 2018

⌛ Testing commit 530d7bc with merge c4a8bac...

bors added a commit that referenced this pull request Jul 3, 2018
Add #[repr(transparent)] to some libcore types

* `UnsafeCell`
* `Cell`
* `NonZero*`
* `NonNull`
* `Unique`

CC #43036
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-apple-alt of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:03:29]       Memory: 8 GB
[00:03:29]       Boot ROM Version: VMW71.00V.0.B64.1704110547
[00:03:29]       Apple ROM Info: [MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]Welcome to the Virtual Machine
[00:03:29]       SMC Version (system): 2.8f0
[00:03:29]       Serial Number (system): VM/1XdG2YgCq
[00:03:29] 
[00:03:29] hw.ncpu: 4
[00:03:29] hw.byteorder: 1234
[00:03:29] hw.memsize: 8589934592
---
[00:03:52] warning:                                                ^
[00:03:52] warning: 3 warnings generated.
[00:03:52] warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/build/profiler_builtins-0997d9f1ee263c05/out/libprofiler-rt.a(InstrProfilingPlatformLinux.o) has no symbols
[00:03:52] warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/build/profiler_builtins-0997d9f1ee263c05/out/libprofiler-rt.a(InstrProfilingPlatformOther.o) has no symbols
[00:04:01] warning: this feature has been stable since 1.28.0. Attribute no longer needed
[00:04:01]     |
[00:04:01]     |
[00:04:01] 125 | #![cfg_attr(stage0, feature(repr_transparent))]
[00:04:01]     |
[00:04:01]     |
[00:04:01]     = note: #[warn(stable_features)] on by default
[00:04:08] [RUSTC-TIMING] core test:false 35.348
[00:04:10] [RUSTC-TIMING] compiler_builtins test:false 2.255
[00:04:10]    Compiling libc v0.0.0 (file:///Users/travis/build/rust-lang/rust/src/rustc/libc_shim)
[00:04:10]    Compiling alloc v0.0.0 (file:///Users/travis/build/rust-lang/rust/src/liballoc)
---
[00:56:21]    |
[00:56:21] 22 | struct Range {
[00:56:21]    | - `range_map::Range` declared as private
[00:56:21] ...
[00:56:21] 63 |     ) -> impl Iterator<Item = (&'a Range, &'a T)> + 'a {
[00:56:21]    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
[00:56:21] error: aborting due to previous error
[00:56:21] 
[00:56:21] For more information about this error, try `rustc --explain E0446`.
[00:56:21] [RUSTC-TIMING] miri test:false 2.590
---
uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rust-std-nightly-x86_64-apple-darwin.tar.xz" with {:content_type=>"application/x-xz", :acl=>"public-read"}uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rust-std-nightly-x86_64-apple-darwin.tar.gz" with {:content_type=>"application/gzip", :acl=>"public-read"}
uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rustc-nightly-x86_64-apple-darwin.tar.gz" with {:content_type=>"application/gzip", :acl=>"public-read"}
uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rustc-nightly-x86_64-apple-darwin.tar.xz" with {:content_type=>"application/x-xz", :acl=>"public-read"}
uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rust-src-nightly.tar.xz" with {:content_type=>"application/x-xz", :acl=>"public-read"}
/Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:906:in `rescue in block in connect': Failed to open TCP connection to rust-lang-ci2.s3.us-west-1.amazonaws.com:443 (Network is unreachable - connect(2) for "rust-lang-ci2.s3.us-west-1.amazonaws.com" port 443) (Errno::ENETUNREACH)
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:903:in `block in connect'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/timeout.rb:103:in `timeout'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:902:in `connect'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:887:in `do_start'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:882:in `start'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/delegate.rb:83:in `method_missing'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/connection_pool.rb:285:in `start_session'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/connection_pool.rb:92:in `session_for'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/handler.rb:119:in `session'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/handler.rb:71:in `transmit'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/handler.rb:45:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/plugins/content_length.rb:12:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_request_signer.rb:88:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_request_signer.rb:23:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_host_id.rb:14:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/xml/error_handler.rb:8:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:10:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_request_signer.rb:65:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_redirects.rb:15:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/retry_errors.rb:89:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_dualstack.rb:32:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_accelerate.rb:49:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_md5s.rb:31:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb:21:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_bucket_name_restrictions.rb:12:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_bucket_dns.rb:31:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/rest/handler.rb:7:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/plugins/endpoint.rb:41:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/param_validator.rb:21:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:19:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_dualstack.rb:24:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_accelerate.rb:34:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/plugins/response_target.rb:21:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/request.rb:70:in `send_request'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-resources-2.11.80/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:52:in `initiate_upload'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-resources-2.11.80/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:43:in `upload'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-resources-2.11.80/lib/aws-sdk-resources/services/s3/file_uploader.rb:32:in `upload'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-resources-2.11.80/lib/aws-sdk-resources/services/s3/object.rb:252:in `upload_file'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/dpl-s3-1.9.7/lib/dpl/provider/s3.rb:99:in `block (2 levels) in upload_multithreaded'
failed to deploy
failed to deploy
No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Jul 3, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 3, 2018
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-apple-alt of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:03:29]       Memory: 8 GB
[00:03:29]       Boot ROM Version: VMW71.00V.0.B64.1704110547
[00:03:29]       Apple ROM Info: [MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]Welcome to the Virtual Machine
[00:03:29]       SMC Version (system): 2.8f0
[00:03:29]       Serial Number (system): VM/1XdG2YgCq
[00:03:29] 
[00:03:29] hw.ncpu: 4
[00:03:29] hw.byteorder: 1234
[00:03:29] hw.memsize: 8589934592
---
uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rust-std-nightly-x86_64-apple-darwin.tar.xz" with {:content_type=>"application/x-xz", :acl=>"public-read"}uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rust-std-nightly-x86_64-apple-darwin.tar.gz" with {:content_type=>"application/gzip", :acl=>"public-read"}
uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rustc-nightly-x86_64-apple-darwin.tar.gz" with {:content_type=>"application/gzip", :acl=>"public-read"}
uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rustc-nightly-x86_64-apple-darwin.tar.xz" with {:content_type=>"application/x-xz", :acl=>"public-read"}
uploading "c4a8bac476931e67f8bcf6199e7987d899fc3934/rust-src-nightly.tar.xz" with {:content_type=>"application/x-xz", :acl=>"public-read"}
/Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:906:in `rescue in block in connect': Failed to open TCP connection to rust-lang-ci2.s3.us-west-1.amazonaws.com:443 (Network is unreachable - connect(2) for "rust-lang-ci2.s3.us-west-1.amazonaws.com" port 443) (Errno::ENETUNREACH)
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:903:in `block in connect'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/timeout.rb:103:in `timeout'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:902:in `connect'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:887:in `do_start'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/net/http.rb:882:in `start'
 from /Users/travis/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/delegate.rb:83:in `method_missing'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/connection_pool.rb:285:in `start_session'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/connection_pool.rb:92:in `session_for'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/handler.rb:119:in `session'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/handler.rb:71:in `transmit'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/net_http/handler.rb:45:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/plugins/content_length.rb:12:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_request_signer.rb:88:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_request_signer.rb:23:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_host_id.rb:14:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/xml/error_handler.rb:8:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:10:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_request_signer.rb:65:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_redirects.rb:15:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/retry_errors.rb:89:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_dualstack.rb:32:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_accelerate.rb:49:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_md5s.rb:31:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb:21:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_bucket_name_restrictions.rb:12:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_bucket_dns.rb:31:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/rest/handler.rb:7:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/plugins/endpoint.rb:41:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/param_validator.rb:21:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:19:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_dualstack.rb:24:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/s3_accelerate.rb:34:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/plugins/response_target.rb:21:in `call'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/request.rb:70:in `send_request'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-core-2.11.80/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-resources-2.11.80/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:52:in `initiate_upload'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-resources-2.11.80/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:43:in `upload'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-resources-2.11.80/lib/aws-sdk-resources/services/s3/file_uploader.rb:32:in `upload'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/aws-sdk-resources-2.11.80/lib/aws-sdk-resources/services/s3/object.rb:252:in `upload_file'
 from /Users/travis/.rvm/gems/ruby-2.4.2/gems/dpl-s3-1.9.7/lib/dpl/provider/s3.rb:99:in `block (2 levels) in upload_multithreaded'
failed to deploy
failed to deploy
No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@SimonSapin
Copy link
Contributor Author

Failed to open TCP connection to rust-lang-ci2.s3.us-west-1.amazonaws.com:443 (Network is unreachable - connect(2) for "rust-lang-ci2.s3.us-west-1.amazonaws.com" port 443) (Errno::ENETUNREACH)

Flaky network?

@bors retry

@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 Jul 4, 2018
@bors
Copy link
Contributor

bors commented Jul 4, 2018

⌛ Testing commit 530d7bc with merge 0ad8f9e...

bors added a commit that referenced this pull request Jul 4, 2018
Add #[repr(transparent)] to some libcore types

* `UnsafeCell`
* `Cell`
* `NonZero*`
* `NonNull`
* `Unique`

CC #43036
@bors
Copy link
Contributor

bors commented Jul 4, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: SimonSapin
Pushing 0ad8f9e to master...

@bors bors merged commit 530d7bc into rust-lang:master Jul 4, 2018
@SimonSapin SimonSapin deleted the repr-transparent branch July 4, 2018 18:16
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Jul 7, 2018
@willmo
Copy link
Contributor

willmo commented Jul 8, 2018

@SimonSapin re: #[repr(transparent)] on atomics:

Feel free to open another PR that can be debated without blocking the stabilization of the attribute itself.

Done: #52149 :-)

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jul 10, 2018
Add #[repr(transparent)] to Atomic* types

This allows them to be used in `#[repr(C)]` structs without warnings. Since rust-lang/rfcs#1649 and rust-lang#35603 they are already documented to have "the same in-memory representation as" their corresponding primitive types. This just makes that explicit.

This was briefly part of rust-lang#51395, but was controversial and therefore dropped. But it turns out that it's essentially already documented (which I had forgotten).
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 10, 2018
Add #[repr(transparent)] to Atomic* types

This allows them to be used in `#[repr(C)]` structs without warnings. Since rust-lang/rfcs#1649 and rust-lang#35603 they are already documented to have "the same in-memory representation as" their corresponding primitive types. This just makes that explicit.

This was briefly part of rust-lang#51395, but was controversial and therefore dropped. But it turns out that it's essentially already documented (which I had forgotten).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: #[attributes(..)] B-RFC-implemented Blocker: Approved by a merged RFC and implemented. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet