1. 07 1月, 2018 1 次提交
    • Z
      wherein careful doc-decoration arithmetic proves quite the ICE-breaker · 3cfea334
      Zack M. Davis 提交于
      This `horizontal_trim` function strips the leading whitespace from
      doc-comments that have a left-asterisk-margin:
      
        /**
         * You know what I mean—
         *
         * comments like this!
         */
      
      The index of the column of asterisks is `i`, and if trimming is deemed
      possible, we slice each line from `i+1` to the end of the line. But if, in
      particular, `i` was 0 _and_ there was an empty line (as in the example
      given in the reporting issue), we ended up panicking trying to slice an
      empty string from 0+1 (== 1).
      
      Let's tighten our check to say that we can't trim when `i` is even the same
      as the length of the line, not just when it's greater. (Any such cases
      would panic trying to slice `line` from `line.len()+1`.)
      
      Resolves #47197.
      3cfea334
  2. 14 12月, 2017 1 次提交
  3. 30 8月, 2017 1 次提交
  4. 16 8月, 2017 1 次提交
  5. 13 5月, 2017 1 次提交
  6. 26 4月, 2017 1 次提交
  7. 17 1月, 2017 2 次提交
  8. 19 10月, 2016 1 次提交
  9. 05 10月, 2016 2 次提交
  10. 23 6月, 2016 1 次提交
  11. 17 6月, 2016 1 次提交
    • T
      Add an abs_path member to FileMap, use it when writing debug info. · 24e74916
      Ted Mielczarek 提交于
      When items are inlined from extern crates, the filename in the debug info
      is taken from the FileMap that's serialized in the rlib metadata.
      Currently this is just FileMap.name, which is whatever path is passed to rustc.
      Since libcore and libstd are built by invoking rustc with relative paths,
      they wind up with relative paths in the rlib, and when linked into a binary
      the debug info uses relative paths for the names, but since the compilation
      directory for the final binary, tools trying to read source filenames
      will wind up with bad paths. We noticed this in Firefox with source
      filenames from libcore/libstd having bad paths.
      
      This change stores an absolute path in FileMap.abs_path, and uses that
      if available for writing debug info. This is not going to magically make
      debuggers able to find the source, but it will at least provide sensible
      paths.
      24e74916
  12. 16 1月, 2016 1 次提交
  13. 05 1月, 2016 1 次提交
  14. 03 1月, 2016 1 次提交
  15. 17 12月, 2015 1 次提交
  16. 28 10月, 2015 1 次提交
  17. 02 10月, 2015 1 次提交
  18. 04 9月, 2015 1 次提交
    • A
      std: Account for CRLF in {str, BufRead}::lines · 48615a68
      Alex Crichton 提交于
      This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of
      the `str::lines` and `BufRead::lines` iterators. Both iterators now account for
      `\r\n` sequences in addition to `\n`, allowing for less surprising behavior
      across platforms (especially in the `BufRead` case). Splitting *only* on the
      `\n` character can still be achieved with `split('\n')` in both cases.
      
      The `str::lines_any` function is also now deprecated as `str::lines` is a
      drop-in replacement for it.
      
      [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md
      
      Closes #28032
      48615a68
  19. 11 7月, 2015 1 次提交
  20. 25 4月, 2015 1 次提交
  21. 22 4月, 2015 2 次提交
  22. 15 4月, 2015 1 次提交
  23. 18 3月, 2015 1 次提交
    • A
      std: Tweak some unstable features of `str` · aa88da63
      Alex Crichton 提交于
      This commit clarifies some of the unstable features in the `str` module by
      moving them out of the blanket `core` and `collections` features.
      
      The following methods were moved to the `str_char` feature which generally
      encompasses decoding specific characters from a `str` and dealing with the
      result. It is unclear if any of these methods need to be stabilized for 1.0 and
      the most conservative route for now is to continue providing them but to leave
      them as unstable under a more specific name.
      
      * `is_char_boundary`
      * `char_at`
      * `char_range_at`
      * `char_at_reverse`
      * `char_range_at_reverse`
      * `slice_shift_char`
      
      The following methods were moved into the generic `unicode` feature as they are
      specifically enabled by the `unicode` crate itself.
      
      * `nfd_chars`
      * `nfkd_chars`
      * `nfc_chars`
      * `graphemes`
      * `grapheme_indices`
      * `width`
      aa88da63
  24. 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
  25. 03 3月, 2015 1 次提交
    • F
      Use `const`s instead of `static`s where appropriate · f35f973c
      Florian Zeitz 提交于
      This changes the type of some public constants/statics in libunicode.
      Notably some `&'static &'static [(char, char)]` have changed
      to `&'static [(char, char)]`. The regexp crate seems to be the
      sole user of these, yet this is technically a [breaking-change]
      f35f973c
  26. 20 2月, 2015 1 次提交
  27. 19 2月, 2015 1 次提交
  28. 18 2月, 2015 1 次提交
  29. 03 2月, 2015 1 次提交
  30. 02 2月, 2015 1 次提交
  31. 27 1月, 2015 1 次提交
  32. 20 1月, 2015 1 次提交
  33. 19 1月, 2015 3 次提交
  34. 18 1月, 2015 2 次提交