Uh oh!
There was an error while loading. Please reload this page.
De-~[] std::path - #13481
Conversation
Same representation change performed with path::unix. This also implements BytesContainer for StrBuf & adds an (unsafe) method for viewing & mutating the raw byte vector of a StrBuf.
huonw
commented
Apr 12, 2014
(I'd forgot to do |
There was a problem hiding this comment.
Is there going to be syntax sugar (read overloading operator[]) for Vec types?
hatahet
commented
Apr 13, 2014
Sorry for the spam. So is the consensus now to use |
huonw
commented
Apr 13, 2014
For types like There has not yet been a decision on library functions returning |
hatahet
commented
Apr 13, 2014
Thanks for the insight. :) |
Remove the use of ~[] from Path's internals.
Switch to upstream `positionEncoding` Closesrust-lang#13481 This drops support for the custom extension, but that's probably fine. Draft because it's not tested yet.
Don't warn on proc macro generated code in `needless_return` Fixesrust-lang#13458Fixesrust-lang#13457Fixesrust-lang#13467Fixesrust-lang#13479Fixesrust-lang#13481Fixesrust-lang#13526Fixesrust-lang#13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
Don't warn on proc macro generated code in `needless_return` Fixesrust-lang#13458Fixesrust-lang#13457Fixesrust-lang#13467Fixesrust-lang#13479Fixesrust-lang#13481Fixesrust-lang#13526Fixesrust-lang#13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
Don't warn on proc macro generated code in `needless_return` Fixesrust-lang#13458Fixesrust-lang#13457Fixesrust-lang#13467Fixesrust-lang#13479Fixesrust-lang#13481Fixesrust-lang#13526Fixesrust-lang#13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
Don't warn on proc macro generated code in `needless_return` Fixesrust-lang#13458Fixesrust-lang#13457Fixesrust-lang#13467Fixesrust-lang#13479Fixesrust-lang#13481Fixesrust-lang#13526Fixesrust-lang#13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
Remove the use of ~[] from Path's internals.