Skip to content

Conversation

@ealmloff
Copy link
Member

Rc generational boxes were using the box borrow info instead of the resolved borrow info which causes the borrow list to be empty.

This PR fixes that issue by resolving the pointer first then getting the borrow guard. It fixes the error message for this example:

use dioxus::prelude::*;

fn main() {
    dioxus::launch(app);
}

fn app() -> Element {
    let mut count = use_signal(|| 0);
    let foo = count.write_unchecked();
    let bar = count.read_unchecked();

    rsx! {
        h1 { "High-Five counter: {count}" }
        button { onclick: move |_| count += 1, "Up high!" }
        button { onclick: move |_| count -= 1, "Down low!" }
    }
}

@ealmloff ealmloff requested a review from a team as a code owner August 20, 2025 14:41
@ealmloff ealmloff added bug Something isn't working generation box Related to the generational box crate labels Aug 20, 2025
@jkelleyrtp jkelleyrtp merged commit f95d8e4 into DioxusLabs:main Aug 20, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working generation box Related to the generational box crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants