File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ #![feature(unboxed_closures)]
2+ #![feature(fn_traits)]
3+
4+ fn main() {
5+ let handlers: Option<Box<dyn for<'a> FnMut<&'a mut (), Output=()>>> = None;
6+ handlers.unwrap().as_mut().call_mut(&mut ()); //~ ERROR: `&mut ()` is not a tuple
7+ }
Original file line number Diff line number Diff line change 1+ error[E0277]: `&mut ()` is not a tuple
2+ --> $DIR/issue-57404.rs:6:41
3+ |
4+ LL | handlers.unwrap().as_mut().call_mut(&mut ());
5+ | -------- -^^^^^^
6+ | | |
7+ | | the trait `Tuple` is not implemented for `&mut ()`
8+ | | help: consider removing the leading `&`-reference
9+ | required by a bound introduced by this call
10+ |
11+ note: required by a bound in `call_mut`
12+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
13+
14+ error: aborting due to previous error
15+
16+ For more information about this error, try `rustc --explain E0277`.
You can’t perform that action at this time.
0 commit comments