-
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
Tracking issue for Allow a re-export for main
(RFC 1260)
#28937
Comments
Triage: no change. |
bombless@3d891e7 |
This RFC was implemented in #84401. |
…enkov Implement RFC 1260 with feature_name `imported_main`. This is the second extraction part of rust-lang#84062 plus additional adjustments. This (mostly) implements RFC 1260. However there's still one test case failure in the extern crate case. Maybe `LocalDefId` doesn't work here? I'm not sure. cc rust-lang#28937 r? `@petrochenkov`
#84401 has landed. Want to say thank you to @petrochenkov for your patient mentoring! There's a small piece of codegen changes to support foreign crate imported |
Implement RFC 1260 with feature_name `imported_main`. This is the second extraction part of #84062 plus additional adjustments. This (mostly) implements RFC 1260. However there's still one test case failure in the extern crate case. Maybe `LocalDefId` doesn't work here? I'm not sure. cc rust-lang/rust#28937 r? `@petrochenkov`
…per, r=nagisa Add primary marker on codegen unit and generate main wrapper on primary codegen. This is the codegen part of changes extracted from rust-lang#84062. This add a marker called `primary` on each codegen units, where exactly one codegen unit will be `primary = true` at a time. This specific codegen unit will take charge of generating `main` wrapper when `main` is imported from a foreign crate after the implementation of RFC 1260. cc rust-lang#28937 I'm not sure who should i ask for review for codegen changes, so feel free to reassign. r? `@nagisa`
…r, r=nagisa Add primary marker on codegen unit and generate main wrapper on primary codegen. This is the codegen part of changes extracted from rust-lang#84062. This add a marker called `primary` on each codegen units, where exactly one codegen unit will be `primary = true` at a time. This specific codegen unit will take charge of generating `main` wrapper when `main` is imported from a foreign crate after the implementation of RFC 1260. cc rust-lang#28937 I'm not sure who should i ask for review for codegen changes, so feel free to reassign. r? `@nagisa`
#84507 has landed and this rfc is now fully implemented. |
@crlf0710 What's the current state of this? Are people using it successfully? Is it a potential candidate for stabilization? |
@joshtriplett It's fully implemented, and the tests pass. There're no known technical limitations, but I'm not aware whether there're people using it today in nightly builds. I think it's a potential candidate for stablization. |
I think this should be stabilized. Stabilization ReportSummaryThe pub mod foo {
pub fn bar() {
println!("Hello, world!");
}
}
use foo::bar as main; Tests/Edge CasesThe feature is tested in Documentation PRs
|
@rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
… r=lcnr Stabilize `imported_main` FCP: rust-lang#28937 (comment) Docs: rust-lang/reference#1461
… r=lcnr Stabilize `imported_main` FCP: rust-lang#28937 (comment) Docs: rust-lang/reference#1461
… r=lcnr Stabilize `imported_main` FCP: rust-lang#28937 (comment) Docs: rust-lang/reference#1461
Rollup merge of rust-lang#122060 - clubby789:stabilize-imported-main, r=lcnr Stabilize `imported_main` FCP: rust-lang#28937 (comment) Docs: rust-lang/reference#1461
I guess we can close it now? |
Stabilize `imported_main` FCP: rust-lang/rust#28937 (comment) Docs: rust-lang/reference#1461
Closed by #122060 |
RFC Thread:
rust-lang/rfcs#1260
Feature name:
imported_main
Steps / History
imported_main
. #84401)main
(RFC 1260) #28937 (comment))imported_main
#122060)The text was updated successfully, but these errors were encountered: