We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
connect_self(|this: &mut C| ...)
1 parent ab02ad0 commit 6f3e671Copy full SHA for 6f3e671
itest/rust/src/builtin_tests/containers/signal_test.rs
@@ -96,8 +96,13 @@ fn signal_symbols_external() {
96
});
97
}
98
99
- // Self-modifying method.
100
- sig.connect_self(Emitter::self_receive);
+ // Self-modifying method. Have 2 branches just to ensure they compile.
+ if std::hint::black_box(true) {
101
+ sig.connect_self(Emitter::self_receive);
102
+ } else {
103
+ // Needs explicit type here.
104
+ sig.connect_self(|this: &mut Emitter, i| this.self_receive(i));
105
+ }
106
107
// Connect to other object.
108
let receiver = Receiver::new_alloc();
0 commit comments