Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dtolnay/async-trait
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.1.61
Choose a base ref
...
head repository: dtolnay/async-trait
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.1.63
Choose a head ref
  • 11 commits
  • 6 files changed
  • 1 contributor

Commits on Jan 20, 2023

  1. Configuration menu
    Copy the full SHA
    8206008 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b4c19da View commit details
    Browse the repository at this point in the history
  3. Merge pull request #230 from dtolnay/definedhere

    Improve spans of named lifetimes generated from elided lifetimes
    dtolnay authored Jan 20, 2023
    Configuration menu
    Copy the full SHA
    861b6bc View commit details
    Browse the repository at this point in the history
  4. Release 0.1.62

    dtolnay committed Jan 20, 2023
    Configuration menu
    Copy the full SHA
    d71c74d View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2023

  1. Add regression test for issue 232

    Currently fails to compile:
    
        error: future cannot be sent between threads safely
            --> tests/test.rs:1506:41
             |
        1506 |         async fn take_ref(&self, _: &T) {}
             |                                         ^^ future created by async block is not `Send`
             |
        note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
            --> tests/test.rs:1506:34
             |
        1504 |     #[async_trait]
             |     -------------- in this procedural macro expansion
        1505 |     impl<T> Generic<T> for One {
        1506 |         async fn take_ref(&self, _: &T) {}
             |                                  ^ has type `&T` which is not `Send`, because `T` is not `Sync`
             = note: required for the cast from `[async block@tests/test.rs:1506:41: 1506:43]` to the object type `dyn futures::Future<Output = ()> + std::marker::Send`
             = note: this error originates in the attribute macro `async_trait` (in Nightly builds, run with -Z macro-backtrace for more info)
        help: consider restricting type parameter `T`
             |
        1505 |     impl<T: std::marker::Sync> Generic<T> for One {
             |           +++++++++++++++++++
    
        error[E0277]: `T` cannot be shared between threads safely
            --> tests/test.rs:1523:60
             |
        1523 |         async fn take_ref(&self, (_a, _b, _c): &(T, T, T)) {}
             |                                                            ^^ `T` cannot be shared between threads safely
             |
             = note: required because it appears within the type `(T, T, T)`
             = note: required for `&(T, T, T)` to implement `std::marker::Send`
        note: required because it's used within this `async` block
            --> tests/test.rs:1523:60
             |
        1523 |         async fn take_ref(&self, (_a, _b, _c): &(T, T, T)) {}
             |                                                            ^^
             = note: required for the cast from `[async block@tests/test.rs:1523:60: 1523:62]` to the object type `dyn futures::Future<Output = ()> + std::marker::Send`
        help: consider restricting type parameter `T`
             |
        1522 |     impl<T: std::marker::Sync> Generic<(T, T, T)> for Three {
             |           +++++++++++++++++++
    dtolnay committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    70bf4b0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ba93025 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #233 from dtolnay/reference

    Bypass Sync bound implied by non-existent drop of reference
    dtolnay authored Jan 22, 2023
    Configuration menu
    Copy the full SHA
    125917f View commit details
    Browse the repository at this point in the history
  4. Add regression test for issue 234

    Currently fails to compile:
    
        error: changes to closure capture in Rust 2021 will affect drop order
            --> tests/test.rs:1549:59
             |
        1549 |         async fn f(Tuple(_, _int): Tuple<Droppable, i32>) {}
             |                    --------------                         ^-
             |                    |                                       |
             |                    |                                       in Rust 2018, `__arg0` is dropped here, but in Rust 2021, only `__arg0.1` will be dropped here as part of the closure
             |                    in Rust 2018, this closure captures all of `__arg0`, but in Rust 2021, it will only capture `__arg0.1`
             |
             = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
        note: the lint level is defined here
            --> tests/test.rs:5:9
             |
        5    | #![deny(rust_2021_compatibility)]
             |         ^^^^^^^^^^^^^^^^^^^^^^^
             = note: `#[deny(rust_2021_incompatible_closure_captures)]` implied by `#[deny(rust_2021_compatibility)]`
        help: add a dummy let to cause `__arg0` to be fully captured
             |
        1549 |         async fn f(Tuple(_, _int): Tuple<Droppable, i32>) { let _ = &__arg0;}
             |                                                             ++++++++++++++++
    
        error: changes to closure capture in Rust 2021 will affect drop order
            --> tests/test.rs:1556:66
             |
        1556 |         async fn f(Tuple { 1: _int, .. }: Tuple<Droppable, i32>) {}
             |                    ---------------------                         ^-
             |                    |                                              |
             |                    |                                              in Rust 2018, `__arg0` is dropped here, but in Rust 2021, only `__arg0.1` will be dropped here as part of the closure
             |                    in Rust 2018, this closure captures all of `__arg0`, but in Rust 2021, it will only capture `__arg0.1`
             |
             = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
        help: add a dummy let to cause `__arg0` to be fully captured
             |
        1556 |         async fn f(Tuple { 1: _int, .. }: Tuple<Droppable, i32>) { let _ = &__arg0;}
             |                                                                    ++++++++++++++++
    dtolnay committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    80a9c2c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1c2e90a View commit details
    Browse the repository at this point in the history
  6. Merge pull request #235 from dtolnay/patterns

    Make expansion of nested `_` and `..` patterns edition independent
    dtolnay authored Jan 22, 2023
    Configuration menu
    Copy the full SHA
    f88c287 View commit details
    Browse the repository at this point in the history
  7. Release 0.1.63

    dtolnay committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    36bcff4 View commit details
    Browse the repository at this point in the history
Loading