Skip to content

Conversation

@Enselic
Copy link
Member

@Enselic Enselic commented Jun 25, 2022

So we can more easily re-use the code for other attributes later. More specifically #[unix_sigpipe]. This refactoring is covered by this test:

//~^ ERROR: `start` attribute can only be used on functions

(Well, only #[start], but the code for #[rustc_main] is identical.)

So we can re-use the code for other attributes later.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 25, 2022
@rust-highfive
Copy link
Contributor

r? @compiler-errors

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 25, 2022
@Enselic Enselic changed the title rustc_passes: De-duplicate more code with fn throw_attr_err() rustc_passes/src/entry.rs: De-duplicate more code with fn throw_attr_err() Jun 26, 2022
@Enselic Enselic mentioned this pull request Jun 30, 2022
23 tasks
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 4, 2022

📌 Commit 4731d4b has been approved by compiler-errors

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 4, 2022
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#98501 (rustc_passes/src/entry.rs: De-duplicate more code with `fn throw_attr_err()`)
 - rust-lang#98774 (rustdoc: make source sidebar toggle a real button)
 - rust-lang#98806 (Fix long declaration trailing whitespace)
 - rust-lang#98823 (Fix rust-call ICE in mir-inliner)
 - rust-lang#98870 (Add regression test for rust-lang#86784)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7352c7b into rust-lang:master Jul 4, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 4, 2022
@Enselic Enselic deleted the err_if_attr_found branch July 4, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants