1. 05 3月, 2015 2 次提交
  2. 04 3月, 2015 1 次提交
  3. 01 3月, 2015 1 次提交
  4. 28 2月, 2015 1 次提交
    • A
      std: Stabilize the `env` module · ad148919
      Alex Crichton 提交于
      Now that the `std::env` module has had some time to bake this commit marks most
      of its APIs as `#[stable]`. Some notable APIs that are **not** stable (and still
      use the same `env` feature gate) are:
      
      * `{set,get}_exit_status` - there are still questions about whether this is the
        right interface for setting/getting the exit status of a process.
      * `page_size` - this may change location in the future or perhaps name as well.
      
      This also effectively closes #22122 as the variants of `VarError` are
      `#[stable]` now. (this is done intentionally)
      ad148919
  5. 27 2月, 2015 1 次提交
  6. 19 2月, 2015 2 次提交
    • N
      9ea84aee
    • A
      std: Stabilize the `hash` module · f83e23ad
      Alex Crichton 提交于
      This commit is an implementation of [RFC 823][rfc] which is another pass over
      the `std::hash` module for stabilization. The contents of the module were not
      entirely marked stable, but some portions which remained quite similar to the
      previous incarnation are now marked `#[stable]`. Specifically:
      
      [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md
      
      * `std::hash` is now stable (the name)
      * `Hash` is now stable
      * `Hash::hash` is now stable
      * `Hasher` is now stable
      * `SipHasher` is now stable
      * `SipHasher::new` and `new_with_keys` are now stable
      * `Hasher for SipHasher` is now stable
      * Many `Hash` implementations are now stable
      
      All other portions of the `hash` module remain `#[unstable]` as they are less
      commonly used and were recently redesigned.
      
      This commit is a breaking change due to the modifications to the `std::hash` API
      and more details can be found on the [RFC][rfc].
      
      Closes #22467
      [breaking-change]
      f83e23ad
  7. 18 2月, 2015 4 次提交
  8. 15 2月, 2015 1 次提交
  9. 12 2月, 2015 3 次提交
    • A
      Test fixes and rebase conflicts · 315730fb
      Alex Crichton 提交于
      315730fb
    • A
      std: Tweak the std::env OsString/String interface · a828e794
      Alex Crichton 提交于
      This commit tweaks the interface of the `std::env` module to make it more
      ergonomic for common usage:
      
      * `env::var` was renamed to `env::var_os`
      * `env::var_string` was renamed to `env::var`
      * `env::args` was renamed to `env::args_os`
      * `env::args` was re-added as a panicking iterator over string values
      * `env::vars` was renamed to `env::vars_os`
      * `env::vars` was re-added as a panicking iterator over string values.
      
      This should make common usage (e.g. unicode values everywhere) more ergonomic
      as well as "the default". This is also a breaking change due to the differences
      of what's yielded from each of these functions, but migration should be fairly
      easy as the defaults operate over `String` which is a common type to use.
      
      [breaking-change]
      a828e794
    • A
      rustc: Fix a number of stability lint holes · bbbb571f
      Alex Crichton 提交于
      There are a number of holes that the stability lint did not previously cover,
      including:
      
      * Types
      * Bounds on type parameters on functions and impls
      * Where clauses
      * Imports
      * Patterns (structs and enums)
      
      These holes have all been fixed by overriding the `visit_path` function on the
      AST visitor instead of a few specialized cases. This change also necessitated a
      few stability changes:
      
      * The `collections::fmt` module is now stable (it was already supposed to be).
      * The `thread_local::imp::Key` type is now stable (it was already supposed to
        be).
      * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable.
        These are required via the `panic!` macro.
      * The `std::old_io::stdio::{println, println_args}` functions are now stable.
        These are required by the `print!` and `println!` macros.
      * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to
        make bounds with these traits stable. Note that manual implementations of
        these traits are still gated by default, this stability only allows bounds
        such as `F: FnOnce()`.
      
      Additionally, the compiler now has special logic to ignore its own generated
      `__test` module for the `--test` harness in terms of stability.
      
      Closes #8962
      Closes #16360
      Closes #20327
      
      [breaking-change]
      bbbb571f
  10. 06 2月, 2015 1 次提交
  11. 03 2月, 2015 5 次提交
  12. 02 2月, 2015 2 次提交
    • M
      Fix stale doc link (guide -> book) · 8d57f8c0
      Manish Goregaokar 提交于
      8d57f8c0
    • A
      std: Add a new `env` module · 70ed3a48
      Alex Crichton 提交于
      This is an implementation of [RFC 578][rfc] which adds a new `std::env` module
      to replace most of the functionality in the current `std::os` module. More
      details can be found in the RFC itself, but as a summary the following methods
      have all been deprecated:
      
      [rfc]: https://github.com/rust-lang/rfcs/pull/578
      
      * `os::args_as_bytes`   => `env::args`
      * `os::args`            => `env::args`
      * `os::consts`          => `env::consts`
      * `os::dll_filename`    => no replacement, use `env::consts` directly
      * `os::page_size`       => `env::page_size`
      * `os::make_absolute`   => use `env::current_dir` + `join` instead
      * `os::getcwd`          => `env::current_dir`
      * `os::change_dir`      => `env::set_current_dir`
      * `os::homedir`         => `env::home_dir`
      * `os::tmpdir`          => `env::temp_dir`
      * `os::join_paths`      => `env::join_paths`
      * `os::split_paths`     => `env::split_paths`
      * `os::self_exe_name`   => `env::current_exe`
      * `os::self_exe_path`   => use `env::current_exe` + `pop`
      * `os::set_exit_status` => `env::set_exit_status`
      * `os::get_exit_status` => `env::get_exit_status`
      * `os::env`             => `env::vars`
      * `os::env_as_bytes`    => `env::vars`
      * `os::getenv`          => `env::var` or `env::var_string`
      * `os::getenv_as_bytes` => `env::var`
      * `os::setenv`          => `env::set_var`
      * `os::unsetenv`        => `env::remove_var`
      
      Many function signatures have also been tweaked for various purposes, but the
      main changes were:
      
      * `Vec`-returning APIs now all return iterators instead
      * All APIs are now centered around `OsString` instead of `Vec<u8>` or `String`.
        There is currently on convenience API, `env::var_string`, which can be used to
        get the value of an environment variable as a unicode `String`.
      
      All old APIs are `#[deprecated]` in-place and will remain for some time to allow
      for migrations. The semantics of the APIs have been tweaked slightly with regard
      to dealing with invalid unicode (panic instead of replacement).
      
      The new `std::env` module is all contained within the `env` feature, so crates
      must add the following to access the new APIs:
      
          #![feature(env)]
      
      [breaking-change]
      70ed3a48
  13. 31 1月, 2015 2 次提交
    • A
      Test fixes and rebase conflicts · 3a2530d6
      Alex Crichton 提交于
      Also some tidying up of a bunch of crate attributes
      3a2530d6
    • A
      std: Stabilize FromStr and parse · 0cdde6e5
      Alex Crichton 提交于
      This commits adds an associated type to the `FromStr` trait representing an
      error payload for parses which do not succeed. The previous return value,
      `Option<Self>` did not allow for this form of payload. After the associated type
      was added, the following attributes were applied:
      
      * `FromStr` is now stable
      * `FromStr::Err` is now stable
      * `FromStr::from_str` is now stable
      * `StrExt::parse` is now stable
      * `FromStr for bool` is now stable
      * `FromStr for $float` is now stable
      * `FromStr for $integral` is now stable
      * Errors returned from stable `FromStr` implementations are stable
      * Errors implement `Display` and `Error` (both impl blocks being `#[stable]`)
      
      Closes #15138
      0cdde6e5
  14. 30 1月, 2015 2 次提交
  15. 29 1月, 2015 2 次提交
  16. 28 1月, 2015 1 次提交
  17. 27 1月, 2015 2 次提交
    • A
      std: Rename Writer::write to Writer::write_all · 5d836cdf
      Alex Crichton 提交于
      In preparation for upcoming changes to the `Writer` trait (soon to be called
      `Write`) this commit renames the current `write` method to `write_all` to match
      the semantics of the upcoming `write_all` method. The `write` method will be
      repurposed to return a `usize` indicating how much data was written which
      differs from the current `write` semantics. In order to head off as much
      unintended breakage as possible, the method is being deprecated now in favor of
      a new name.
      
      [breaking-change]
      5d836cdf
    • A
      Fallout of io => old_io · 3a07f859
      Alex Crichton 提交于
      3a07f859
  18. 24 1月, 2015 2 次提交
    • A
      regex: Remove in-tree version · 6c29708b
      Alex Crichton 提交于
      The regex library was largely used for non-critical aspects of the compiler and
      various external tooling. The library at this point is duplicated with its
      out-of-tree counterpart and as such imposes a bit of a maintenance overhead as
      well as compile time hit for the compiler itself.
      
      The last major user of the regex library is the libtest library, using regexes
      for filters when running tests. This removal means that the filtering has gone
      back to substring matching rather than using regexes.
      6c29708b
    • B
      Set unstable feature names appropriately · cd6d9eab
      Brian Anderson 提交于
      * `core` - for the core crate
      * `hash` - hashing
      * `io` - io
      * `path` - path
      * `alloc` - alloc crate
      * `rand` - rand crate
      * `collections` - collections crate
      * `std_misc` - other parts of std
      * `test` - test crate
      * `rustc_private` - everything else
      cd6d9eab
  19. 23 1月, 2015 1 次提交
  20. 22 1月, 2015 4 次提交