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

Chained mutable borrows broken as of v0.18 #100

Open
main-- opened this issue Sep 5, 2023 · 0 comments
Open

Chained mutable borrows broken as of v0.18 #100

main-- opened this issue Sep 5, 2023 · 0 comments

Comments

@main--
Copy link

main-- commented Sep 5, 2023

This works in v0.17.2:

#[ouroboros::self_referencing]
struct Test {
    a: i32,
    #[borrows(mut a)]
    b: &'this i32,
    #[borrows(mut b)]
    c: &'this i32,
}

but in v0.18 it gives the following error:

error[E0392]: parameter `'this1` is never used
 --> src/lib.rs:1:1
  |
1 | #[ouroboros::self_referencing]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused parameter
  |
  = help: consider removing `'this1`, referring to it in a field, or using a marker such as `PhantomData`
  = note: this error originates in the attribute macro `ouroboros::self_referencing` (in Nightly builds, run with -Z macro-backtrace for more info)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant