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 missing examples for Option type #63969

Merged
merged 1 commit into from
Sep 6, 2019

Conversation

GuillaumeGomez
Copy link
Member

cc @rust-lang/docs

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(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 Aug 28, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (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-08-28T11:23:06.4717359Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-28T11:23:06.4951096Z ##[command]git config gc.auto 0
2019-08-28T11:23:06.5002428Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-28T11:23:06.5042134Z ##[command]git config --get-all http.proxy
2019-08-28T11:23:06.5168948Z ##[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/63969/merge:refs/remotes/pull/63969/merge
---
2019-08-28T11:23:41.4451941Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-28T11:23:41.4451964Z 
2019-08-28T11:23:41.4452138Z   git checkout -b <new-branch-name>
2019-08-28T11:23:41.4452161Z 
2019-08-28T11:23:41.4452196Z HEAD is now at a064fc53d Merge 994595616c9df11673ebcc2e7400240f6f9fc67b into ac21131f7859836cd3fcb39231c0162fd892d960
2019-08-28T11:23:41.4592736Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-28T11:23:41.4594926Z ==============================================================================
2019-08-28T11:23:41.4594988Z Task         : Bash
2019-08-28T11:23:41.4595021Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-28T12:21:33.7922826Z .................................................................................................... 1500/8969
2019-08-28T12:21:38.9363417Z .................................................................................................... 1600/8969
2019-08-28T12:21:50.7561814Z .............................................i...............i...................................... 1700/8969
2019-08-28T12:21:58.3616254Z .................................................................................................... 1800/8969
2019-08-28T12:22:11.3867431Z ....................................iiiii........................................................... 1900/8969
2019-08-28T12:22:21.0047918Z .................................................................................................... 2100/8969
2019-08-28T12:22:23.3408551Z .................................................................................................... 2200/8969
2019-08-28T12:22:27.2810357Z .................................................................................................... 2300/8969
2019-08-28T12:22:34.0281703Z .................................................................................................... 2400/8969
---
2019-08-28T12:25:15.0352688Z .......................i...............i............................................................ 4700/8969
2019-08-28T12:25:25.3273167Z .................................................................................................... 4800/8969
2019-08-28T12:25:30.7141758Z .................................................................................................... 4900/8969
2019-08-28T12:25:40.6283962Z .................................................................................................... 5000/8969
2019-08-28T12:25:45.2333996Z ....ii.ii........................................................................................... 5100/8969
2019-08-28T12:25:57.4730369Z .................................................................................................... 5300/8969
2019-08-28T12:26:03.9473838Z ...................................................................i................................ 5400/8969
2019-08-28T12:26:10.4272899Z .................................................................................................... 5500/8969
2019-08-28T12:26:16.4754816Z .................................................................................................... 5600/8969
2019-08-28T12:26:16.4754816Z .................................................................................................... 5600/8969
2019-08-28T12:26:25.6243101Z .............................................................ii...i..ii...........i................. 5700/8969
2019-08-28T12:26:43.6565521Z .................................................................................................... 5900/8969
2019-08-28T12:26:48.0182737Z .................................................................................................... 6000/8969
2019-08-28T12:26:48.0182737Z .................................................................................................... 6000/8969
2019-08-28T12:26:53.9981087Z ..............................................................i..ii................................. 6100/8969
2019-08-28T12:27:18.9336483Z .................................................................................................... 6300/8969
2019-08-28T12:27:20.8251603Z .................i.................................................................................. 6400/8969
2019-08-28T12:27:22.4688462Z .........................................................................................i.......... 6500/8969
2019-08-28T12:27:24.7604643Z .................................................................................................... 6600/8969
---
2019-08-28T12:31:31.3673673Z  finished in 17.301
2019-08-28T12:31:31.3861811Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-28T12:31:31.5449921Z 
2019-08-28T12:31:31.5450060Z running 149 tests
2019-08-28T12:31:34.3675139Z i....iii......iii..iiii....i.............................i..i..................i....i.........ii.i.i 100/149
2019-08-28T12:31:36.0969049Z ..iiii..............i.........iii.i......ii......
2019-08-28T12:31:36.0971094Z 
2019-08-28T12:31:36.0973576Z  finished in 4.710
2019-08-28T12:31:36.1115913Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-28T12:31:36.2490255Z 
---
2019-08-28T12:31:38.0598212Z  finished in 1.948
2019-08-28T12:31:38.0749648Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-28T12:31:38.2115105Z 
2019-08-28T12:31:38.2115699Z running 9 tests
2019-08-28T12:31:38.2116294Z iiiiiiiii
2019-08-28T12:31:38.2116866Z 
2019-08-28T12:31:38.2118134Z  finished in 0.137
2019-08-28T12:31:38.2254418Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-28T12:31:38.3756939Z 
---
2019-08-28T12:31:54.2776252Z  finished in 16.052
2019-08-28T12:31:54.2937547Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-28T12:31:54.4439088Z 
2019-08-28T12:31:54.4439200Z running 122 tests
2019-08-28T12:32:15.1515338Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
2019-08-28T12:32:19.1759598Z .i.i......iii.i.....ii
2019-08-28T12:32:19.8987977Z 
2019-08-28T12:32:19.8989048Z  finished in 24.882
2019-08-28T12:32:19.8989527Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-28T12:32:19.8990322Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-08-28T12:45:10.7752601Z 
2019-08-28T12:45:10.7758132Z    Doc-tests core
2019-08-28T12:45:15.4714088Z 
2019-08-28T12:45:15.4737016Z running 2382 tests
2019-08-28T12:45:26.7427844Z ......iiiii......................................................................................... 100/2382
2019-08-28T12:45:38.1602676Z .........................................................................ii......................... 200/2382
2019-08-28T12:46:05.3153907Z .................................................................................................... 400/2382
2019-08-28T12:46:05.3153907Z .................................................................................................... 400/2382
2019-08-28T12:46:15.5200284Z ..............................i..i.................iiii............................................. 500/2382
2019-08-28T12:46:37.1633612Z .................................................................................................... 700/2382
2019-08-28T12:46:47.9743209Z .................................................................................................... 800/2382
2019-08-28T12:46:58.8804539Z .................................................................................................... 900/2382
2019-08-28T12:47:09.6621767Z .................................................................................................... 1000/2382
---
2019-08-28T12:49:46.1790660Z ...........................................................................................i........ 2300/2382
2019-08-28T12:49:56.5792581Z ..................................................................................
2019-08-28T12:49:56.5794415Z failures:
2019-08-28T12:49:56.5794706Z 
2019-08-28T12:49:56.5795554Z ---- option.rs - option::Option<T>::as_deref (line 1116) stdout ----
2019-08-28T12:49:56.5795783Z error[E0599]: no method named `as_deref` found for type `std::option::Option<{integer}>` in the current scope
2019-08-28T12:49:56.5796123Z  --> option.rs:1118:14
2019-08-28T12:49:56.5796290Z   |
2019-08-28T12:49:56.5796447Z 5 | assert_eq!(x.as_deref(), Some(&4));
2019-08-28T12:49:56.5796763Z   |              ^^^^^^^^ help: there is a method with a similar name: `as_ref`
2019-08-28T12:49:56.5796966Z   |
2019-08-28T12:49:56.5797283Z   = note: the method `as_deref` exists but the following trait bounds were not satisfied:
2019-08-28T12:49:56.5797878Z           `{integer} : std::ops::Deref`
2019-08-28T12:49:56.5798241Z error[E0599]: no method named `as_deref` found for type `std::option::Option<u32>` in the current scope
2019-08-28T12:49:56.5798672Z  --> option.rs:1121:14
2019-08-28T12:49:56.5798896Z   |
2019-08-28T12:49:56.5798896Z   |
2019-08-28T12:49:56.5799050Z 8 | assert_eq!(x.as_deref().next(), None);
2019-08-28T12:49:56.5799228Z   |              ^^^^^^^^ help: there is a method with a similar name: `as_ref`
2019-08-28T12:49:56.5799396Z   |
2019-08-28T12:49:56.5799551Z   = note: the method `as_deref` exists but the following trait bounds were not satisfied:
2019-08-28T12:49:56.5799701Z           `u32 : std::ops::Deref`
2019-08-28T12:49:56.5800008Z error: aborting due to 2 previous errors
2019-08-28T12:49:56.5800139Z 
2019-08-28T12:49:56.5800573Z For more information about this error, try `rustc --explain E0599`.
2019-08-28T12:49:56.5801133Z Couldn't compile the test.
2019-08-28T12:49:56.5801133Z Couldn't compile the test.
2019-08-28T12:49:56.5801522Z ---- option.rs - option::Option<T>::as_deref_mut (line 1137) stdout ----
2019-08-28T12:49:56.5801728Z error[E0599]: no method named `as_deref_mut` found for type `std::option::Option<{integer}>` in the current scope
2019-08-28T12:49:56.5802044Z  --> option.rs:1139:14
2019-08-28T12:49:56.5802207Z   |
2019-08-28T12:49:56.5802362Z 5 | assert_eq!(x.as_deref_mut(), Some(&mut 4));
2019-08-28T12:49:56.5802827Z   |
2019-08-28T12:49:56.5802827Z   |
2019-08-28T12:49:56.5802988Z   = note: the method `as_deref_mut` exists but the following trait bounds were not satisfied:
2019-08-28T12:49:56.5803125Z           `{integer} : std::ops::DerefMut`
2019-08-28T12:49:56.5803403Z error[E0599]: no method named `as_deref_mut` found for type `std::option::Option<u32>` in the current scope
2019-08-28T12:49:56.5804063Z  --> option.rs:1142:14
2019-08-28T12:49:56.5804240Z   |
2019-08-28T12:49:56.5804240Z   |
2019-08-28T12:49:56.5804364Z 8 | assert_eq!(x.as_deref_mut().next(), None);
2019-08-28T12:49:56.5804614Z   |
2019-08-28T12:49:56.5804614Z   |
2019-08-28T12:49:56.5804736Z   = note: the method `as_deref_mut` exists but the following trait bounds were not satisfied:
2019-08-28T12:49:56.5804863Z           `u32 : std::ops::DerefMut`
2019-08-28T12:49:56.5805136Z error: aborting due to 2 previous errors
2019-08-28T12:49:56.5805240Z 
2019-08-28T12:49:56.5805585Z For more information about this error, try `rustc --explain E0599`.
2019-08-28T12:49:56.5805932Z Couldn't compile the test.
---
2019-08-28T12:49:56.5808058Z 
2019-08-28T12:49:56.6059930Z error: test failed, to rerun pass '--doc'
2019-08-28T12:49:56.6076660Z 
2019-08-28T12:49:56.6076887Z 
2019-08-28T12:49:56.6078374Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--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" "-p" "core" "--" "--quiet"
2019-08-28T12:49:56.6078928Z 
2019-08-28T12:49:56.6078991Z 
2019-08-28T12:49:56.6091321Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-08-28T12:49:56.6092269Z Build completed unsuccessfully in 1:20:35
2019-08-28T12:49:56.6092269Z Build completed unsuccessfully in 1:20:35
2019-08-28T12:49:56.6146697Z == clock drift check ==
2019-08-28T12:49:56.6162766Z   local time: Wed Aug 28 12:49:56 UTC 2019
2019-08-28T12:49:56.7651152Z   network time: Wed, 28 Aug 2019 12:49:56 GMT
2019-08-28T12:49:56.7652994Z == end clock drift check ==
2019-08-28T12:49:57.3899097Z ##[error]Bash exited with code '1'.
2019-08-28T12:49:57.3946657Z ##[section]Starting: Checkout
2019-08-28T12:49:57.3949433Z ==============================================================================
2019-08-28T12:49:57.3949517Z Task         : Get sources
2019-08-28T12:49:57.3949570Z 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)

@GuillaumeGomez
Copy link
Member Author

r? @steveklabnik

@GuillaumeGomez
Copy link
Member Author

r? @sfackler

@sfackler
Copy link
Member

sfackler commented Sep 6, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Sep 6, 2019

📌 Commit fdc4f90 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 Sep 6, 2019
@GuillaumeGomez
Copy link
Member Author

@bors rollup

Centril added a commit to Centril/rust that referenced this pull request Sep 6, 2019
… r=sfackler

Add missing examples for Option type

cc @rust-lang/docs
bors added a commit that referenced this pull request Sep 6, 2019
Rollup of 8 pull requests

Successful merges:

 - #63565 (Rust 2018: NLL migrate mode => hard error)
 - #63969 (Add missing examples for Option type)
 - #64067 (Remove no-prefer-dynamic from valgrind tests)
 - #64166 (Better way of conditioning the sanitizer builds)
 - #64189 (annotate-snippet emitter: Deal with multispans from macros, too)
 - #64202 (Fixed grammar/style in some error messages)
 - #64206 (annotate-snippet emitter: Update an issue number)
 - #64208 (it's more pythonic to use 'is not None' in python files)

Failed merges:

r? @ghost
@bors bors merged commit fdc4f90 into rust-lang:master Sep 6, 2019
@GuillaumeGomez GuillaumeGomez deleted the option-docs-example branch September 7, 2019 18:33
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.

6 participants