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

impl Add<char> and AddAssign<char> for String #66490

Conversation

Ruster-a11y
Copy link

This is the new working code for the functionalities mentioned in the title. This also means the previous pull request ( #66215) can now be relegated to just as the implementation for AddAssign<char> for Cow<'_, str>.

This makes the following operations possible:

  • String = String + char
  • String += char

These further code modifications were needed due to the already open issue #51916. Since that issue is beyond the scope for this PR and feature-set, this commit only attempts at getting around that issue by further adding implementations for:

  • impl Add<&&str> for String
  • impl Add<&String> for String
  • impl Add<&&String> for String
  • impl AddAssign<&String> for String

Without these impl additions, the rust compiler complains about lacking the respective implementations for String operations since impl Add<char> for String adds a layer of ambiguity for the compiler.
@LukasKalbertodt, thanks for your suggestions! (#66215 (comment))

Note:

Build only tested on latest Windows 10. Would be kind if someone would test it on Linux as well.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dtolnay (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 17, 2019
@jonas-schievink jonas-schievink added relnotes Marks issues that should be documented in the release notes of the next release. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Nov 17, 2019
@jonas-schievink jonas-schievink added this to the 1.41 milestone Nov 17, 2019
Copy link
Member

@LukasKalbertodt LukasKalbertodt left a comment

Choose a reason for hiding this comment

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

Would be kind if someone would test it on Linux as well.

That will be done automatically by CI. If you rebase your PR and solve the conflict in parser/expr.rs (and force push), CI will run.

I commented a few things, but please note that I am not in the Rust team and some of these comments might be wrong :P

// FIXME: Should just be `&symbol.as_str()` but can't as of now due to
// Deref coercion.
// Issue: https://github.com/rust-lang/rust/issues/51916
let s = String::from("0.") + &symbol.as_str().get_str();
Copy link
Member

Choose a reason for hiding this comment

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

You can write &*symbol.as_str() to explicitly deref if I'm not mistaken. Then you don't need the get_str method. And in that case, I would probably also remove the FIXME comment.

Copy link
Author

Choose a reason for hiding this comment

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

Alright, this worked!

///
/// FIXME: This has no meaning anymore since the addition of `impl Add<char> for String`.
/// Due to the outstanding Deref coercion issue this Deref implementation gets ignored.
/// Issue: https://github.com/rust-lang/rust/issues/51916
Copy link
Member

Choose a reason for hiding this comment

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

I assume the Deref impl is still used for plenty of other stuff. The only thing that changed is that it's not automatically used anymore when using Add or AddAssign. I would just remove this comment, I think.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

Comment on lines 1997 to 2033
/// Implements the `+` operator for concatenating two `String`s.
///
/// This consumes the `String` on the left-hand side and re-uses its buffer (growing it if
/// necessary). This is done to avoid allocating a new `String` and copying the entire contents on
/// every operation, which would lead to `O(n^2)` running time when building an `n`-byte string by
/// repeated concatenation.
///
/// The string on the right-hand side is only borrowed; its contents are copied into the returned
/// `String`.
///
/// # Examples
///
/// Concatenating two `String`s takes the first by value and borrows the second:
///
/// ```
/// let a = String::from("hello");
/// let b = String::from(" world");
/// let c = a + &b;
/// // `a` is moved and can no longer be used here.
/// ```
///
/// If you want to keep using the first `String`, you can clone it and append to the clone instead:
///
/// ```
/// let a = String::from("hello");
/// let b = String::from(" world");
/// let c = a.clone() + &b;
/// // `a` is still valid here.
/// ```
///
/// Concatenating `&str` slices can be done by converting the first to a `String`:
///
/// ```
/// let a = "hello";
/// let b = " world";
/// let c = a.to_string() + b;
/// ```
Copy link
Member

Choose a reason for hiding this comment

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

This whole comment is just a copy from the Add<&str> impl, right? I would probably:

  • Add the information about the "problem" we are facing to the old comment for Add<&str>, i.e.: explain that we also had to add strange impls like Add<&String> in order to avoid breakage.
  • Then add a short comment to all "strange" impls (Add<&String>, Add<&&String>) referring to the main documentation on Add<&str>.

That way we don't have to have duplicated comments/documentation.

Copy link
Author

Choose a reason for hiding this comment

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

Okay, I've added a new commit fixing the comments. Please see if what I've revised them with makes sense.

/// Implements the `+=` operator for appending to a `String`.
///
/// This has the same behavior as the [`push_str`][String::push_str] method.
#[stable(feature = "stringaddassign_string", since = "1.41.0")]
Copy link
Member

Choose a reason for hiding this comment

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

I guess it would be fine to use the feature name extra_string_add_impls or something like that everywhere. If we wanna keep the names you chose, I'd think that they should be proper snake case: string_add_assign_string.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, please check the new commit.

@Ruster-a11y
Copy link
Author

@LukasKalbertodt I don't truly understand the cause for this. What specific git commands should I use to fix it?

image

@LukasKalbertodt
Copy link
Member

This just means that on the master branch of the main repo, there is also some change to parser/expr.rs that conflicts with your change. So you have to figure out how to combine both changes manually. This might not be the best way, but that's how I usually do it:

I assume your upstream remote points to this repository, i.e.:

$ git remote -v
origin  git@github.com:Ruster-a11y/rust.git (fetch)
origin  git@github.com:Ruster-a11y/rust.git (push)
upstream    https://github.com/rust-lang/rust.git (fetch)
upstream    https://github.com/rust-lang/rust.git (push)

Then you should be able to:

$ git fetch upstream
$ git branch backup  # I am still always scared of rebases
$ git rebase upstream/master
$ git push -f

Funnily, git can actually merge everything correctly it seems.

@Ruster-a11y Ruster-a11y force-pushed the impl-char-add-operation-for-String branch from ec2b1c6 to c5e19ca Compare November 17, 2019 22:55
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-17T22:56:22.4551933Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-17T22:56:22.4743978Z ##[command]git config gc.auto 0
2019-11-17T22:56:22.4820251Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-17T22:56:22.4866956Z ##[command]git config --get-all http.proxy
2019-11-17T22:56:22.5022728Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66490/merge:refs/remotes/pull/66490/merge
---
2019-11-17T22:59:36.6157646Z extracting /checkout/obj/build/cache/2019-11-06/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
2019-11-17T22:59:36.6765097Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:36.6765280Z 
2019-11-17T22:59:36.6765335Z Caused by:
2019-11-17T22:59:36.6766381Z   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
2019-11-17T22:59:36.6776599Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-17T22:59:36.6823626Z Makefile:67: recipe for target 'prepare' failed
2019-11-17T22:59:36.6823732Z make: *** [prepare] Error 1
2019-11-17T22:59:37.6843329Z Command failed. Attempt 2/5:
2019-11-17T22:59:37.7820463Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:37.7820463Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:37.7821128Z 
2019-11-17T22:59:37.7821357Z Caused by:
2019-11-17T22:59:37.7822001Z   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
2019-11-17T22:59:37.7832334Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-17T22:59:37.7871376Z Makefile:67: recipe for target 'prepare' failed
2019-11-17T22:59:37.7871898Z make: *** [prepare] Error 1
2019-11-17T22:59:39.7889792Z Command failed. Attempt 3/5:
2019-11-17T22:59:39.8945163Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:39.8945163Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:39.8945873Z 
2019-11-17T22:59:39.8946380Z Caused by:
2019-11-17T22:59:39.8947467Z   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
2019-11-17T22:59:39.8964575Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-17T22:59:39.9004034Z Makefile:67: recipe for target 'prepare' failed
2019-11-17T22:59:39.9004440Z make: *** [prepare] Error 1
2019-11-17T22:59:42.9027935Z Command failed. Attempt 4/5:
2019-11-17T22:59:43.0002444Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:43.0002444Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:43.0003614Z 
2019-11-17T22:59:43.0003829Z Caused by:
2019-11-17T22:59:43.0004523Z   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
2019-11-17T22:59:43.0008276Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-17T22:59:43.0045353Z Makefile:67: recipe for target 'prepare' failed
2019-11-17T22:59:43.0049592Z make: *** [prepare] Error 1
2019-11-17T22:59:47.0063807Z Command failed. Attempt 5/5:
2019-11-17T22:59:47.1029958Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:47.1029958Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-17T22:59:47.1030854Z 
2019-11-17T22:59:47.1031216Z Caused by:
2019-11-17T22:59:47.1031852Z   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
2019-11-17T22:59:47.1038223Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-17T22:59:47.1078706Z Makefile:67: recipe for target 'prepare' failed
2019-11-17T22:59:47.1082367Z make: *** [prepare] Error 1
2019-11-17T22:59:47.1090783Z The command has failed after 5 attempts.
2019-11-17T22:59:47.1091741Z == clock drift check ==
2019-11-17T22:59:47.1091741Z == clock drift check ==
2019-11-17T22:59:47.1099357Z   local time: Sun Nov 17 22:59:47 UTC 2019
2019-11-17T22:59:47.1926507Z   network time: Sun, 17 Nov 2019 22:59:47 GMT
2019-11-17T22:59:47.1929219Z == end clock drift check ==
2019-11-17T22:59:59.4893050Z 
2019-11-17T22:59:59.4983915Z ##[error]Bash exited with code '1'.
2019-11-17T22:59:59.5010411Z ##[section]Starting: Checkout
2019-11-17T22:59:59.5012115Z ==============================================================================
2019-11-17T22:59:59.5012212Z Task         : Get sources
2019-11-17T22:59:59.5012258Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@Ruster-a11y Ruster-a11y force-pushed the impl-char-add-operation-for-String branch from c5e19ca to ec2b1c6 Compare November 17, 2019 23:03
This file was moved to a different directory so this isn't needed anymore.
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-17T23:20:40.9234271Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-17T23:20:40.9428763Z ##[command]git config gc.auto 0
2019-11-17T23:20:40.9524278Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-17T23:20:40.9570018Z ##[command]git config --get-all http.proxy
2019-11-17T23:20:40.9739920Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66490/merge:refs/remotes/pull/66490/merge
---
2019-11-17T23:31:55.1392887Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2019-11-17T23:31:55.9835104Z error[E0277]: cannot add `&syntax_pos::symbol::SymbolStr` to `std::string::String`
2019-11-17T23:31:55.9835494Z     --> src/librustc_parse/parser/expr.rs:1113:52
2019-11-17T23:31:55.9835782Z      |
2019-11-17T23:31:55.9836100Z 1113 |                         let s = String::from("0.") + &symbol.as_str();
2019-11-17T23:31:55.9836557Z      |                                                    ^ no implementation for `std::string::String + &syntax_pos::symbol::SymbolStr`
2019-11-17T23:31:55.9836792Z      |
2019-11-17T23:31:55.9837141Z      = help: the trait `std::ops::Add<&syntax_pos::symbol::SymbolStr>` is not implemented for `std::string::String`
2019-11-17T23:31:55.9958292Z error[E0277]: the size for values of type `str` cannot be known at compilation time
2019-11-17T23:31:55.9958684Z     --> src/librustc_parse/parser/expr.rs:1114:80
2019-11-17T23:31:55.9958991Z      |
2019-11-17T23:31:55.9958991Z      |
2019-11-17T23:31:55.9959359Z 1114 |                         let kind = TokenKind::lit(token::Float, Symbol::intern(&s), suffix);
2019-11-17T23:31:55.9959840Z      |                                                                                ^^ doesn't have a size known at compile-time
2019-11-17T23:31:55.9962458Z      = help: the trait `std::marker::Sized` is not implemented for `str`
2019-11-17T23:31:55.9962879Z      = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2019-11-17T23:31:55.9963214Z      = note: all local variables must have a statically known size
2019-11-17T23:31:55.9963560Z      = help: unsized locals are gated as an unstable feature
---
2019-11-17T23:37:51.0961096Z   local time: Sun Nov 17 23:37:51 UTC 2019
2019-11-17T23:37:51.3787794Z   network time: Sun, 17 Nov 2019 23:37:51 GMT
2019-11-17T23:37:51.3788003Z == end clock drift check ==
2019-11-17T23:37:54.2486192Z 
2019-11-17T23:37:54.2600657Z ##[error]Bash exited with code '1'.
2019-11-17T23:37:54.2631097Z ##[section]Starting: Checkout
2019-11-17T23:37:54.2632931Z ==============================================================================
2019-11-17T23:37:54.2632996Z Task         : Get sources
2019-11-17T23:37:54.2633069Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-18T00:22:06.0893739Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-18T00:22:06.1109470Z ##[command]git config gc.auto 0
2019-11-18T00:22:06.1205465Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-18T00:22:06.1250572Z ##[command]git config --get-all http.proxy
2019-11-18T00:22:06.1394103Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66490/merge:refs/remotes/pull/66490/merge
---
2019-11-18T00:25:18.3647812Z extracting /checkout/obj/build/cache/2019-11-06/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
2019-11-18T00:25:18.4315056Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:18.4315255Z 
2019-11-18T00:25:18.4315298Z Caused by:
2019-11-18T00:25:18.4315651Z   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
2019-11-18T00:25:18.4328481Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T00:25:18.4382187Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T00:25:18.4382317Z make: *** [prepare] Error 1
2019-11-18T00:25:19.4406392Z Command failed. Attempt 2/5:
2019-11-18T00:25:19.5399071Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:19.5399071Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:19.5399178Z 
2019-11-18T00:25:19.5399233Z Caused by:
2019-11-18T00:25:19.5399725Z   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
2019-11-18T00:25:19.5408380Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T00:25:19.5452588Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T00:25:19.5452690Z make: *** [prepare] Error 1
2019-11-18T00:25:21.5472298Z Command failed. Attempt 3/5:
2019-11-18T00:25:21.6488350Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:21.6488350Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:21.6489443Z 
2019-11-18T00:25:21.6489694Z Caused by:
2019-11-18T00:25:21.6490704Z   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
2019-11-18T00:25:21.6495970Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T00:25:21.6543937Z make: *** [prepare] Error 1
2019-11-18T00:25:21.6544537Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T00:25:25.0712771Z Command failed. Attempt 4/5:
2019-11-18T00:25:25.0714607Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:25.0714607Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:25.0714808Z 
2019-11-18T00:25:25.0714977Z Caused by:
2019-11-18T00:25:25.0715890Z   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
2019-11-18T00:25:25.0716382Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T00:25:25.0716685Z make: *** [prepare] Error 1
2019-11-18T00:25:25.0717020Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T00:25:28.7674699Z Command failed. Attempt 5/5:
2019-11-18T00:25:28.8770819Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:28.8770819Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T00:25:28.8772140Z 
2019-11-18T00:25:28.8772604Z Caused by:
2019-11-18T00:25:28.8773392Z   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
2019-11-18T00:25:28.8780262Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T00:25:28.8817264Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T00:25:28.8821086Z make: *** [prepare] Error 1
2019-11-18T00:25:28.8829907Z The command has failed after 5 attempts.
2019-11-18T00:25:28.8844759Z == clock drift check ==
2019-11-18T00:25:28.8844759Z == clock drift check ==
2019-11-18T00:25:28.8845105Z   local time: Mon Nov 18 00:25:28 UTC 2019
2019-11-18T00:25:28.9689009Z   network time: Mon, 18 Nov 2019 00:25:28 GMT
2019-11-18T00:25:28.9689998Z == end clock drift check ==
2019-11-18T00:25:41.3243032Z 
2019-11-18T00:25:41.3350402Z ##[error]Bash exited with code '1'.
2019-11-18T00:25:41.3379415Z ##[section]Starting: Checkout
2019-11-18T00:25:41.3381177Z ==============================================================================
2019-11-18T00:25:41.3381233Z Task         : Get sources
2019-11-18T00:25:41.3381303Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@Ruster-a11y
Copy link
Author

@LukasKalbertodt I attempted to rebase my local git with the latest commit on master (0f0c640). somehow it's including various submodule changes even though I never made or staged those changes.

What do you suggest? A new PR?

@Ruster-a11y
Copy link
Author

Closing this and attempting with another PR to fix unforeseen rebase issues.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-18T01:44:50.8491971Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-18T01:44:51.8009703Z ##[command]git config gc.auto 0
2019-11-18T01:44:51.8016008Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-18T01:44:51.8021229Z ##[command]git config --get-all http.proxy
2019-11-18T01:44:51.8026583Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66490/merge:refs/remotes/pull/66490/merge
---
2019-11-18T01:48:16.5263683Z extracting /checkout/obj/build/cache/2019-11-06/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
2019-11-18T01:48:16.5946050Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:16.5946215Z 
2019-11-18T01:48:16.5946374Z Caused by:
2019-11-18T01:48:16.5946827Z   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
2019-11-18T01:48:16.5958314Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T01:48:16.6004769Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T01:48:16.6005120Z make: *** [prepare] Error 1
2019-11-18T01:48:17.6021490Z Command failed. Attempt 2/5:
2019-11-18T01:48:17.7145955Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:17.7145955Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:17.7146140Z 
2019-11-18T01:48:17.7146199Z Caused by:
2019-11-18T01:48:17.7146681Z   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
2019-11-18T01:48:17.7155886Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T01:48:17.7202928Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T01:48:17.7203019Z make: *** [prepare] Error 1
2019-11-18T01:48:19.7217631Z Command failed. Attempt 3/5:
2019-11-18T01:48:19.8334267Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:19.8334267Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:19.8334393Z 
2019-11-18T01:48:19.8334571Z Caused by:
2019-11-18T01:48:19.8335095Z   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
2019-11-18T01:48:19.8340881Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T01:48:19.8385215Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T01:48:19.8389626Z make: *** [prepare] Error 1
2019-11-18T01:48:22.8406198Z Command failed. Attempt 4/5:
2019-11-18T01:48:22.9500354Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:22.9500354Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:22.9500454Z 
2019-11-18T01:48:22.9500579Z Caused by:
2019-11-18T01:48:22.9501072Z   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
2019-11-18T01:48:22.9508520Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T01:48:22.9557421Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T01:48:22.9557587Z make: *** [prepare] Error 1
2019-11-18T01:48:26.9570849Z Command failed. Attempt 5/5:
2019-11-18T01:48:27.0688024Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:27.0688024Z error: failed to resolve patches for `https://github.com/rust-lang/cargo`
2019-11-18T01:48:27.0688130Z 
2019-11-18T01:48:27.0688181Z Caused by:
2019-11-18T01:48:27.0688678Z   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
2019-11-18T01:48:27.0695673Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-18T01:48:27.0746013Z Makefile:67: recipe for target 'prepare' failed
2019-11-18T01:48:27.0746092Z make: *** [prepare] Error 1
2019-11-18T01:48:27.0746206Z The command has failed after 5 attempts.
2019-11-18T01:48:27.0749360Z == clock drift check ==
2019-11-18T01:48:27.0749360Z == clock drift check ==
2019-11-18T01:48:27.0762471Z   local time: Mon Nov 18 01:48:27 UTC 2019
2019-11-18T01:48:27.3442067Z   network time: Mon, 18 Nov 2019 01:48:27 GMT
2019-11-18T01:48:27.3442192Z == end clock drift check ==
2019-11-18T01:48:37.8716252Z 
2019-11-18T01:48:37.8827949Z ##[error]Bash exited with code '1'.
2019-11-18T01:48:37.8853359Z ##[section]Starting: Checkout
2019-11-18T01:48:37.8855053Z ==============================================================================
2019-11-18T01:48:37.8855146Z Task         : Get sources
2019-11-18T01:48:37.8855186Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@Ruster-a11y Ruster-a11y deleted the impl-char-add-operation-for-String branch November 20, 2019 07:30
@Centril Centril removed this from the 1.41 milestone Dec 20, 2019
@Centril Centril removed the relnotes Marks issues that should be documented in the release notes of the next release. label Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

6 participants