-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Borrow checker's strange error. #57404
Comments
Reduced example #![feature(unboxed_closures)]
#![feature(fn_traits)]
fn main() {
let handlers: Option<Box<dyn for<'a> FnMut<&'a mut (), Output=()>>> = None;
handlers.unwrap().as_mut().call_mut(&mut ());
} |
|
This comment has been minimized.
This comment has been minimized.
The first compilation error -- the example with Maybe the actual bug is that Your reduced example is actually different since it actually does not involve static data. It seems to be the same bug as in #22565, and hence is a bug with the Going from |
Fixed by #99943 |
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#105835 (Refactor post borrowck cleanup passes) - rust-lang#105930 (Disable `NormalizeArrayLen`) - rust-lang#105938 (Update coerce_unsized tracking issue from rust-lang#27732 to rust-lang#18598) - rust-lang#105939 (Improve description of struct-fields GUI test) - rust-lang#105943 (Add regression test for rust-lang#102206) - rust-lang#105944 (Add regression test for rust-lang#80816) - rust-lang#105945 (Add regression test for rust-lang#57404) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The text was updated successfully, but these errors were encountered: