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 a few trait impls for AccessError #61491

Merged
merged 2 commits into from Aug 5, 2019

Conversation

@stjepang
Copy link
Contributor

commented Jun 3, 2019

No description provided.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 3, 2019

r? @steveklabnik

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

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 3, 2019

⚠️ Warning ⚠️

  • These commits modify submodules.
@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Jun 3, 2019

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:0051b622:start=1559577912057949456,finish=1559577912879654199,duration=821704743
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:02:05] extracting /checkout/obj/build/cache/2019-05-23/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:02:05] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:02:05] 
[00:02:05] Caused by:
[00:02:05]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:02:05] Build completed unsuccessfully in 0:00:23
[00:02:05] make: *** [prepare] Error 1
[00:02:05] Makefile:69: recipe for target 'prepare' failed
[00:02:06] Command failed. Attempt 2/5:
[00:02:06] Command failed. Attempt 2/5:
[00:02:07] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:02:07] 
[00:02:07] Caused by:
[00:02:07]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:02:07] Build completed unsuccessfully in 0:00:00
[00:02:07] make: *** [prepare] Error 1
[00:02:07] Makefile:69: recipe for target 'prepare' failed
[00:02:09] Command failed. Attempt 3/5:
[00:02:09] Command failed. Attempt 3/5:
[00:02:09] error: failed to resolve patches for `https://github.com/rust-lang/cargo`
[00:02:09] 
[00:02:09] Caused by:
[00:02:09]   patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:02:09] Build completed unsuccessfully in 0:00:00
[00:02:09] make: *** [prepare] Error 1
[00:02:09] Makefile:69: recipe for target 'prepare' failed
[00:02:12] Command failed. Attempt 4/5:
[00:02:12] Command failed. Attempt 4/5:
[00:02:12] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:02:12] 
[00:02:12] Caused by:
[00:02:12]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:02:12] Build completed unsuccessfully in 0:00:00
[00:02:12] Makefile:69: recipe for target 'prepare' failed
[00:02:12] make: *** [prepare] Error 1
[00:02:16] Command failed. Attempt 5/5:
[00:02:16] Command failed. Attempt 5/5:
[00:02:16] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:02:16] 
[00:02:16] Caused by:
[00:02:16]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:02:16] Build completed unsuccessfully in 0:00:00
[00:02:16] make: *** [prepare] Error 1
[00:02:16] Makefile:69: recipe for target 'prepare' failed
[00:02:16] The command has failed after 5 attempts.

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)

@stjepang stjepang force-pushed the stjepang:impls-for-accesserror branch from 933508c to 007ce0f Jun 3, 2019

@stjepang

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

There were some accidental submodule updates, but now they seem to be removed. Sorry for the noise!

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2019

☔️ The latest upstream changes (presumably #60341) made this pull request unmergeable. Please resolve the merge conflicts.

@stjepang stjepang force-pushed the stjepang:impls-for-accesserror branch from 007ce0f to 740ab70 Jun 20, 2019

@stjepang stjepang force-pushed the stjepang:impls-for-accesserror branch from 740ab70 to d6c3196 Jun 20, 2019

@@ -207,6 +209,8 @@ impl fmt::Display for AccessError {
}
}

impl Error for AccessError {}

This comment has been minimized.

Copy link
@Mark-Simulacrum

Mark-Simulacrum Jul 9, 2019

Member

We'll probably want a #[stable... attribute on this even though it does nothing today :)

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

commented Jul 9, 2019

@dtolnay

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

@rust-lang/libs -- this PR adds impls of Clone, Copy, Eq, PartialEq, and Error for std::thread::AccessError, which is the error returned by the try_with method on thread locals. See Utf8Error, CharTryFromError, TryFromIntError, fmt::Error, RecvTimeoutError, RecvError, TryRecvError as examples of existing error types having all of these impls.

  impl<T: 'static> LocalKey<T> {
      pub fn try_with<F, R>(&'static self, f: F) -> Result<R, AccessError>
      where
          F: FnOnce(&T) -> R;
  }

  pub struct AccessError { _private: () }

+ impl Clone for AccessError {...}
+ impl Copy for AccessError {...}
+ impl Eq for AccessError {...}
+ impl PartialEq for AccessError {...}
+ impl std::error::Error for AccessError {...}

@rfcbot fcp merge

@rfcbot

This comment has been minimized.

Copy link

commented Jul 12, 2019

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

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), 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

This comment has been minimized.

Copy link

commented Jul 24, 2019

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

@rfcbot

This comment has been minimized.

Copy link

commented Aug 3, 2019

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Aug 5, 2019

@bors: r=dtolnay

@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

📌 Commit d2c9c12 has been approved by dtolnay

@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

⌛️ Testing commit d2c9c12 with merge f6ecdc2...

bors added a commit that referenced this pull request Aug 5, 2019

Auto merge of #61491 - stjepang:impls-for-accesserror, r=dtolnay
Add a few trait impls for AccessError
@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

☀️ Test successful - checks-azure
Approved by: dtolnay
Pushing f6ecdc2 to master...

@bors bors added the merged-by-bors label Aug 5, 2019

@bors bors merged commit d2c9c12 into rust-lang:master Aug 5, 2019

5 checks passed

homu Test successful
Details
pr Build #20190804.19 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details

@stjepang stjepang deleted the stjepang:impls-for-accesserror branch Aug 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.