Skip to content

Rollup of 6 pull requests #68852

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

Closed
wants to merge 25 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Feb 5, 2020

Successful merges:

Failed merges:

r? @ghost

estebank and others added 25 commits January 30, 2020 10:43
It became unnecessary since a06baa5 reformatted the file.
This function has a variable `changed` that is erroneously used for two
related-but-different purpose:
- to detect if the current element has changed;
- to detect if any elements have changed.

As a result, its use for the first purpose is broken, because if any
prior element changed then the code always thinks the current element
has changed. This is only a performance bug, not a correctness bug,
because we frequently end up calling `assign_unpacked` unnecessarily to
overwrite the element with itself.

This commit adds `any_changed` to correctly distinguish between the two
purposes. This is a small perf win for some benchmarks.
also refactor `FnKind` and `visit_assoc_item` visitors
Account for HR lifetimes when suggesting introduction of named lifetime

```
error[E0106]: missing lifetime specifier
 --> src/test/ui/suggestions/fn-missing-lifetime-in-item.rs:2:32
  |
2 | struct S2<F: Fn(&i32, &i32) -> &i32>(F);
  |                 ----  ----     ^ expected named lifetime parameter
  |
  = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
  = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the bound lifetime-generic with a new `'a` lifetime
  |
2 | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F);
  |              ^^^^^^^    ^^^^^^^  ^^^^^^^     ^^^
help: consider introducing a named lifetime parameter
  |
2 | struct S2<'a, F: Fn(&'a i32, &'a i32) -> &'a i32>(F);=
  |           ^^^       ^^^^^^^  ^^^^^^^     ^^^
```

Follow up to rust-lang#68267. Addresses the diagnostics part of rust-lang#49287.
Strip unnecessary subexpression

It became unnecessary since a06baa5 reformatted the file. The comment is currently a bit misleading.
…henkov

Towards unified `fn` grammar

Part of rust-lang#68728.

- Syntactically, `fn` items in `extern { ... }` blocks can now have bodies (`fn foo() { ... }` as opposed to `fn foo();`). As above, we use semantic restrictions instead.

- Syntactically, `fn` items in free contexts (directly in a file or a module) can now be without bodies (`fn foo();` as opposed to `fn foo() { ... }`. As above, we use semantic restrictions instead, including for non-ident parameter patterns.

- We move towards unifying the `fn` front matter; this is fully realized in rust-lang#68728.

r? @petrochenkov
…, r=nikomatsakis

Improve `merge_from_succ`

A couple of small performance wins.

r? @nikomatsakis
…, r=estebank

Clean up E0264, E0267 and E0268 explanations

r? @Dylan-DPC
On suggesting `#![recursion_limit = "X"]`, note current crate name

This would have saved me much confusion e.g. when reading the log output in rust-lang#68788 (comment).

r? @estebank
@Centril
Copy link
Contributor Author

Centril commented Feb 5, 2020

@bors r+ p=6 rollup=never

@bors
Copy link
Collaborator

bors commented Feb 5, 2020

📌 Commit d6f2935 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 Feb 5, 2020
@Centril Centril added the rollup A PR which is a rollup label Feb 5, 2020
@bors
Copy link
Collaborator

bors commented Feb 5, 2020

⌛ Testing commit d6f2935 with merge c2f1940ccea36d74c6d8c1d421cb6061b0c6cd58...

@rust-highfive
Copy link
Contributor

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.

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
Collaborator

bors commented Feb 5, 2020

💔 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 Feb 5, 2020
@Centril
Copy link
Contributor Author

Centril commented Feb 5, 2020

@bors retry

@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 Feb 5, 2020
@bors
Copy link
Collaborator

bors commented Feb 5, 2020

⌛ Testing commit d6f2935 with merge 9a5b1d46a5b9a3c3d063246bc897ce9bf89f110c...

@rust-highfive
Copy link
Contributor

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.
2020-02-05T08:36:23.5808991Z 
2020-02-05T08:36:23.5809085Z 1 error[E0106]: missing lifetime specifier
2020-02-05T08:36:23.5809337Z 2   --> $DIR/issue-63388-2.rs:12:10
2020-02-05T08:36:23.5809415Z 3    |
2020-02-05T08:36:23.5809640Z + LL |         foo: &dyn Foo, bar: &'a dyn Foo
2020-02-05T08:36:23.5810076Z 4 LL |     ) -> &dyn Foo
2020-02-05T08:36:23.5810305Z 5    |          ^ help: consider using the named lifetime: `&'a`
2020-02-05T08:36:23.5810387Z 6    |
2020-02-05T08:36:23.5810418Z 
2020-02-05T08:36:23.5810418Z 
2020-02-05T08:36:23.5810448Z 
2020-02-05T08:36:23.5810522Z The actual stderr differed from the expected stderr.
2020-02-05T08:36:23.5810841Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-63388-2.nll/issue-63388-2.nll.stderr
2020-02-05T08:36:23.5811116Z To update references, rerun the tests and pass the `--bless` flag
2020-02-05T08:36:23.5811404Z To only update this specific test, also pass `--test-args async-await/issues/issue-63388-2.rs`
2020-02-05T08:36:23.5811521Z error: 1 errors occurred comparing output.
2020-02-05T08:36:23.5811599Z status: exit code: 1
2020-02-05T08:36:23.5811599Z status: exit code: 1
2020-02-05T08:36:23.5812510Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/async-await/issues/issue-63388-2.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-63388-2.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-63388-2.nll/auxiliary" "-A" "unused"
2020-02-05T08:36:23.5813186Z ------------------------------------------
2020-02-05T08:36:23.5813250Z 
2020-02-05T08:36:23.5813453Z ------------------------------------------
2020-02-05T08:36:23.5813538Z stderr:
2020-02-05T08:36:23.5813538Z stderr:
2020-02-05T08:36:23.5813736Z ------------------------------------------
2020-02-05T08:36:23.5813825Z error[E0106]: missing lifetime specifier
2020-02-05T08:36:23.5814063Z   --> /checkout/src/test/ui/async-await/issues/issue-63388-2.rs:12:10
2020-02-05T08:36:23.5814148Z    |
2020-02-05T08:36:23.5814373Z LL |         foo: &dyn Foo, bar: &'a dyn Foo //~ ERROR cannot infer
2020-02-05T08:36:23.5814604Z    |              --------       -----------
2020-02-05T08:36:23.5814827Z LL |     ) -> &dyn Foo //~ ERROR missing lifetime specifier
2020-02-05T08:36:23.5815078Z    |          ^ help: consider using the named lifetime: `&'a`
2020-02-05T08:36:23.5815456Z    = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `foo` or `bar`
2020-02-05T08:36:23.5815540Z 
2020-02-05T08:36:23.5815594Z error: aborting due to previous error
2020-02-05T08:36:23.5815632Z 
---
2020-02-05T08:36:23.5848164Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-02-05T08:36:23.5848430Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-02-05T08:36:23.5868137Z 
2020-02-05T08:36:23.5868214Z 
2020-02-05T08:36:23.5870169Z 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.1-rust-1.43.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always" "--compare-mode" "nll"
2020-02-05T08:36:23.5870745Z 
2020-02-05T08:36:23.5870779Z 
2020-02-05T08:36:23.5883610Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-02-05T08:36:23.5883699Z Build completed unsuccessfully in 1:44:03
2020-02-05T08:36:23.5883699Z Build completed unsuccessfully in 1:44:03
2020-02-05T08:36:23.5935667Z == clock drift check ==
2020-02-05T08:36:23.5949592Z   local time: Wed Feb  5 08:36:23 UTC 2020
2020-02-05T08:36:24.1167756Z   network time: Wed, 05 Feb 2020 08:36:24 GMT
2020-02-05T08:36:24.1171815Z == end clock drift check ==
2020-02-05T08:36:24.5248440Z 
2020-02-05T08:36:24.5352648Z ##[error]Bash exited with code '1'.
2020-02-05T08:36:24.5416284Z ##[section]Starting: Checkout rust-lang/rust@auto to s
2020-02-05T08:36:24.5418819Z ==============================================================================
2020-02-05T08:36:24.5418896Z Task         : Get sources
2020-02-05T08:36:24.5418990Z 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
Collaborator

bors commented Feb 5, 2020

💔 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 Feb 5, 2020
@Centril Centril closed this Feb 5, 2020
@Centril Centril deleted the rollup-llumsuo branch February 5, 2020 08:41
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