Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMove use of 'default fn' to its own module #161
Conversation
|
Can you elaborate? Why is it the right way, or better than the current code? This moves one of the specialized functions to its own module, but not the rest, so now you need to look at two different files that interact with each other. |
The way this is encoded right now assumes that rustc's parser will always be able to parse |
|
That seems like a pretty common footgun, isn't it? Is that something that rustc should warn about somehow? |
|
Not that common I think but I'm working on doing more pre-expansion gating so you don't get into this situation in most cases. |
|
I guess I can't stamp it, though not in love with this :) |
|
@bors-servo r+ |
|
|
Move use of 'default fn' to its own module This is the proper way to do `cfg(...)` gating when dealing with an unstable feature that introduces syntax. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/161) <!-- Reviewable:end -->
|
|
Centril commentedAug 20, 2019
•
edited by larsbergstrom
This is the proper way to do
cfg(...)gating when dealing with an unstable feature that introduces syntax.This change is