1. 12 11月, 2015 1 次提交
    • N
      Add -Zinput-stats · f7dc917b
      Nick Cameron 提交于
      Emits loc, and node count - before and after expansion.
      
      E.g.,
      
      ```
      rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore
      Lines of code:             32060
      Pre-expansion node count:  120205
      Post-expansion node count: 482749
      ```
      f7dc917b
  2. 10 11月, 2015 1 次提交
  3. 04 11月, 2015 1 次提交
  4. 28 10月, 2015 1 次提交
  5. 06 10月, 2015 1 次提交
  6. 01 10月, 2015 1 次提交
    • A
      rustc: Support output filenames for each emit type · 8c963c07
      Alex Crichton 提交于
      Currently the compiler supports the ability to emit multiple output types as
      part of one compilation (e.g. asm, LLVM IR, bytecode, link, dep-info, etc). It
      does not, however, support the ability to customize the output filename for each
      of these output types. The `-o` flag is ignored if multiple emit types are
      specified (and the compiler emits a warning about this).
      
      Normally this doesn't matter too much, but in the case of `dep-info` it can lead
      to a number of problems (e.g. see #28716). By allowing customization of the
      output filename for each emit type we're able to solve the problems in that
      issue.
      
      This commit adds support for the `--emit` option to the compiler to look like:
      
          rustc foo.rs --emit dep-info=.deps/foo.d,link
      
      This indicates that the `dep-info` output type will be placed at `.deps/foo.d`
      and the `link` output type will otherwise be determined via the `--out-dir` and
      `-o` flags.
      
      Closes #28716
      8c963c07
  7. 24 9月, 2015 1 次提交
    • S
      rustc: Add target_vendor for target triples · af68cdfe
      Sebastian Wicki 提交于
      This adds a new target property, `target_vendor` which can be used as a
      matcher for conditional compilation. The vendor is part of the autoconf
      target triple: <arch><sub>-<vendor>-<os>-<env>
      
      The default value for `target_vendor` is "unknown".
      
      Matching against the `target_vendor` with `#[cfg]` is currently feature
      gated as `cfg_target_vendor`.
      af68cdfe
  8. 17 9月, 2015 1 次提交
  9. 16 9月, 2015 1 次提交
  10. 06 9月, 2015 1 次提交
  11. 03 9月, 2015 1 次提交
  12. 25 8月, 2015 1 次提交
    • B
      Respect `--color` when printing early errors · 71f39c1a
      Barosl Lee 提交于
      Currently, `early_error` and `early_warn` in `librustc::session` always
      use `ColorConfig::Auto`. Modify them to follow the color configuration
      set by the `--color` option.
      
      As colored output is also printed during the early stage, parsing the
      `--color` option should be done as early as possible. However, there are
      still some cases when the output needs to be colored before knowing the
      exact color settings. In these cases, it will be defaulted to
      `ColorConfig::Auto`, which is the same as before.
      
      Fixes #27879.
      71f39c1a
  13. 11 8月, 2015 1 次提交
    • F
      Turn nonzeroing move hints back off by default. · 91f5d327
      Felix S. Klock II 提交于
      This is a temporary workaround for the bugs that have been found in
      the implementation of PR #26173.
      
       * pnkfelix is unavailable in the short-term (i.e. for the next week) to fix them.
      
       * When the bugs are fixed, we will turn this back on by default.
      
      (If you want to play with the known-to-be-buggy optimization in the
      meantime, you can opt-back in via the debugging option that this
      commit is toggling.)
      91f5d327
  14. 07 8月, 2015 1 次提交
    • F
      Turn nonzeroing move hints back off by default. · e9b28d22
      Felix S. Klock II 提交于
      This is a temporary workaround for the bugs that have been found in
      the implementation of PR #26173.
      
       * pnkfelix is unavailable in the short-term (i.e. for the next week) to fix them.
      
       * When the bugs are fixed, we will turn this back on by default.
      
      (If you want to play with the known-to-be-buggy optimization in the
      meantime, you can opt-back in via the debugging option that this
      commit is toggling.)
      e9b28d22
  15. 30 7月, 2015 1 次提交
  16. 29 7月, 2015 1 次提交
  17. 28 7月, 2015 1 次提交
  18. 19 6月, 2015 1 次提交
    • B
      Make a better error message for using #[feature] on stable rust · f14a0e2d
      Brian Anderson 提交于
      It now says '#[feature] may not be used on the stable release channel'.
      
      I had to convert this error from a lint to a normal compiler error.
      
      I left the lint previously-used for this in place since removing it is
      a breaking change. It will just go unused until the end of time.
      
      Fixes #24125
      f14a0e2d
  19. 14 5月, 2015 1 次提交
  20. 13 5月, 2015 2 次提交
    • A
      Scale back changes made · 4cc025d8
      Alex Crichton 提交于
      4cc025d8
    • R
      Very hacky MSVC hacks. · 315750ac
      Ricky Taylor 提交于
      Conflicts:
      	mk/platform.mk
      	src/librustc/session/config.rs
      	src/librustc_back/target/aarch64_apple_ios.rs
      	src/librustc_back/target/aarch64_linux_android.rs
      	src/librustc_back/target/arm_linux_androideabi.rs
      	src/librustc_back/target/arm_unknown_linux_gnueabi.rs
      	src/librustc_back/target/arm_unknown_linux_gnueabihf.rs
      	src/librustc_back/target/armv7_apple_ios.rs
      	src/librustc_back/target/armv7s_apple_ios.rs
      	src/librustc_back/target/i386_apple_ios.rs
      	src/librustc_back/target/i686_apple_darwin.rs
      	src/librustc_back/target/i686_pc_windows_gnu.rs
      	src/librustc_back/target/i686_unknown_dragonfly.rs
      	src/librustc_back/target/i686_unknown_linux_gnu.rs
      	src/librustc_back/target/mips_unknown_linux_gnu.rs
      	src/librustc_back/target/mipsel_unknown_linux_gnu.rs
      	src/librustc_back/target/mod.rs
      	src/librustc_back/target/powerpc_unknown_linux_gnu.rs
      	src/librustc_back/target/x86_64_apple_darwin.rs
      	src/librustc_back/target/x86_64_apple_ios.rs
      	src/librustc_back/target/x86_64_pc_windows_gnu.rs
      	src/librustc_back/target/x86_64_unknown_dragonfly.rs
      	src/librustc_back/target/x86_64_unknown_freebsd.rs
      	src/librustc_back/target/x86_64_unknown_linux_gnu.rs
      	src/librustc_back/target/x86_64_unknown_openbsd.rs
      	src/librustc_llvm/lib.rs
      	src/librustc_trans/back/link.rs
      	src/librustc_trans/trans/base.rs
      	src/libstd/os.rs
      	src/rustllvm/RustWrapper.cpp
      315750ac
  21. 30 4月, 2015 1 次提交
  22. 28 4月, 2015 1 次提交
    • A
      rustc: Add target_env for triples by default · ba2380d7
      Alex Crichton 提交于
      This adds a new `#[cfg]` matcher against the `target_env` property of the
      destination target triple. For example all windows triples today end with `-gnu`
      but we will also hopefully support non-`gnu` targets for Windows, at which point
      we'll need to differentiate between the two. This new `target_env` matches is
      provided and filled in with the target's environment name.
      
      Currently the only non-empty value of this name is `gnu`, but `musl` will be
      shortly added for the linux triples.
      ba2380d7
  23. 25 4月, 2015 1 次提交
  24. 22 4月, 2015 1 次提交
  25. 15 4月, 2015 1 次提交
  26. 14 4月, 2015 1 次提交
  27. 02 4月, 2015 1 次提交
  28. 01 4月, 2015 1 次提交
  29. 27 3月, 2015 4 次提交
  30. 26 3月, 2015 1 次提交
  31. 24 3月, 2015 1 次提交
    • 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
  32. 18 3月, 2015 1 次提交
  33. 06 3月, 2015 1 次提交
    • A
      rustc: Add a debug_assertions #[cfg] directive · d5d83455
      Alex Crichton 提交于
      This commit is an implementation of [RFC 563][rfc] which adds a new
      `cfg(debug_assertions)` directive which is specially recognized and calculated
      by the compiler. The flag is turned off at any optimization level greater than 1
      and may also be explicitly controlled through the `-C debug-assertions`
      flag.
      
      [rfc]: https://github.com/rust-lang/rfcs/pull/563
      
      The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of
      the `ndebug` variable and `ndebug` no longer holds any meaning to the standard
      library.
      
      Code which was previously relying on `not(ndebug)` to gate expensive code should
      be updated to rely on `debug_assertions` instead.
      
      Closes #22492
      [breaking-change]
      d5d83455
  34. 05 3月, 2015 1 次提交
    • A
      std: Deprecate std::old_io::fs · 95d90462
      Alex Crichton 提交于
      This commit deprecates the majority of std::old_io::fs in favor of std::fs and
      its new functionality. Some functions remain non-deprecated but are now behind a
      feature gate called `old_fs`. These functions will be deprecated once
      suitable replacements have been implemented.
      
      The compiler has been migrated to new `std::fs` and `std::path` APIs where
      appropriate as part of this change.
      95d90462
  35. 03 3月, 2015 2 次提交
    • J
      Implement parse_opt_bool better · 280dea74
      James Miller 提交于
      During my clean-up of rebase errors, I took the opportunity to implement
      parse_opt_bool so that it isn't identical to parse_bool wrapped in
      `Some`.
      
      parse_opt_bool considers no value to be true, a value of 'y', 'yes' or
      'on' to be true and 'n', 'no' or 'off' to be false. All other values are
      an error.
      280dea74
    • C
      rustc: implement arithmetic overflow checking · cdfff9db
      Corey Richardson 提交于
      Adds overflow checking to integer addition, multiplication, and subtraction
      when `-Z force-overflow-checks` is true, or if `--cfg ndebug` is not passed to
      the compiler. On overflow, it panics with `arithmetic operation overflowed`.
      Also adds `overflowing_add`, `overflowing_sub`, and `overflowing_mul`
      intrinsics for doing unchecked arithmetic.
      
      [breaking-change]
      cdfff9db