-
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
libsyntax: update helper to stringify TyU* and TyI* to take value presence into account. #13452
Conversation
@@ -131,9 +131,9 @@ pub fn is_path(e: @Expr) -> bool { | |||
return match e.node { ExprPath(_) => true, _ => false }; | |||
} | |||
|
|||
pub fn int_ty_to_str(t: IntTy) -> ~str { | |||
pub fn int_ty_to_str(t: IntTy, v: bool) -> ~str { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is v
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True if you're going to print it alongside a value, false if not.
e.g. we want 7u8 but not 7uint
Want a doc, or a better name? I guess an Option param would be clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A doc & a better name would be nice. :)
Could also be an enum like enum IntStrFormat { IntStrValue, IntStrType }
.
Removed |
Looks good to me! Could you squash the two commits together? |
…unt having a value. Fixes rust-lang#13359.
@alexcrichton done. |
…saturating, r=Veykril add wrapping/checked/saturating assist This addresses rust-lang#13452 I'm not sure about the structure of the code. I'm not sure if it needs to be 3 separate assists, and if that means it needs to be in 3 separate files as well. Most of the logic is in `util.rs`, which feels funny to me, but there seems to be a pattern of 1 assist per file, and this seems better than duplicating the logic. Let me know if anything needs changes 😁
`invalid_null_ptr_usage`: fix false positives for `std::ptr::slice_from_raw_parts` functions fixes rust-lang#13445 changelog: [`invalid_null_ptr_usage`]: fix false positives for `std::ptr::slice_from_raw_parts` functions
…rednet Use correct std/core prefix in lint output changelog: none I was waiting for rust-lang#13452 to be merged before sending this one. `std` is used instead of `core` when appropriate in messages.
Fixes #13359.