-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove the difference between .rc and .rs files #2176
Comments
We'd need some new place where we put:
If we can work through all those then I agree there might be a way to do this. But crate files do different things than source files at the moment (and have more planned), so we need workalikes for all those "different things" in source files. I do not want to lose the general flavour of the compilation model (one input file, self-describing builds, etc.) though I can see a benefit to this: it'd make splitting and combining crates much less of a chore. |
Linkage metadata can already go into the companion mod - their attributes are merged. Reading mods from external files is easy to implement and is (I think) the only difference between .rc and .rs files currently. Not sure about the other points. |
Fair enough. I'd be amenable to such a change then. Particularly if we decide on a thought-out approach to #2159 in the sense of a smallest-unit-of-text at the top of a file that we can parse and interpret, to look for an indication of which version of the language to compile with. Either version guarding or feature guarding or something. That's the crucial bit in terms of phased compilation, I think. |
In talking about metadata at the top of a source file, #1772 could be related as well. |
done |
rename test suite directories Fixes rust-lang/miri#2154
This distinction seems to be confusing for newcomers and there is very little practical difference between the two. This would also help eliminate some of the confusing behavior of crate companion mods (#1277).
We would still need a way to signal to cargo which file is the crate file, so we could either keep the .rc extension (having it be the same as .rs), have it scan .rs files for a specific attribute, or add it to the cargo manifest.
The text was updated successfully, but these errors were encountered: