-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
proc
with a reference as an argument meets lifetime errors when inferring type
#14037
Labels
A-lifetimes
Area: Lifetimes / regions
Comments
My best attempt at reproduction still reproduces: fn main() {
let f = |: _| {};
let g: Box<FnMut(&())> = Box::new(f) as Box<FnMut(&())>;
}
|
Updated: fn main() {
let f = || {};
let g: Box<FnMut(&())> = Box::new(f) as Box<FnMut(&())>;
}
|
Closing in favor of #41078. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 13, 2023
Handle boolean scrutinees in match <-> if let replacement assists better
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changing the argument type to something that's not a reference (e.g. just
()
) works fine.cc @nikomatsakis @pnkfelix
The text was updated successfully, but these errors were encountered: