mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 10:05:06 +03:00
7352c7b6cd
rustc_passes/src/entry.rs: De-duplicate more code with `fn throw_attr_err()` So we can more easily re-use the code for other attributes later. More specifically [`#[unix_sigpipe]`](https://github.com/rust-lang/rust/pull/97802). This refactoring is covered by this test: https://github.com/rust-lang/rust/blob/8aab472d52ba7314dc193c73abcd384e2586123c/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs#L120 (Well, only `#[start]`, but the code for `#[rustc_main]` is identical.)