slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.71k stars 614 forks source link

Incorrect `SampleComponent` docs #5742

Closed Enyium closed 3 months ago

Enyium commented 3 months ago

Your SampleComponent Rust docs suggest that generated components implement Send and Sync (as well as UnwindSafe and RefUnwindSafe). But when running cargo doc on my project with a .slint file, my struct MainWindow shows !Send, !Sync etc. under "Auto Trait Implementations".

PS: Weak being Send is correct, right?

tronical commented 3 months ago

Good catch, thanks for the report :).

Yes, Weak being Send is correct and intentional.