Skip to content

Remove DeclareMethods - #76872

Merged
bors merged 1 commit into
rust-lang:masterfrom
khyperia:remove_declare_methods
Sep 21, 2020
Merged

Remove DeclareMethods#76872
bors merged 1 commit into
rust-lang:masterfrom
khyperia:remove_declare_methods

Conversation

@khyperia

Copy link
Copy Markdown
Member

Most of the DeclareMethods API was only used internally by rustc_codegen_llvm. As such, it makes no sense to require other backends to implement them.

(get_declared_value and declare_cfn were used, in one place, specific to the main symbol, which I've replaced with a more specialized function to allow more flexibility in implementation - the intent is that declare_c_main can go away once we do something more clever, e.g. @eddyb has ideas around having a MIR shim or somesuch we can explore in a follow-up PR)

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 18, 2020
@eddyb

Copy link
Copy Markdown
Contributor

@bors r+ Thanks!

@bors

bors commented Sep 18, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 0bc405e has been approved by eddyb

@borsbors 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 Sep 18, 2020
@petrochenkov

Copy link
Copy Markdown
Contributor

r? @eddyb

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…eddyb
Remove DeclareMethods
Most of the `DeclareMethods` API was only used internally by rustc_codegen_llvm. As such, it makes no sense to require other backends to implement them.
(`get_declared_value` and `declare_cfn` were used, in one place, specific to the `main` symbol, which I've replaced with a more specialized function to allow more flexibility in implementation - the intent is that `declare_c_main` can go away once we do something more clever, e.g. @eddyb has ideas around having a MIR shim or somesuch we can explore in a follow-up PR)
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…eddyb
Remove DeclareMethods
Most of the `DeclareMethods` API was only used internally by rustc_codegen_llvm. As such, it makes no sense to require other backends to implement them.
(`get_declared_value` and `declare_cfn` were used, in one place, specific to the `main` symbol, which I've replaced with a more specialized function to allow more flexibility in implementation - the intent is that `declare_c_main` can go away once we do something more clever, e.g. @eddyb has ideas around having a MIR shim or somesuch we can explore in a follow-up PR)
This was referenced Sep 19, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…eddyb
Remove DeclareMethods
Most of the `DeclareMethods` API was only used internally by rustc_codegen_llvm. As such, it makes no sense to require other backends to implement them.
(`get_declared_value` and `declare_cfn` were used, in one place, specific to the `main` symbol, which I've replaced with a more specialized function to allow more flexibility in implementation - the intent is that `declare_c_main` can go away once we do something more clever, e.g. @eddyb has ideas around having a MIR shim or somesuch we can explore in a follow-up PR)
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 21, 2020
…eddyb
Remove DeclareMethods
Most of the `DeclareMethods` API was only used internally by rustc_codegen_llvm. As such, it makes no sense to require other backends to implement them.
(`get_declared_value` and `declare_cfn` were used, in one place, specific to the `main` symbol, which I've replaced with a more specialized function to allow more flexibility in implementation - the intent is that `declare_c_main` can go away once we do something more clever, e.g. @eddyb has ideas around having a MIR shim or somesuch we can explore in a follow-up PR)
@RalfJungRalfJung mentioned this pull request Sep 21, 2020
@RalfJungRalfJung mentioned this pull request Sep 21, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 21, 2020
Rollup of 13 pull requests
Successful merges:
- rust-lang#76135 (Stabilize some Option methods as const)
- rust-lang#76628 (Add sample defaults for config.toml )
- rust-lang#76846 (Avoiding unnecesary allocations at rustc_errors)
- rust-lang#76867 (Use intra-doc links in core/src/iter when possible)
- rust-lang#76868 (Finish moving to intra doc links for std::sync)
- rust-lang#76872 (Remove DeclareMethods)
- rust-lang#76936 (Add non-`unsafe` `.get_mut()` for `Unsafecell`)
- rust-lang#76958 (Replace manual as_nanos and as_secs_f64 reimplementations)
- rust-lang#76959 (Replace write_fmt with write!)
- rust-lang#76961 (Add test for issue rust-lang#34634)
- rust-lang#76962 (Use const_cstr macro in consts.rs)
- rust-lang#76963 (Remove unused static_assert macro)
- rust-lang#77000 (update Miri)
Failed merges:
r? `@ghost`
@bors
bors merged commit 02d787b into rust-lang:masterSep 21, 2020
@rustbotrustbot added this to the 1.48.0 milestone Sep 21, 2020
@khyperia
khyperia deleted the remove_declare_methods branch October 23, 2022 10:46
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@khyperia@rust-highfive@eddyb@bors@petrochenkov@rustbot