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

Expose non-impl-Trait iterator return types #1719

Merged
merged 4 commits into from
Aug 11, 2024
Merged

Expose non-impl-Trait iterator return types #1719

merged 4 commits into from
Aug 11, 2024

Commits on Aug 11, 2024

  1. Configuration menu
    Copy the full SHA
    65ec30d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    857942e View commit details
    Browse the repository at this point in the history
  3. Add regression test for issue 1718

        error[E0502]: cannot borrow `generics.params` as mutable because it is also borrowed as immutable
          --> tests/test_iterators.rs:81:25
           |
        77 |       let _ = generics
           |               --------
           |               |
           |  _____________immutable borrow occurs here
           | |
        78 | |         .lifetimes()
           | |____________________- a temporary with access to the immutable borrow is created here ...
        ...
        81 |           .unwrap_or_else(|| {
           |                           ^^ mutable borrow occurs here
        82 |               let lifetime: Lifetime = parse_quote!('a);
        83 |               generics.params.insert(
           |               --------------- second borrow occurs due to use of `generics.params` in closure
        ...
        88 |           });
           |             - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator<Item = &LifetimeParam>`
    dtolnay committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    7dc05a5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2955ac5 View commit details
    Browse the repository at this point in the history