1. 21 9月, 2018 1 次提交
  2. 21 1月, 2015 1 次提交
    • A
      std: Rename Show/String to Debug/Display · 3cb9fa26
      Alex Crichton 提交于
      This commit is an implementation of [RFC 565][rfc] which is a stabilization of
      the `std::fmt` module and the implementations of various formatting traits.
      Specifically, the following changes were performed:
      
      [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md
      
      * The `Show` trait is now deprecated, it was renamed to `Debug`
      * The `String` trait is now deprecated, it was renamed to `Display`
      * Many `Debug` and `Display` implementations were audited in accordance with the
        RFC and audited implementations now have the `#[stable]` attribute
        * Integers and floats no longer print a suffix
        * Smart pointers no longer print details that they are a smart pointer
        * Paths with `Debug` are now quoted and escape characters
      * The `unwrap` methods on `Result` now require `Display` instead of `Debug`
      * The `Error` trait no longer has a `detail` method and now requires that
        `Display` must be implemented. With the loss of `String`, this has moved into
        libcore.
      * `impl<E: Error> FromError<E> for Box<Error>` now exists
      * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently
        warned about due to warnings being emitted on stage1+
      
      While backwards compatibility is attempted to be maintained with a blanket
      implementation of `Display` for the old `String` trait (and the same for
      `Show`/`Debug`) this is still a breaking change due to primitives no longer
      implementing `String` as well as modifications such as `unwrap` and the `Error`
      trait. Most code is fairly straightforward to update with a rename or tweaks of
      method calls.
      
      [breaking-change]
      Closes #21436
      3cb9fa26
  3. 07 1月, 2015 1 次提交
    • S
      core: split into fmt::Show and fmt::String · 44440e5c
      Sean McArthur 提交于
      fmt::Show is for debugging, and can and should be implemented for
      all public types. This trait is used with `{:?}` syntax. There still
      exists #[derive(Show)].
      
      fmt::String is for types that faithfully be represented as a String.
      Because of this, there is no way to derive fmt::String, all
      implementations must be purposeful. It is used by the default format
      syntax, `{}`.
      
      This will break most instances of `{}`, since that now requires the type
      to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the
      correct fix. Types that were being printed specifically for users should
      receive a fmt::String implementation to fix this.
      
      Part of #20013
      
      [breaking-change]
      44440e5c
  4. 02 1月, 2015 1 次提交
  5. 17 11月, 2014 1 次提交
    • S
      Switch to purely namespaced enums · 3dcd2157
      Steven Fackler 提交于
      This breaks code that referred to variant names in the same namespace as
      their enum. Reexport the variants in the old location or alter code to
      refer to the new locations:
      
      ```
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = A;
      }
      ```
      =>
      ```
      pub use self::Foo::{A, B};
      
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = A;
      }
      ```
      or
      ```
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = Foo::A;
      }
      ```
      
      [breaking-change]
      3dcd2157
  6. 16 10月, 2014 1 次提交
  7. 28 5月, 2014 3 次提交
    • A
      std: Remove format_strbuf!() · 42aed6bd
      Alex Crichton 提交于
      This was only ever a transitionary macro.
      42aed6bd
    • A
      Move std::{reflect,repr,Poly} to a libdebug crate · b53454e2
      Alex Crichton 提交于
      This commit moves reflection (as well as the {:?} format modifier) to a new
      libdebug crate, all of which is marked experimental.
      
      This is a breaking change because it now requires the debug crate to be
      explicitly linked if the :? format qualifier is used. This means that any code
      using this feature will have to add `extern crate debug;` to the top of the
      crate. Any code relying on reflection will also need to do this.
      
      Closes #12019
      
      [breaking-change]
      b53454e2
    • R
      std: Rename strbuf operations to string · 1f1b2e42
      Richo Healey 提交于
      [breaking-change]
      1f1b2e42
  8. 25 5月, 2014 1 次提交
  9. 15 5月, 2014 1 次提交
  10. 19 4月, 2014 1 次提交
  11. 01 10月, 2013 1 次提交
  12. 28 8月, 2013 1 次提交
  13. 19 5月, 2013 1 次提交
  14. 30 3月, 2013 1 次提交
  15. 08 3月, 2013 1 次提交
  16. 02 2月, 2013 1 次提交
  17. 11 12月, 2012 1 次提交
  18. 14 9月, 2012 1 次提交
  19. 24 8月, 2012 1 次提交
  20. 31 7月, 2012 1 次提交
  21. 14 7月, 2012 1 次提交
  22. 19 6月, 2012 1 次提交
  23. 20 1月, 2012 2 次提交
  24. 18 1月, 2012 1 次提交