-
Notifications
You must be signed in to change notification settings - Fork 888
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
Change default for use_try_shorthand
to true?
#4205
Comments
Sounds good to me. |
Ah, sorry, I thought that the option is unstable, but it's already stabilized. In that case, I would rather keep the current behavior. Thank you for your suggestion, but we will close this as won't fix. |
That's why I'd suggested it as a possible change for 2.0, as I presume breaking changes are fine then? |
Looks like I'm not able to reopen this to address the previous point. @topecongiro can it please be addressed? |
Sorry for the late reply. As you mentioned, it is possible to add breaking changes to 2.0 release (in fact, we are planning to make quite a few numbers of breaking changes). I've reconsidered changing the default value of There are mainly two reasons. One is that I would like to minimize the possibility of breaking the code or changing the semantic of the code when using the default configuration option. In this regard, converting the macro_rules! try {
($val:expr) => {
println!("{:?}", $val);
}
}
fn main() -> std::io::Result<()> {
try!("hello, world");
Ok(())
} I understand that the code like this does not appear in practice, though I would like to be conservative here. Also, I think that converting Again, I wholeheartedly thank you for your comment and willingness to improve rustfmt. Your comment allowed me to rethink about this config option. |
Given that the
try!
macro has been deprecated since rustc 1.39.0 (~6 months ago), would it make sense to change the default for this totrue
? I see there's a 2.0 release upcoming — perhaps that's a decent time to make the change?The text was updated successfully, but these errors were encountered: