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

Rollup of 5 pull requests #66236

Closed
wants to merge 14 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Nov 9, 2019

Successful merges:

Failed merges:

r? @ghost

estebank and others added 14 commits October 31, 2019 10:22
When a formatting string contains an invalid descriptor, point at it
instead of the argument:

```
error: unknown format trait `foo`
  --> $DIR/ifmt-bad-arg.rs:86:17
   |
LL |     println!("{:foo}", 1);
   |                 ^^^
   |
   = note: the only appropriate formatting traits are:
           - ``, which uses the `Display` trait
           - `?`, which uses the `Debug` trait
           - `e`, which uses the `LowerExp` trait
           - `E`, which uses the `UpperExp` trait
           - `o`, which uses the `Octal` trait
           - `p`, which uses the `Pointer` trait
           - `b`, which uses the `Binary` trait
           - `x`, which uses the `LowerHex` trait
           - `X`, which uses the `UpperHex` trait
```
Suggest to add lifetime constraint at explicit ouput of functions

Closes rust-lang#62097
Point at where clauses where the associated item was restricted

CC rust-lang#57663.
r? @nikomatsakis
…r=nikomatsakis

Point at formatting descriptor string when it is invalid

When a formatting string contains an invalid descriptor, point at it
instead of the argument:

```
error: unknown format trait `foo`
  --> $DIR/ifmt-bad-arg.rs:86:17
   |
LL |     println!("{:foo}", 1);
   |                 ^^^
   |
   = note: the only appropriate formatting traits are:
           - ``, which uses the `Display` trait
           - `?`, which uses the `Debug` trait
           - `e`, which uses the `LowerExp` trait
           - `E`, which uses the `UpperExp` trait
           - `o`, which uses the `Octal` trait
           - `p`, which uses the `Pointer` trait
           - `b`, which uses the `Binary` trait
           - `x`, which uses the `LowerHex` trait
           - `X`, which uses the `UpperHex` trait
```
@Centril
Copy link
Contributor Author

Centril commented Nov 9, 2019

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Nov 9, 2019

📌 Commit c48dc06 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 9, 2019
@Centril Centril added the rollup A PR which is a rollup label Nov 9, 2019
@bors
Copy link
Contributor

bors commented Nov 9, 2019

⌛ Testing commit c48dc06 with merge 88676c700ff1e5ba6c4e111cec73578a3e639575...

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-nopt 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-09T04:40:56.2961713Z 
2019-11-09T04:40:56.2962665Z ---- [ui (nll)] ui/async-await/issues/issue-62097.rs stdout ----
2019-11-09T04:40:56.2963067Z diff of stderr:
2019-11-09T04:40:56.2963296Z 
2019-11-09T04:40:56.2963804Z - error: cannot infer an appropriate lifetime
2019-11-09T04:40:56.2964386Z -   --> $DIR/issue-62097.rs:12:31
2019-11-09T04:40:56.2964950Z + error[E0373]: closure may outlive the current function, but it borrows `self`, which is owned by the current function
2019-11-09T04:40:56.2965453Z +   --> $DIR/issue-62097.rs:13:13
2019-11-09T04:40:56.2965816Z 3    |
2019-11-09T04:40:56.2966302Z - LL |     pub async fn run_dummy_fn(&self) {
2019-11-09T04:40:56.2966848Z -    |                               ^^^^^ ...but this borrow...
2019-11-09T04:40:56.2967187Z 6 LL |         foo(|| self.bar()).await;
2019-11-09T04:40:56.2967702Z -    |         --- this return type evaluates to the `'static` lifetime...
2019-11-09T04:40:56.2968265Z +    |             ^^ ---- `self` is borrowed here
2019-11-09T04:40:56.2969283Z +    |             may outlive borrowed value `self`
2019-11-09T04:40:56.2969550Z 8    |
2019-11-09T04:40:56.2969550Z 8    |
2019-11-09T04:40:56.2970099Z - note: ...can't outlive the lifetime `'_` as defined on the method body at 12:31
2019-11-09T04:40:56.2970639Z -   --> $DIR/issue-62097.rs:12:31
2019-11-09T04:40:56.2971514Z + note: function requires argument type to outlive `'static`
2019-11-09T04:40:56.2972575Z +   --> $DIR/issue-62097.rs:13:9
2019-11-09T04:40:56.2972910Z 11    |
2019-11-09T04:40:56.2973162Z + LL |         foo(|| self.bar()).await;
2019-11-09T04:40:56.2973426Z +    |         ^^^^^^^^^^^^^^^^^^
2019-11-09T04:40:56.2973879Z + help: to force the closure to take ownership of `self` (and any other referenced variables), use the `move` keyword
2019-11-09T04:40:56.2974208Z +    |
2019-11-09T04:40:56.2974465Z + LL |         foo(move || self.bar()).await;
2019-11-09T04:40:56.2974936Z + 
2019-11-09T04:40:56.2975186Z + error[E0521]: borrowed data escapes outside of function
2019-11-09T04:40:56.2975675Z +   --> $DIR/issue-62097.rs:13:9
2019-11-09T04:40:56.2975991Z +    |
2019-11-09T04:40:56.2975991Z +    |
2019-11-09T04:40:56.2976248Z 12 LL |     pub async fn run_dummy_fn(&self) {
2019-11-09T04:40:56.2976855Z -    |                               ^
2019-11-09T04:40:56.2977448Z +    |                               ----- `self` is a reference that is only valid in the function body
2019-11-09T04:40:56.2978262Z + LL |         foo(|| self.bar()).await;
2019-11-09T04:40:56.2978546Z +    |         ^^^^^^^^^^^^^^^^^^ `self` escapes the function body here
2019-11-09T04:40:56.2979440Z - error: aborting due to previous error
2019-11-09T04:40:56.2979671Z + error: aborting due to 2 previous errors
2019-11-09T04:40:56.2979848Z 16 
2019-11-09T04:40:56.2980285Z + For more information about this error, try `rustc --explain E0373`.
2019-11-09T04:40:56.2980285Z + For more information about this error, try `rustc --explain E0373`.
2019-11-09T04:40:56.2980491Z 17 
2019-11-09T04:40:56.2980635Z 
2019-11-09T04:40:56.2980760Z 
2019-11-09T04:40:56.2980948Z The actual stderr differed from the expected stderr.
2019-11-09T04:40:56.2981623Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-62097.nll/issue-62097.nll.stderr
2019-11-09T04:40:56.2982123Z To update references, rerun the tests and pass the `--bless` flag
2019-11-09T04:40:56.2982823Z To only update this specific test, also pass `--test-args async-await/issues/issue-62097.rs`
2019-11-09T04:40:56.2983189Z error: 1 errors occurred comparing output.
2019-11-09T04:40:56.2983367Z status: exit code: 1
2019-11-09T04:40:56.2983367Z status: exit code: 1
2019-11-09T04:40:56.2984554Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/async-await/issues/issue-62097.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-62097.nll" "-Zborrowck=mir" "-Crpath" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-62097.nll/auxiliary" "-A" "unused"
2019-11-09T04:40:56.2985380Z ------------------------------------------
2019-11-09T04:40:56.2985554Z 
2019-11-09T04:40:56.2985938Z ------------------------------------------
2019-11-09T04:40:56.2986133Z stderr:
2019-11-09T04:40:56.2986133Z stderr:
2019-11-09T04:40:56.2986499Z ------------------------------------------
2019-11-09T04:40:56.2986761Z error[E0373]: closure may outlive the current function, but it borrows `self`, which is owned by the current function
2019-11-09T04:40:56.2987203Z   --> /checkout/src/test/ui/async-await/issues/issue-62097.rs:13:13
2019-11-09T04:40:56.2987611Z    |
2019-11-09T04:40:56.2987945Z LL |         foo(|| self.bar()).await;
2019-11-09T04:40:56.2988341Z    |             ^^ ---- `self` is borrowed here
2019-11-09T04:40:56.2988730Z    |             may outlive borrowed value `self`
2019-11-09T04:40:56.2988908Z    |
2019-11-09T04:40:56.2989277Z note: function requires argument type to outlive `'static`
2019-11-09T04:40:56.2989726Z   --> /checkout/src/test/ui/async-await/issues/issue-62097.rs:13:9
2019-11-09T04:40:56.2989726Z   --> /checkout/src/test/ui/async-await/issues/issue-62097.rs:13:9
2019-11-09T04:40:56.2989946Z    |
2019-11-09T04:40:56.2990102Z LL |         foo(|| self.bar()).await;
2019-11-09T04:40:56.2990285Z    |         ^^^^^^^^^^^^^^^^^^
2019-11-09T04:40:56.2993102Z help: to force the closure to take ownership of `self` (and any other referenced variables), use the `move` keyword
2019-11-09T04:40:56.2993339Z    |
2019-11-09T04:40:56.2993521Z LL |         foo(move || self.bar()).await;
2019-11-09T04:40:56.2993970Z 
2019-11-09T04:40:56.2994209Z error[E0521]: borrowed data escapes outside of function
2019-11-09T04:40:56.2994750Z   --> /checkout/src/test/ui/async-await/issues/issue-62097.rs:13:9
2019-11-09T04:40:56.2994987Z    |
2019-11-09T04:40:56.2994987Z    |
2019-11-09T04:40:56.2995163Z LL |     pub async fn run_dummy_fn(&self) { //~ ERROR cannot infer
2019-11-09T04:40:56.2995635Z    |                               ----- `self` is a reference that is only valid in the function body
2019-11-09T04:40:56.2995857Z LL |         foo(|| self.bar()).await;
2019-11-09T04:40:56.2996056Z    |         ^^^^^^^^^^^^^^^^^^ `self` escapes the function body here
2019-11-09T04:40:56.2996450Z error: aborting due to 2 previous errors
2019-11-09T04:40:56.2996595Z 
2019-11-09T04:40:56.2997020Z For more information about this error, try `rustc --explain E0373`.
2019-11-09T04:40:56.2997339Z 
---
2019-11-09T04:40:56.3000324Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-09T04:40:56.3000571Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-09T04:40:56.3010630Z 
2019-11-09T04:40:56.3010961Z 
2019-11-09T04:40:56.3013799Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "9.0.0-rust-1.40.0-dev\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always" "--compare-mode" "nll"
2019-11-09T04:40:56.3015083Z 
2019-11-09T04:40:56.3015242Z 
2019-11-09T04:40:56.3020297Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-09T04:40:56.3020874Z Build completed unsuccessfully in 1:41:07
2019-11-09T04:40:56.3020874Z Build completed unsuccessfully in 1:41:07
2019-11-09T04:40:56.3071498Z == clock drift check ==
2019-11-09T04:40:56.3086770Z   local time: Sat Nov  9 04:40:56 UTC 2019
2019-11-09T04:40:56.5817622Z   network time: Sat, 09 Nov 2019 04:40:56 GMT
2019-11-09T04:40:56.5821586Z == end clock drift check ==
2019-11-09T04:40:57.8004730Z 
2019-11-09T04:40:57.8103658Z ##[error]Bash exited with code '1'.
2019-11-09T04:40:57.8148314Z ##[section]Starting: Checkout
2019-11-09T04:40:57.8151098Z ==============================================================================
2019-11-09T04:40:57.8151212Z Task         : Get sources
2019-11-09T04:40:57.8151478Z 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)

@bors
Copy link
Contributor

bors commented Nov 9, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 9, 2019
@Centril Centril closed this Nov 9, 2019
@Centril Centril deleted the rollup-i6n5yxr branch November 9, 2019 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants