1. 12 5月, 2015 3 次提交
  2. 06 5月, 2015 1 次提交
    • A
      rustc: Fix more verbatim paths leaking to gcc · 2dc0e561
      Alex Crichton 提交于
      Turns out that a verbatim path was leaking through to gcc via the PATH
      environment variable (pointing to the bundled gcc provided by the main
      distribution) which was wreaking havoc when gcc itself was run. The fix here is
      to just stop passing verbatim paths down by adding more liberal uses of
      `fix_windows_verbatim_for_gcc`.
      
      Closes #25072
      2dc0e561
  3. 30 4月, 2015 2 次提交
    • A
      Use hash-tables in trait selection · 7ae4a8e9
      Ariel Ben-Yehuda 提交于
      Puts implementations in bins hashed by the fast-reject key, and
      only looks up the relevant impls, reducing O(n^2)-ishness
      
      Before: 688.92user 5.08system 8:56.70elapsed 129%CPU (0avgtext+0avgdata 1208164maxresident)k, LLVM 379.142s
      After: 637.78user 5.11system 8:17.48elapsed 129%CPU (0avgtext+0avgdata 1201448maxresident)k LLVM 375.552s
      
      Performance increase is +7%-ish
      7ae4a8e9
    • A
      Stop using Rc in TraitRef and TraitDef · bd1f7342
      Ariel Ben-Yehuda 提交于
      The former stopped making sense when we started interning substs and made
      TraitRef a 2-word copy type, and I'm moving the latter into an arena as
      they live as long as the type context.
      bd1f7342
  4. 29 4月, 2015 1 次提交
  5. 28 4月, 2015 1 次提交
    • A
      std: Expand the area of std::fs · 93487000
      Alex Crichton 提交于
      This commit is an implementation of [RFC 1044][rfc] which adds additional
      surface area to the `std::fs` module. All new APIs are `#[unstable]` behind
      assorted feature names for each one.
      
      [rfc]: https://github.com/rust-lang/rfcs/pull/1044
      
      The new APIs added are:
      
      * `fs::canonicalize` - bindings to `realpath` on unix and
        `GetFinalPathNameByHandle` on windows.
      * `fs::symlink_metadata` - similar to `lstat` on unix
      * `fs::FileType` and accessor methods as `is_{file,dir,symlink}`
      * `fs::Metadata::file_type` - accessor for the raw file type
      * `fs::DirEntry::metadata` - acquisition of metadata which is free on Windows
        but requires a syscall on unix.
      * `fs::DirEntry::file_type` - access the file type which may not require a
        syscall on most platforms.
      * `fs::DirEntry::file_name` - access just the file name without leading
        components.
      * `fs::PathExt::symlink_metadata` - convenience method for the top-level
        function.
      * `fs::PathExt::canonicalize` - convenience method for the top-level
        function.
      * `fs::PathExt::read_link` - convenience method for the top-level
        function.
      * `fs::PathExt::read_dir` - convenience method for the top-level
        function.
      * `std::os::raw` - type definitions for raw OS/C types available on all
        platforms.
      * `std::os::$platform` - new modules have been added for all currently supported
        platforms (e.g. those more specific than just `unix`).
      * `std::os::$platform::raw` - platform-specific type definitions. These modules
        are populated with the bare essentials necessary for lowing I/O types into
        their raw representations, and currently largely consist of the `stat`
        definition for unix platforms.
      
      This commit also deprecates `Metadata::{modified, accessed}` in favor of
      inspecting the raw representations via the lowering methods of `Metadata`.
      93487000
  6. 24 4月, 2015 3 次提交
  7. 22 4月, 2015 2 次提交
    • A
      std: Remove deprecated/unstable num functionality · eeb94886
      Alex Crichton 提交于
      This commit removes all the old casting/generic traits from `std::num` that are
      no longer in use by the standard library. This additionally removes the old
      `strconv` module which has not seen much use in quite a long time. All generic
      functionality has been supplanted with traits in the `num` crate and the
      `strconv` module is supplanted with the [rust-strconv crate][rust-strconv].
      
      [rust-strconv]: https://github.com/lifthrasiir/rust-strconv
      
      This is a breaking change due to the removal of these deprecated crates, and the
      alternative crates are listed above.
      
      [breaking-change]
      eeb94886
    • A
      rustc: Handle duplicate names merging archives · 9ab0475d
      Alex Crichton 提交于
      When linking an archive statically to an rlib, the compiler will extract all
      contents of the archive and add them all to the rlib being generated. The
      current method of extraction is to run `ar x`, dumping all files into a
      temporary directory. Object archives, however, are allowed to have multiple
      entries with the same file name, so there is no method for them to extract their
      contents into a directory in a lossless fashion.
      
      This commit adds iterator support to the `ArchiveRO` structure which hooks into
      LLVM's support for reading object archives. This iterator is then used to
      inspect each object in turn and extract it to a unique location for later
      assembly.
      9ab0475d
  8. 17 4月, 2015 1 次提交
  9. 15 4月, 2015 3 次提交
  10. 08 4月, 2015 1 次提交
    • A
      rustdoc: Improve handling inlined associated types · 75ef0832
      Alex Crichton 提交于
      * All bounds are now discovered through the trait to be inlined.
      * The `?Sized` bound now renders correctly for inlined associated types.
      * All `QPath`s (`<A as B>::C`) instances are rendered as `A::C` where `C` is a
        hyperlink to the trait `B`. This should improve at least how the docs look at
        least.
      * Supertrait bounds are now separated and display as the source lists them.
      
      Closes #20727
      Closes #21145
      75ef0832
  11. 05 4月, 2015 1 次提交
    • P
      Work towards a non-panicing parser (libsyntax) · b2bcb722
      Phil Dawes 提交于
      - Functions in parser.rs return PResult<> rather than panicing
      - Other functions in libsyntax call panic! explicitly for now if they rely on panicing behaviour.
      - 'panictry!' macro added as scaffolding while converting panicing functions.
        (This does the same as 'unwrap()' but is easier to grep for and turn into try!())
      - Leaves panicing wrappers for the following functions so that the
        quote_* macros behave the same:
        - parse_expr, parse_item, parse_pat, parse_arm, parse_ty, parse_stmt
      b2bcb722
  12. 04 4月, 2015 2 次提交
  13. 01 4月, 2015 2 次提交
  14. 31 3月, 2015 2 次提交
    • A
      Stabilize std::num · 232424d9
      Aaron Turon 提交于
      This commit stabilizes the `std::num` module:
      
      * The `Int` and `Float` traits are deprecated in favor of (1) the
        newly-added inherent methods and (2) the generic traits available in
        rust-lang/num.
      
      * The `Zero` and `One` traits are reintroduced in `std::num`, which
        together with various other traits allow you to recover the most
        common forms of generic programming.
      
      * The `FromStrRadix` trait, and associated free function, is deprecated
        in favor of inherent implementations.
      
      * A wide range of methods and constants for both integers and floating
        point numbers are now `#[stable]`, having been adjusted for integer
        guidelines.
      
      * `is_positive` and `is_negative` are renamed to `is_sign_positive` and
        `is_sign_negative`, in order to address #22985
      
      * The `Wrapping` type is moved to `std::num` and stabilized;
        `WrappingOps` is deprecated in favor of inherent methods on the
        integer types, and direct implementation of operations on
        `Wrapping<X>` for each concrete integer type `X`.
      
      Closes #22985
      Closes #21069
      
      [breaking-change]
      232424d9
    • A
      std: Standardize (input, output) param orderings · acd48a2b
      Alex Crichton 提交于
      This functions swaps the order of arguments to a few functions that previously
      took (output, input) parameters, but now take (input, output) parameters (in
      that order).
      
      The affected functions are:
      
      * ptr::copy
      * ptr::copy_nonoverlapping
      * slice::bytes::copy_memory
      * intrinsics::copy
      * intrinsics::copy_nonoverlapping
      
      Closes #22890
      [breaking-change]
      acd48a2b
  15. 28 3月, 2015 2 次提交
    • R
      cleanup: Remove unused braces in use statements · cbce6bfb
      Richo Healey 提交于
      cbce6bfb
    • A
      rustc: Remove support for hyphens in crate names · b24a3b82
      Alex Crichton 提交于
      This commit removes parser support for `extern crate "foo" as bar` as the
      renamed crate is now required to be an identifier. Additionally this commit
      enables hard errors on crate names that contain hyphens in them, they must now
      solely contain alphanumeric characters or underscores.
      
      If the crate name is inferred from the file name, however, the file name
      `foo-bar.rs` will have the crate name inferred as `foo_bar`. If a binary is
      being emitted it will have the name `foo-bar` and a library will have the name
      `libfoo_bar.rlib`.
      
      This commit is a breaking change for a number of reasons:
      
      * Old syntax is being removed. This was previously only issuing warnings.
      * The output for the compiler when input is received on stdin is now `rust_out`
        instead of `rust-out`.
      * The crate name for a crate in the file `foo-bar.rs` is now `foo_bar` which can
        affect infrastructure such as logging.
      
      [breaking-change]
      b24a3b82
  16. 27 3月, 2015 4 次提交
  17. 26 3月, 2015 1 次提交
  18. 25 3月, 2015 1 次提交
    • A
      rustc: Add support for `extern crate foo as bar` · eb2f1d92
      Alex Crichton 提交于
      The compiler will now issue a warning for crates that have syntax of the form
      `extern crate "foo" as bar`, but it will still continue to accept this syntax.
      Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist
      in the transition period as well.
      
      This patch will land hopefully in tandem with a Cargo patch that will start
      translating all crate names to have underscores instead of hyphens.
      
      cc #23533
      eb2f1d92
  19. 24 3月, 2015 2 次提交
    • A
      Add generic conversion traits · 8389253d
      Aaron Turon 提交于
      This commit:
      
      * Introduces `std::convert`, providing an implementation of
      RFC 529.
      
      * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all
      in favor of the corresponding generic conversion traits.
      
        Consequently, various IO APIs now take `AsRef<Path>` rather than
      `AsPath`, and so on. Since the types provided by `std` implement both
      traits, this should cause relatively little breakage.
      
      * Deprecates many `from_foo` constructors in favor of `from`.
      
      * Changes `PathBuf::new` to take no argument (creating an empty buffer,
        as per convention). The previous behavior is now available as
        `PathBuf::from`.
      
      * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait.
      
      Closes #22751
      Closes #14433
      
      [breaking-change]
      8389253d
    • N
      Fallout in stdlib, rustdoc, rustc, etc. For most maps, converted uses of · 8e58af40
      Niko Matsakis 提交于
      `[]` on maps to `get` in rustc, since stage0 and stage1+ disagree about
      how to use `[]`.
      8e58af40
  20. 17 3月, 2015 1 次提交
    • T
      Improve error handling in libflate · 1b894c65
      Tobias Bucher 提交于
      This removes the error case of the compression functions, the only errors that
      can occur are incorrect parameters or an out-of-memory condition, both of which
      are handled with panics in Rust.
      
      Also introduces an extensible `Error` type instead of returning an `Option`.
      1b894c65
  21. 16 3月, 2015 1 次提交
  22. 14 3月, 2015 1 次提交
  23. 13 3月, 2015 1 次提交
  24. 12 3月, 2015 1 次提交