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 Cow::is_borrowed and Cow::is_owned #65144

Merged
merged 1 commit into from
Oct 24, 2019
Merged

Conversation

clarfonthey
Copy link
Contributor

Implements #65143.

@rust-highfive
Copy link
Collaborator

r? @TimNN

(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 Oct 5, 2019
@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@hellow554
Copy link
Contributor

You can run the tests locally i.e. with ./x.py test --stage 1 so you don't have to wait for azure to report the errors to you

/// #![feature(cow_is_borrowed)]
/// use std::borrow::Cow;
///
/// let mut cow = Cow::Borrowed("moo");
Copy link
Contributor

Choose a reason for hiding this comment

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

let cow = Cow::Borrowed("moo");

/// let mut cow = Cow::Borrowed("moo");
/// assert!(cow.is_borrowed());
///
/// let mut bull: Cow<'_, str> = Cow::Owned("...moo?".to_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

let bull: Cow<str> = Cow::Owned("...moo?".to_string());

Comment on lines 248 to 251
match *self {
Borrowed(_) => false,
Owned(_) => true,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not: !self.is_borrowed()? (see is_some/is_none, is_ok/is_err)

/// #![feature(cow_is_borrowed)]
/// use std::borrow::Cow;
///
/// let mut cow: Cow<'_, str> = Cow::Owned("moo".to_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

let cow: Cow<str> = Cow::Owned("moo".to_string());

/// let mut cow: Cow<'_, str> = Cow::Owned("moo".to_string());
/// assert!(cow.is_owned());
///
/// let mut bull = Cow::Borrowed("...moo?".to_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

let bull = Cow::Borrowed("...moo?");

same as above, but if you want to use a String instead do:

let bull: Cow<str> = Cow::Borrowed("...moo?".to_string());

@clarfonthey
Copy link
Contributor Author

You can run the tests locally i.e. with ./x.py test --stage 1 so you don't have to wait for azure to report the errors to you

That would make too much sense

@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-10-08T23:07:15.7294305Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-08T23:07:15.7517100Z ##[command]git config gc.auto 0
2019-10-08T23:07:15.7613414Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-08T23:07:15.7698181Z ##[command]git config --get-all http.proxy
2019-10-08T23:07:15.7871469Z ##[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/65144/merge:refs/remotes/pull/65144/merge
---
2019-10-09T00:12:55.2357537Z .................................................................................................... 1600/9127
2019-10-09T00:13:03.5259004Z .................................................................................................... 1700/9127
2019-10-09T00:13:15.2887012Z ................i...............i................................................................... 1800/9127
2019-10-09T00:13:23.0083890Z .................................................................................................... 1900/9127
2019-10-09T00:13:40.8012726Z .......iiiii........................................................................................ 2000/9127
2019-10-09T00:13:51.3393278Z .................................................................................................... 2200/9127
2019-10-09T00:13:54.1764301Z .................................................................................................... 2300/9127
2019-10-09T00:14:00.3523370Z .................................................................................................... 2400/9127
2019-10-09T00:14:06.9472951Z .................................................................................................... 2500/9127
---
2019-10-09T00:17:12.7218680Z ................................................................................................i... 4700/9127
2019-10-09T00:17:20.5261005Z ............i....................................................................................... 4800/9127
2019-10-09T00:17:32.4309346Z .................................................................................................... 4900/9127
2019-10-09T00:17:38.4900630Z .................................................................................................... 5000/9127
2019-10-09T00:17:51.1908269Z ..........................................................................................ii.ii..... 5100/9127
2019-10-09T00:18:01.7158147Z .................................................................................................... 5300/9127
2019-10-09T00:18:12.0837575Z .................................................................................................... 5400/9127
2019-10-09T00:18:19.7187233Z ........................................................i........................................... 5500/9127
2019-10-09T00:18:27.3442446Z .................................................................................................... 5600/9127
2019-10-09T00:18:27.3442446Z .................................................................................................... 5600/9127
2019-10-09T00:18:36.0557354Z .................................................................................................... 5700/9127
2019-10-09T00:18:47.7983363Z .....................................................ii...i..ii...........i......................... 5800/9127
2019-10-09T00:19:15.2295243Z .................................................................................................... 6000/9127
2019-10-09T00:19:25.0252107Z .................................................................................................... 6100/9127
2019-10-09T00:19:25.0252107Z .................................................................................................... 6100/9127
2019-10-09T00:19:36.2929129Z ...........................................................i..ii.................................... 6200/9127
2019-10-09T00:20:05.6316099Z .................................................................................................... 6400/9127
2019-10-09T00:20:07.8936438Z ...................i................................................................................ 6500/9127
2019-10-09T00:20:10.2725729Z ............................................................................................i....... 6600/9127
2019-10-09T00:20:13.2472168Z .................................................................................................... 6700/9127
---
2019-10-09T00:25:06.8526980Z  finished in 5.816
2019-10-09T00:25:06.8730720Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-09T00:25:07.0419510Z 
2019-10-09T00:25:07.0419777Z running 150 tests
2019-10-09T00:25:10.5720998Z i....iii......iii..iiii....i.............................i..i..................i....i.........ii.i.i 100/150
2019-10-09T00:25:12.6907119Z ..iiii..............i.........iii.i.......ii......
2019-10-09T00:25:12.6907585Z 
2019-10-09T00:25:12.6911923Z  finished in 5.818
2019-10-09T00:25:12.7105780Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-09T00:25:12.8748287Z 
---
2019-10-09T00:25:15.0601803Z  finished in 2.349
2019-10-09T00:25:15.0785253Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-09T00:25:15.2406808Z 
2019-10-09T00:25:15.2407095Z running 9 tests
2019-10-09T00:25:15.2408061Z iiiiiiiii
2019-10-09T00:25:15.2408471Z 
2019-10-09T00:25:15.2414677Z  finished in 0.163
2019-10-09T00:25:15.2627352Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-09T00:25:15.4340768Z 
---
2019-10-09T00:25:34.6835357Z  finished in 19.420
2019-10-09T00:25:34.7060890Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-09T00:25:34.8684828Z 
2019-10-09T00:25:34.8685621Z running 123 tests
2019-10-09T00:26:01.6469646Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i...ii...i.......ii. 100/123
2019-10-09T00:26:06.7931908Z i.i.i......iii.i.....ii
2019-10-09T00:26:06.7933997Z 
2019-10-09T00:26:06.7938814Z  finished in 32.088
2019-10-09T00:26:06.7948794Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-09T00:26:06.7952277Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-10-09T00:40:17.7038180Z 
2019-10-09T00:40:17.7039215Z    Doc-tests core
2019-10-09T00:40:23.1798882Z 
2019-10-09T00:40:23.1804273Z running 2405 tests
2019-10-09T00:40:35.5166381Z ......iiiii......................................................................................... 100/2405
2019-10-09T00:40:47.4008865Z ...............................................................................ii................... 200/2405
2019-10-09T00:41:15.6235946Z .i.................................................................................................. 400/2405
2019-10-09T00:41:15.6235946Z .i.................................................................................................. 400/2405
2019-10-09T00:41:27.5185574Z ................................................i..i.................iiii........................... 500/2405
2019-10-09T00:41:50.0817484Z .................................................................................................... 700/2405
2019-10-09T00:42:01.5164029Z .................................................................................................... 800/2405
2019-10-09T00:42:13.2213287Z .................................................................................................... 900/2405
2019-10-09T00:42:24.9196319Z .................................................................................................... 1000/2405
---
2019-10-09T00:46:55.6665811Z ........................ 700/763
2019-10-09T00:46:55.6770539Z ...................................thread '<unnamed>' panicked at 'explicit panic', src/libstd/thread/mod.rs:1532:13
2019-10-09T00:46:56.2855003Z ............thread '<unnamed>' panicked at 'Box<Any>', src/libstd/thread/mod.rs:1664:13
2019-10-09T00:46:56.2865698Z thread '<unnamed>' panicked at 'owned string', src/libstd/thread/mod.rs:1650:13
2019-10-09T00:46:56.2866091Z thread '..<unnamed>' panicked at 'static string', src/libstd/thread/mod.rs:1636:13
2019-10-09T00:46:56.2872915Z .thread '<unnamed>' panicked at 'Box<Any>', src/libstd/thread/mod.rs:1682:13
2019-10-09T00:47:01.7851362Z test result: ok. 763 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
2019-10-09T00:47:01.7851574Z 
2019-10-09T00:47:01.7862426Z      Running build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/env-6be2a9172d78f818
2019-10-09T00:47:01.7896311Z 
---
2019-10-09T00:47:03.1819889Z 
2019-10-09T00:47:03.1841281Z running 992 tests
2019-10-09T00:47:27.6144855Z i................................................................................................... 100/992
2019-10-09T00:47:40.6161665Z .................................................................................................... 200/992
2019-10-09T00:47:49.8386845Z .................iii......i......i...i......i....................................................... 300/992
2019-10-09T00:47:56.2800979Z .................................................................................................... 400/992
2019-10-09T00:48:04.9845433Z ...................................i..i.................................ii.......................... 500/992
2019-10-09T00:48:21.8459125Z .................................................................................................... 700/992
2019-10-09T00:48:21.8459125Z .................................................................................................... 700/992
2019-10-09T00:48:31.1203314Z ..................iiii.............................................................................. 800/992
2019-10-09T00:48:48.0111756Z .................................................................................................... 900/992
2019-10-09T00:48:56.5202745Z ........................................iiii................................................
2019-10-09T00:48:56.5206453Z 
2019-10-09T00:48:56.5330762Z  finished in 216.073
2019-10-09T00:48:56.5351091Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-09T00:48:56.7695819Z    Compiling term v0.0.0 (/checkout/src/libterm)
---
2019-10-09T01:03:39.1013893Z     Checking core v0.0.0 (/checkout/src/libcore)
2019-10-09T01:03:59.3232909Z     Checking rustc-std-workspace-core v1.99.0 (/checkout/src/tools/rustc-std-workspace-core)
2019-10-09T01:03:59.3597194Z     Checking compiler_builtins v0.1.18
2019-10-09T01:04:00.4375605Z  Documenting alloc v0.0.0 (/checkout/src/liballoc)
2019-10-09T01:04:03.1213137Z error: `[to_mut]` cannot be resolved, ignoring it...
2019-10-09T01:04:03.1214265Z    --> src/liballoc/borrow.rs:210:56
2019-10-09T01:04:03.1215410Z     |
2019-10-09T01:04:03.1216143Z 210 |     /// Returns true if the data is borrowed, i.e. if [`to_mut`] would require additional work.
2019-10-09T01:04:03.1217306Z     |
2019-10-09T01:04:03.1218515Z note: lint level defined here
2019-10-09T01:04:03.1219298Z    --> src/liballoc/lib.rs:70:9
2019-10-09T01:04:03.1219764Z     |
2019-10-09T01:04:03.1219764Z     |
2019-10-09T01:04:03.1220358Z 70  | #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
2019-10-09T01:04:03.1221832Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2019-10-09T01:04:03.1222045Z 
2019-10-09T01:04:03.1222045Z 
2019-10-09T01:04:03.1222509Z error: `[to_mut]` cannot be resolved, ignoring it...
2019-10-09T01:04:03.1223017Z    --> src/liballoc/borrow.rs:232:53
2019-10-09T01:04:03.1223489Z     |
2019-10-09T01:04:03.1224062Z 232 |     /// Returns true if the data is owned, i.e. if [`to_mut`] would be a no-op.
2019-10-09T01:04:03.1225140Z     |
2019-10-09T01:04:03.1225700Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2019-10-09T01:04:03.1225913Z 
2019-10-09T01:04:03.2671067Z error: aborting due to 2 previous errors
2019-10-09T01:04:03.2671067Z error: aborting due to 2 previous errors
2019-10-09T01:04:03.2672280Z 
2019-10-09T01:04:03.2917499Z error: Could not document `alloc`.
2019-10-09T01:04:03.2918116Z 
2019-10-09T01:04:03.2918453Z Caused by:
2019-10-09T01:04:03.2920028Z   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2018 --crate-type lib --crate-name alloc src/liballoc/lib.rs --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc --cfg 'feature="compiler-builtins-c"' --color always --markdown-css rust.css --markdown-no-toc --generate-redirect-pages --resource-suffix 1.40.0 --index-page /checkout/src/doc/index.md -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 compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-3a009331d0964bed.rmeta --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-67faf12ddd846db2.rmeta` (exit code: 1)
2019-10-09T01:04:03.2934418Z 
2019-10-09T01:04:03.2934418Z 
2019-10-09T01:04:03.2935474Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustdoc" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-Z" "unstable-options" "-p" "alloc" "--" "--markdown-css" "rust.css" "--markdown-no-toc" "--generate-redirect-pages" "--resource-suffix" "1.40.0" "--index-page" "/checkout/src/doc/index.md"
2019-10-09T01:04:03.2935658Z 
2019-10-09T01:04:03.2935691Z 
2019-10-09T01:04:03.2939236Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-10-09T01:04:03.2939952Z Build completed unsuccessfully in 1:49:16
2019-10-09T01:04:03.2939952Z Build completed unsuccessfully in 1:49:16
2019-10-09T01:04:03.3002061Z == clock drift check ==
2019-10-09T01:04:03.3041582Z   local time: Wed Oct  9 01:04:03 UTC 2019
2019-10-09T01:04:03.4488724Z   network time: Wed, 09 Oct 2019 01:04:03 GMT
2019-10-09T01:04:03.4489126Z == end clock drift check ==
2019-10-09T01:04:06.1655139Z ##[error]Bash exited with code '1'.
2019-10-09T01:04:06.1698400Z ##[section]Starting: Checkout
2019-10-09T01:04:06.1700944Z ==============================================================================
2019-10-09T01:04:06.1701008Z Task         : Get sources
2019-10-09T01:04:06.1701061Z 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)

@hellow554
Copy link
Contributor

@clarfon you don't like the suggestion: let cow: Cow<str> = Cow::Owned("moo".to_string());? It's okay, just wanted to make sure, that you skipped it ;)

you need to add #![feature(cow_is_borrowed)] to

#![feature(associated_type_bounds)]

@clarfonthey
Copy link
Contributor Author

Thank you for the comment about the feature flag. I was just convinced that intra-doc links were broken again ><

@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-10-11T01:37:31.8691866Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-11T01:37:31.8781292Z ##[command]git config gc.auto 0
2019-10-11T01:37:31.8866278Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-11T01:37:31.8928903Z ##[command]git config --get-all http.proxy
2019-10-11T01:37:31.9079461Z ##[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/65144/merge:refs/remotes/pull/65144/merge
---
2019-10-11T02:40:16.7482987Z .................................................................................................... 1600/9146
2019-10-11T02:40:24.6635592Z .................................................................................................... 1700/9146
2019-10-11T02:40:37.0849153Z .................i...............i.................................................................. 1800/9146
2019-10-11T02:40:44.6967352Z .................................................................................................... 1900/9146
2019-10-11T02:41:00.8123242Z ........iiiii....................................................................................... 2000/9146
2019-10-11T02:41:11.4582519Z .................................................................................................... 2200/9146
2019-10-11T02:41:14.2753097Z .................................................................................................... 2300/9146
2019-10-11T02:41:20.4317874Z .................................................................................................... 2400/9146
2019-10-11T02:41:27.1446367Z .................................................................................................... 2500/9146
---
2019-10-11T02:44:34.6634434Z .................................................................................................... 4700/9146
2019-10-11T02:44:42.4898668Z .i...............i.................................................................................. 4800/9146
2019-10-11T02:44:54.2224919Z .................................................................................................... 4900/9146
2019-10-11T02:45:00.1847671Z .................................................................................................... 5000/9146
2019-10-11T02:45:12.1998076Z ...............................................................................................ii.ii 5100/9146
2019-10-11T02:45:23.4733424Z .................................................................................................... 5300/9146
2019-10-11T02:45:33.8953570Z .................................................................................................... 5400/9146
2019-10-11T02:45:41.1430938Z .............................................................i...................................... 5500/9146
2019-10-11T02:45:48.9501391Z .................................................................................................... 5600/9146
2019-10-11T02:45:48.9501391Z .................................................................................................... 5600/9146
2019-10-11T02:45:56.8210191Z .................................................................................................... 5700/9146
2019-10-11T02:46:07.6655421Z ..........................................................ii...i..ii...........i.................... 5800/9146
2019-10-11T02:46:34.7703631Z .................................................................................................... 6000/9146
2019-10-11T02:46:44.5269053Z .................................................................................................... 6100/9146
2019-10-11T02:46:44.5269053Z .................................................................................................... 6100/9146
2019-10-11T02:46:54.3475928Z ................................................................i..ii............................... 6200/9146
2019-10-11T02:47:25.0387682Z .................................................................................................... 6400/9146
2019-10-11T02:47:27.3413783Z ........................i........................................................................... 6500/9146
2019-10-11T02:47:29.7523384Z .................................................................................................i.. 6600/9146
2019-10-11T02:47:32.7039471Z .................................................................................................... 6700/9146
---
2019-10-11T02:52:27.9974044Z  finished in 5.853
2019-10-11T02:52:28.0172053Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-11T02:52:28.1888487Z 
2019-10-11T02:52:28.1888941Z running 153 tests
2019-10-11T02:52:31.7276139Z i....iii......iii..iiii....i.............................i..i..................i....i............ii. 100/153
2019-10-11T02:52:33.8514011Z i.i..iiii..............i.........iii.i.......ii......
2019-10-11T02:52:33.8514500Z 
2019-10-11T02:52:33.8514630Z  finished in 5.834
2019-10-11T02:52:33.8713623Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-11T02:52:34.0344771Z 
---
2019-10-11T02:52:36.3100753Z  finished in 2.438
2019-10-11T02:52:36.3319298Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-11T02:52:36.5134859Z 
2019-10-11T02:52:36.5135097Z running 9 tests
2019-10-11T02:52:36.5136100Z iiiiiiiii
2019-10-11T02:52:36.5136766Z 
2019-10-11T02:52:36.5136808Z  finished in 0.181
2019-10-11T02:52:36.5351477Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-11T02:52:36.7085403Z 
---
2019-10-11T02:52:55.9683412Z  finished in 19.433
2019-10-11T02:52:55.9909757Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-11T02:52:56.1656375Z 
2019-10-11T02:52:56.1657810Z running 123 tests
2019-10-11T02:53:22.1390465Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i...ii...i.......ii. 100/123
2019-10-11T02:53:27.1587236Z i.i.i......iii.i.....ii
2019-10-11T02:53:27.1590653Z 
2019-10-11T02:53:27.1591906Z  finished in 31.168
2019-10-11T02:53:27.1599335Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-11T02:53:27.1600563Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-10-11T03:07:10.1521003Z 
2019-10-11T03:07:10.1531403Z    Doc-tests core
2019-10-11T03:07:15.5054515Z 
2019-10-11T03:07:15.5055700Z running 2405 tests
2019-10-11T03:07:27.9463475Z ......iiiii......................................................................................... 100/2405
2019-10-11T03:07:40.2634134Z ...............................................................................ii................... 200/2405
2019-10-11T03:08:08.5675902Z .i.................................................................................................. 400/2405
2019-10-11T03:08:08.5675902Z .i.................................................................................................. 400/2405
2019-10-11T03:08:20.2667059Z ................................................i..i.................iiii........................... 500/2405
2019-10-11T03:08:42.8986533Z .................................................................................................... 700/2405
2019-10-11T03:08:54.3640707Z .................................................................................................... 800/2405
2019-10-11T03:09:05.8254808Z .................................................................................................... 900/2405
2019-10-11T03:09:17.8137982Z .................................................................................................... 1000/2405
---
2019-10-11T03:13:51.0324333Z 
2019-10-11T03:13:51.0349114Z running 994 tests
2019-10-11T03:14:14.2385235Z i................................................................................................... 100/994
2019-10-11T03:14:27.2063730Z .................................................................................................... 200/994
2019-10-11T03:14:36.6499708Z ...................iii......i......i...i......i..................................................... 300/994
2019-10-11T03:14:42.9359885Z .................................................................................................... 400/994
2019-10-11T03:14:51.5354301Z .....................................i..i.................................ii........................ 500/994
2019-10-11T03:15:08.1760234Z .................................................................................................... 700/994
2019-10-11T03:15:08.1760234Z .................................................................................................... 700/994
2019-10-11T03:15:17.1813486Z ....................iiii............................................................................ 800/994
2019-10-11T03:15:33.6341936Z .................................................................................................... 900/994
2019-10-11T03:15:42.2293564Z ..........................................iiii................................................
2019-10-11T03:15:42.2293727Z 
2019-10-11T03:15:42.2333511Z  finished in 209.734
2019-10-11T03:15:42.2350129Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-10-11T03:15:42.4538567Z    Compiling term v0.0.0 (/checkout/src/libterm)
---
2019-10-11T03:30:02.8652593Z     Checking core v0.0.0 (/checkout/src/libcore)
2019-10-11T03:30:22.9377528Z     Checking rustc-std-workspace-core v1.99.0 (/checkout/src/tools/rustc-std-workspace-core)
2019-10-11T03:30:22.9735909Z     Checking compiler_builtins v0.1.18
2019-10-11T03:30:24.0626180Z  Documenting alloc v0.0.0 (/checkout/src/liballoc)
2019-10-11T03:30:26.4846594Z error: `[to_mut]` cannot be resolved, ignoring it...
2019-10-11T03:30:26.4850283Z    --> src/liballoc/borrow.rs:210:56
2019-10-11T03:30:26.4851162Z     |
2019-10-11T03:30:26.4851807Z 210 |     /// Returns true if the data is borrowed, i.e. if [`to_mut`] would require additional work.
2019-10-11T03:30:26.4852848Z     |
2019-10-11T03:30:26.4853305Z note: lint level defined here
2019-10-11T03:30:26.4853939Z    --> src/liballoc/lib.rs:70:9
2019-10-11T03:30:26.4855028Z     |
2019-10-11T03:30:26.4855028Z     |
2019-10-11T03:30:26.4856308Z 70  | #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
2019-10-11T03:30:26.4857400Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2019-10-11T03:30:26.4857560Z 
2019-10-11T03:30:26.4857560Z 
2019-10-11T03:30:26.4857973Z error: `[to_mut]` cannot be resolved, ignoring it...
2019-10-11T03:30:26.4858386Z    --> src/liballoc/borrow.rs:232:53
2019-10-11T03:30:26.4859007Z     |
2019-10-11T03:30:26.4859856Z 232 |     /// Returns true if the data is owned, i.e. if [`to_mut`] would be a no-op.
2019-10-11T03:30:26.4860642Z     |
2019-10-11T03:30:26.4861049Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2019-10-11T03:30:26.4861190Z 
2019-10-11T03:30:26.6326478Z error: aborting due to 2 previous errors
2019-10-11T03:30:26.6326478Z error: aborting due to 2 previous errors
2019-10-11T03:30:26.6326578Z 
2019-10-11T03:30:26.6577825Z error: Could not document `alloc`.
2019-10-11T03:30:26.6577938Z 
2019-10-11T03:30:26.6578051Z Caused by:
2019-10-11T03:30:26.6579270Z   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2018 --crate-type lib --crate-name alloc src/liballoc/lib.rs --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc --cfg 'feature="compiler-builtins-c"' --color always --markdown-css rust.css --markdown-no-toc --generate-redirect-pages --resource-suffix 1.40.0 --index-page /checkout/src/doc/index.md -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 compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-3a009331d0964bed.rmeta --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-67faf12ddd846db2.rmeta` (exit code: 1)
2019-10-11T03:30:26.6597163Z 
2019-10-11T03:30:26.6597163Z 
2019-10-11T03:30:26.6598147Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustdoc" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-Z" "unstable-options" "-p" "alloc" "--" "--markdown-css" "rust.css" "--markdown-no-toc" "--generate-redirect-pages" "--resource-suffix" "1.40.0" "--index-page" "/checkout/src/doc/index.md"
2019-10-11T03:30:26.6598312Z 
2019-10-11T03:30:26.6598343Z 
2019-10-11T03:30:26.6609763Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-10-11T03:30:26.6609827Z Build completed unsuccessfully in 1:46:30
2019-10-11T03:30:26.6609827Z Build completed unsuccessfully in 1:46:30
2019-10-11T03:30:26.6672713Z == clock drift check ==
2019-10-11T03:30:26.6690545Z   local time: Fri Oct 11 03:30:26 UTC 2019
2019-10-11T03:30:26.7689841Z   network time: Fri, 11 Oct 2019 03:30:26 GMT
2019-10-11T03:30:26.7693782Z == end clock drift check ==
2019-10-11T03:30:28.1907343Z ##[error]Bash exited with code '1'.
2019-10-11T03:30:28.1963696Z ##[section]Starting: Checkout
2019-10-11T03:30:28.1965710Z ==============================================================================
2019-10-11T03:30:28.1965783Z Task         : Get sources
2019-10-11T03:30:28.1965827Z 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)

@wirelessringo
Copy link

Ping from triage. @TimNN can you please review this PR? Thanks.

@clarfonthey
Copy link
Contributor Author

Removed the links on to_mut because the rest of the module doesn't seem to use them. Will resolve the warnings.

@hellow554
Copy link
Contributor

@ProgrammaticNajel TimNN seems to be not available. Can you reassign it please?

@tesuji
Copy link
Contributor

tesuji commented Oct 23, 2019

r? @sfackler

@sfackler
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 23, 2019

📌 Commit eeb549b has been approved by sfackler

@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 Oct 23, 2019
Centril added a commit to Centril/rust that referenced this pull request Oct 23, 2019
Add Cow::is_borrowed and Cow::is_owned

Implements rust-lang#65143.
Centril added a commit to Centril/rust that referenced this pull request Oct 23, 2019
Add Cow::is_borrowed and Cow::is_owned

Implements rust-lang#65143.
bors added a commit that referenced this pull request Oct 24, 2019
Rollup of 12 pull requests

Successful merges:

 - #64178 (More Clippy fixes for alloc, core and std)
 - #65144 (Add Cow::is_borrowed and Cow::is_owned)
 - #65193 (Lockless LintStore)
 - #65479 (Add the `matches!( $expr, $pat ) -> bool` macro)
 - #65518 (Avoid ICE when checking `Destination` of `break` inside a closure)
 - #65583 (rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref.)
 - #65641 (Derive `Rustc{En,De}codable` for `TokenStream`.)
 - #65648 (Eliminate `intersect_opt`.)
 - #65657 (Remove `InternedString`)
 - #65691 (Update E0659 error code long explanation to 2018 edition)
 - #65696 (Fix an issue with const inference variables sticking around under Chalk + NLL)
 - #65704 (relax ExactSizeIterator bound on write_bytes)

Failed merges:

r? @ghost
@bors bors merged commit eeb549b into rust-lang:master Oct 24, 2019
@clarfonthey clarfonthey deleted the moo branch October 27, 2019 04:38
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.

8 participants