diff options
| author | Martin Nordholts <enselic@gmail.com> | 2022-07-05 19:56:22 +0200 |
|---|---|---|
| committer | Martin Nordholts <enselic@gmail.com> | 2022-08-28 19:46:45 +0200 |
| commit | ddee45e1d7fd34563c13513d974f792fae41a2f7 (patch) | |
| tree | 680a1cbbe412897e2a0acae57e93d6ffe09a07cd /compiler/rustc_monomorphize | |
| parent | ee285eab69d515114ed54a8e6c25e359acd6b684 (diff) | |
| download | rust-ddee45e1d7fd34563c13513d974f792fae41a2f7.tar.gz rust-ddee45e1d7fd34563c13513d974f792fae41a2f7.zip | |
Support `#[unix_sigpipe = "inherit|sig_dfl|sig_ign"]` on `fn main()`
This makes it possible to instruct libstd to never touch the signal handler for `SIGPIPE`, which makes programs pipeable by default (e.g. with `./your-program | head -n 1`) without `ErrorKind::BrokenPipe` errors.
Diffstat (limited to 'compiler/rustc_monomorphize')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 82ef16a7f72..fceca58530c 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -1315,7 +1315,7 @@ impl<'v> RootCollector<'_, 'v> { /// the return type of `main`. This is not needed when /// the user writes their own `start` manually. fn push_extra_entry_roots(&mut self) { - let Some((main_def_id, EntryFnType::Main)) = self.entry_fn else { + let Some((main_def_id, EntryFnType::Main { .. })) = self.entry_fn else { return; }; |
