Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2d213f7
Make ExitStatus an inhabited type on all platforms
ijackson Jan 3, 2023
23a5c0a
Mention style for new syntax in tracking issue template
compiler-errors Jul 11, 2023
72dd53c
add aarch64-unknown-teeos target
Sword-Destiny Jul 7, 2023
1f1d49a
impl Default for ExitStatus
ijackson Jan 3, 2023
f837c48
CFI: Fix error compiling core with LLVM CFI enabled
rcvalle Jul 11, 2023
a7132bf
interpret: remove incomplete protection against invalid where clauses
RalfJung Aug 8, 2023
da00356
prevent constant rebuilds of rustc-main (and thus everything else)
pietroalbini Aug 8, 2023
bcf7bfc
remove llvm-wrapper include to silence deprecation warning
lqd Aug 8, 2023
15d408c
Allow reimplementation of drops_elaborated query
Aug 8, 2023
ff574b7
tests: Uncomment now valid GAT code behind FIXME
Enselic Aug 6, 2023
0166092
Added comment on reason for method being public
Aug 8, 2023
95d1f6b
add test from chalk#788 for new solver
lcnr Aug 8, 2023
381ef83
Migrate GUI colors test to original CSS color format
GuillaumeGomez Aug 8, 2023
b355089
Rollup merge of #106425 - ijackson:exit-status-default, r=dtolnay
matthiaskrgr Aug 8, 2023
0887636
Rollup merge of #113480 - Sword-Destiny:master, r=petrochenkov
matthiaskrgr Aug 8, 2023
095619a
Rollup merge of #113586 - compiler-errors:style, r=joshtriplett
matthiaskrgr Aug 8, 2023
c097e48
Rollup merge of #113593 - rcvalle:rust-cfi-fix-90546, r=wesleywiser
matthiaskrgr Aug 8, 2023
54a9c2c
Rollup merge of #114612 - lqd:east-17-warning, r=nikic
matthiaskrgr Aug 8, 2023
4f82fb8
Rollup merge of #114613 - ferrocene:pa-fix-rebuild, r=lqd
matthiaskrgr Aug 8, 2023
5c5ae6c
Rollup merge of #114615 - RalfJung:interpret-invalid-where, r=lcnr
matthiaskrgr Aug 8, 2023
acf3791
Rollup merge of #114628 - cedihegi:master, r=oli-obk
matthiaskrgr Aug 8, 2023
61d7a4b
Rollup merge of #114629 - Enselic:uncomment-gat-code, r=compiler-errors
matthiaskrgr Aug 8, 2023
c84732c
Rollup merge of #114630 - GuillaumeGomez:migrate-gui-test-color-30, r…
matthiaskrgr Aug 8, 2023
a5e91ed
Rollup merge of #114631 - lcnr:chalk-cycle-test, r=compiler-errors
matthiaskrgr Aug 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Make ExitStatus an inhabited type on all platforms
Even where actually running processes is not supported.
Needed for the next commit.

The manual trait implementations now belong on ExitStatusError,
which still can't exist.
  • Loading branch information
ijackson committed Jan 3, 2023
commit 2d213f757d5305f4f6b585ac65bd960cb74b0b84
37 changes: 19 additions & 18 deletions library/std/src/sys/unsupported/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,58 +99,59 @@ impl fmt::Debug for Command {
}
}

pub struct ExitStatus(!);
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
#[non_exhaustive]
pub struct ExitStatus();

impl ExitStatus {
pub fn exit_ok(&self) -> Result<(), ExitStatusError> {
self.0
Ok(())
}

pub fn code(&self) -> Option<i32> {
self.0
Some(0)
}
}

impl Clone for ExitStatus {
fn clone(&self) -> ExitStatus {
self.0
impl fmt::Display for ExitStatus {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "<dummy exit status>")
}
}

impl Copy for ExitStatus {}
pub struct ExitStatusError(!);

impl PartialEq for ExitStatus {
fn eq(&self, _other: &ExitStatus) -> bool {
impl Clone for ExitStatusError {
fn clone(&self) -> ExitStatusError {
self.0
}
}

impl Eq for ExitStatus {}
impl Copy for ExitStatusError {}

impl fmt::Debug for ExitStatus {
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
impl PartialEq for ExitStatusError {
fn eq(&self, _other: &ExitStatusError) -> bool {
self.0
}
}

impl fmt::Display for ExitStatus {
impl Eq for ExitStatusError {}

impl fmt::Debug for ExitStatusError {
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0
}
}

#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub struct ExitStatusError(ExitStatus);

impl Into<ExitStatus> for ExitStatusError {
fn into(self) -> ExitStatus {
self.0.0
self.0
}
}

impl ExitStatusError {
pub fn code(self) -> Option<NonZeroI32> {
self.0.0
self.0
}
}

Expand Down