-
Notifications
You must be signed in to change notification settings - Fork 13.4k
librustc: Remove all uses of ~str
from librustc.
#14079
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
Conversation
This is a pretty big inflation in code size, which mostly seems to derive from |
It is better to proceed incrementally with large changes like this. Changing Transitionary bloat is nothing new and we have had lots of it in the past. |
We could (temporarily) introduce |
I agree with the incremental approach, but this doesn't seem very incremental when a huge amount will be reverted. There's a huge amount of calls to |
It is absolutely incremental. It is localizing the changes to rustc instead of everywhere that format is used. |
|
(If it wasn't clear, I was suggesting having both the current |
I guess I could do that. I'm not thrilled about having to redo most of a 3,000+-line transitionary patch for a few days of code cleanliness, but whatever. |
Despite my suggestion, I'm personally happy with just landing this as is. |
Changed to |
As a passing comment, this makes me think that we really may need a formatting tool because your style is far more verbose in terms of number of lines than the existing style. I don't have a preference either way, but I don't like to keep seeing all these changes to flip flop between two styles. |
Closing, subsumed by #14157 and this may help un-stuck bors. |
This PR fixes issues with the `missing_asserts_for_indexing` lint. - false positive when the first index is the highest(or equal) value in a list of indexes: ```rust pub fn foo(slice: &[i32]) -> i32{ slice[1] * slice[0] } ``` - false negative when an assert statement if found after the indexing operation. ```rust pub fn bar(slice: &[i32]) -> i32 { let product = slice[0] * slice[1]; assert!(slice.len() > 1); product } ``` examples: https://godbolt.org/z/s7Y47vKdE closes: rust-lang#14079 changelog: [`missing_asserts_for_indexing`]: ignore asserts found after indexing, and do not require asserts if the first index is highest.
r? @alexcrichton