-
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
Restrict the Termination impls to simplify stabilization #48497
Conversation
/// This is ridiculously unstable, as it's a completely-punted-upon part | ||
/// of the `?`-in-`main` RFC. It's here only to allow experimenting with | ||
/// returning a code directly from main. It will definitely change | ||
/// drastically before being stabilized, if it doesn't just get deleted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. Maybe we should #[doc(hidden)]
it?
☔ The latest upstream changes (presumably #48510) made this pull request unmergeable. Please resolve the merge conflicts. |
48d957e
to
bc4d805
Compare
@nikomatsakis: Rebased atop #48143 |
Make a minimal commitment for stabilization. More impls are likely in future, but are not necessary at this time.
bc4d805
to
e20f7b2
Compare
@@ -1080,6 +1080,15 @@ impl fmt::Display for ExitStatus { | |||
} | |||
} | |||
|
|||
/// This is ridiculously unstable, as it's a completely-punted-upon part |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really care, but I feel like this is overstating the case. Specifying an exit code doesn't seem so "wild and crazy" to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not what I meant, but I can see what you mean after rereading. I'll make a follow-up PR weakening the language here.
I definitely agree that fn main() -> ExitCode
is valuable. I only intended the statement to be about the precise form of this type, since it's not B-RFC-Approved and thus even more subject to change than usual.
@bors r+ |
📌 Commit e20f7b2 has been approved by |
…n, r=nikomatsakis Restrict the Termination impls to simplify stabilization Make a minimal commitment in preparation for stabilization. More impls, or broader ones, are likely in future, but are not necessary at this time and are more controversial. cc rust-lang#48453 (comment) r? @nikomatsakis
…n, r=nikomatsakis Restrict the Termination impls to simplify stabilization Make a minimal commitment in preparation for stabilization. More impls, or broader ones, are likely in future, but are not necessary at this time and are more controversial. cc rust-lang#48453 (comment) r? @nikomatsakis
…crichton Better docs and associated SUCCESS/FAILURE for process::ExitCode Follow-up to rust-lang#48497 (comment), since that PR was the minimal thing to unblock rust-lang#48453 (comment). r? @nikomatsakis
I know this is pretty old but I'm surprised there is a hard-coded English word (»Error«) in the output implemented here. That's obviously pretty bad for every non-English use-case. |
Make a minimal commitment in preparation for stabilization. More impls, or broader ones, are likely in future, but are not necessary at this time and are more controversial.
cc #48453 (comment)
r? @nikomatsakis