-
Notifications
You must be signed in to change notification settings - Fork 883
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
rustfmt gets upset when trying to format a let-else block inside a macro. #5760
Comments
Thanks for reaching out. This is a duplicate of #5503. The reason for the infinite indentation is that we haven't landed support for In the meantime you might want to use #[rusfmt::skip]
#[macro_export]
macro_rules! from_cstr {
($x:expr) => {{
use std::ffi::CStr;
let c_str = unsafe { CStr::from_ptr($x) };
let Ok(c_str) = c_str.to_str() else {
return null!();
};
c_str
}};
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This what rustfmt produces when I run the code formatting
The text was updated successfully, but these errors were encountered: