- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Remove -Zcgu-partitioning-strategy.
          #112053
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
  
    Remove -Zcgu-partitioning-strategy.
  
  #112053
              Conversation
-Zcpu-partitioning-strategy.-Zcgu-partitioning-strategy.
      This option was introduced three years ago, but it's never been meaningfully used, and `default` is the only acceptable value. Also, I think the `Partition` trait presents an interface that is too closely tied to the existing strategy and would probably be wrong for other strategies. (My rule of thumb is to not make something generic until there are at least two instances of it, to avoid this kind of problem.) Also, I don't think providing multiple partitioning strategies to the user is a good idea, because the compiler already has enough obscure knobs. This commit removes the option, along with the `Partition` trait, and the `Partitioner` and `DefaultPartitioning` types. I left the existing code in `compiler/rustc_monomorphize/src/partitioning/default.rs`, though I could be persuaded that moving it into `compiler/rustc_monomorphize/src/partitioning/mod.rs` is better.
Within `compiler/rustc_monomorphize/src/partitioning/`, because the previous commit removed the need for `default.rs` to be a separate file.
Because it's now the only file within `compiler/rustc_monomorphize/src/partitioning/`.
6feef6f    to
    5ed0149      
    Compare
  
    | I added more commits to merge  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nnethercote! I added these when I did have a few different implementations of the partitioning heuristic. I didn't bother to upstream any of them as I wasn't able to find any consistently better than the default one. Since nothing has really happened to take advantage of this since then, I agree we should just remove it.
I'm excited to see what improvements you're able to make here!
| @bors r+ rollup | 
…trategy, r=wesleywiser Remove `-Zcgu-partitioning-strategy`. This option was introduced three years ago, but it's never been meaningfully used, and `default` is the only acceptable value. Also, I think the `Partition` trait presents an interface that is too closely tied to the existing strategy and would probably be wrong for other strategies. (My rule of thumb is to not make something generic until there are at least two instances of it, to avoid this kind of problem.) Also, I don't think providing multiple partitioning strategies to the user is a good idea, because the compiler already has enough obscure knobs. This commit removes the option, along with the `Partition` trait, and the `Partitioner` and `DefaultPartitioning` types. I left the existing code in `compiler/rustc_monomorphize/src/partitioning/default.rs`, though I could be persuaded that moving it into `compiler/rustc_monomorphize/src/partitioning/mod.rs` is better. r? `@wesleywiser`
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#112031 (Migrate `item_proc_macro` to Askama) - rust-lang#112053 (Remove `-Zcgu-partitioning-strategy`.) - rust-lang#112069 (offset_of: don't require type to be `Sized`) - rust-lang#112084 (enhancements on build_helper utilization and rustdoc-gui-test) - rust-lang#112096 (Remove array_zip) - rust-lang#112108 (Fix re-export of doc hidden item inside private item not displayed) - rust-lang#112113 (rustdoc: simplify `clean` by removing `FnRetTy`) r? `@ghost` `@rustbot` modify labels: rollup
This became unused in rust-lang#112053, when `-Zcgu-partitioning-strategy` was removed.
This option was introduced three years ago, but it's never been meaningfully used, and
defaultis the only acceptable value.Also, I think the
Partitiontrait presents an interface that is too closely tied to the existing strategy and would probably be wrong for other strategies. (My rule of thumb is to not make something generic until there are at least two instances of it, to avoid this kind of problem.)Also, I don't think providing multiple partitioning strategies to the user is a good idea, because the compiler already has enough obscure knobs.
This commit removes the option, along with the
Partitiontrait, and thePartitionerandDefaultPartitioningtypes. I left the existing code incompiler/rustc_monomorphize/src/partitioning/default.rs, though I could be persuaded that moving it intocompiler/rustc_monomorphize/src/partitioning/mod.rsis better.r? @wesleywiser