【问题标题】:Why will Rust integer types be deprecated soon?为什么 Rust 整数类型会很快被弃用?
【发布时间】:2022-02-01 19:15:58
【问题描述】:

我注意到Rust std page 旁边的u8i8u16 等有一个弃用说明:

发生了什么,替换将是什么?

【问题讨论】:

    标签: rust integer deprecated standard-library


    【解决方案1】:

    类型本身并没有被弃用,只是命名为例如模块。 std::i8 包含常量。例如,std::i8::MIN 将被替换为 i8::MIN (docs)。弃用通知说:

    Deprecating in a future Rust version: all constants in this module replaced by associated constants on i8
    

    【讨论】:

    • 可能值得一提的是,被弃用的确切内容是名为 std::i8modules 等等,其中包含这些常量。
    猜你喜欢
    • 2020-04-22
    • 2021-12-01
    • 2019-09-18
    • 2022-01-18
    • 1970-01-01
    • 2018-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多