1. 18 1月, 2018 5 次提交
    • K
      Rollup merge of #47407 - gaurikholkar:master, r=estebank · bd8aa02f
      kennytm 提交于
      fix mispositioned span
      
      This fixes #47377
      
      The output now looks like this
      ```
      error[E0369]: binary operation `+` cannot be applied to type `&str`
       --> h.rs:3:11
        |
      3 |     let _a = b + ", World!";
        |              ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
      help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
        |
      3 |     let _a = b.to_owned() + ", World!";
        |              ^^^^^^^^^
      
      error: aborting due to previous error
      ```
      For the case when emojis are involved,  it gives the new output for proper indentation.
      But for an indentation as follows,
      ```
      fn main() {
      let b = "hello";
          let _a = b + ", World!";
      }
      ```
      it still mispositions the span
      ```
      3 |     println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
        |                                           ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
        |
      3 |     println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
        |                                           ^^^^^^^
      error: aborting due to previous erro
      ```
      
      cc @estebank  @est31
      bd8aa02f
    • K
      Rollup merge of #47404 - integer32llc:reexport-to-re-export, r=steveklabnik · e7087f0f
      kennytm 提交于
      Standardize on "re-export" rather than "reexport"
      
      While working on the book with our editors, it was brought to our attention that we're not consistent with when we use "re-export" versus "reexport". For the book, we've decided (with our editors) to go with "re-export"; in prose, I think that looks better. In code, I'm fine with "reexport".
      
      However, the rustdoc generated section is currently "Reexports", so when we have a screenshot of generated documentation with the prose where we use "re-export", it's inconsistent.
      
      It's too late to fix this for the book because we're using 1.21.0 for the output in the book, and it's really only one spot so it's not a huge deal, but I'd like to advocate for changing the documentation header so that a future edition of the book can be consistent.
      
      The first commit here only changes the documentation section heading text and rustdoc documentation that references it. This is the commit that's most important to me.
      
      The second commit changes error messages and associated tests to also be consistent with the use of re-export. This is the next most important commit to me, but I could be argued out of this one because then it won't match code like the `macro_reexports` feature name, which ostensibly should change to `macro_re_exports` to be most consistent but I didn't want to change code.
      
      The last commit changes re-export anywhere else in prose: either in documentation comments or regular comments. This is least important as most of them aren't user-visible. Instances like these will likely sneak back in over time. I'm totally fine dropping this commit if anyone wants, but [the hobgoblins made me do it](http://www.bartleby.com/100/420.47.html) and it sets a good example.
      
      r? @steveklabnik
      e7087f0f
    • K
      Rollup merge of #47387 - Rantanen:linkchecker-error-msg, r=steveklabnik · 29c2aa79
      kennytm 提交于
      Report errors instead of panic!() when linkcheck encounters absolute paths
      
      The RBE contained some absolute links that failed the link check in #46196. Diagnosing these issues was needlessly complicated, thanks to the linkchecker just panicing instead of reporting proper errors.
      
      This PR replaces the panic with a proper `*errors = true` + error message handling.
      
      The linkchecker itself doesn't have any tests so I intentionally didn't touch anything else than the code that previously did the `panic!()`. A small code quality improvement might be made by binding the `Path::new(base).join(url)` into a variable before the for-loop and using this resolved url in both the for loop and the error message.
      
      r? @steveklabnik
      
      (If not for any other reason than having r on the #46196.)
      29c2aa79
    • K
      175dd84e
    • K
      Rollup merge of #47302 - andjo403:commentfix, r=michaelwoerister · 283ee544
      kennytm 提交于
      fix faulty comment
      
      after #43506 there is no fixed number of request sent.
      283ee544
  2. 17 1月, 2018 4 次提交
    • B
      Auto merge of #47035 - acfoltzer:dep-info-tweak, r=alexcrichton · 3e49ada7
      bors 提交于
      Remove dep-info files as targets in themselves
      
      If you ask `rustc` to `--emit dep-info`, the resulting dependency file contains a rule for producing the dependency file itself. This differs from the output of `gcc -MD` or `clang -MD`, which only includes dependency rules for the object files produced.
      
      Tools like Ninja often consume and delete dependency files as soon as they’re produced for performance reasons, particularly on Windows. In the case of `rustc` output, though, the recently-deleted dependency file is cached by Ninja as a target, and therefore triggers a rebuild every time.
      
      This very small patch removes the dep-info file from the list of output filenames, so it matches the behavior of gcc and clang.
      3e49ada7
    • G
      fix minor errors · efe3d69a
      Gauri 提交于
      efe3d69a
    • G
      using tabs in ui tests · a4e3f361
      Gauri 提交于
      a4e3f361
    • G
      fix tidy checks · d769539f
      Gauri 提交于
      d769539f
  3. 16 1月, 2018 6 次提交
  4. 15 1月, 2018 18 次提交
  5. 14 1月, 2018 7 次提交
    • V
      60c48dd1
    • V
      syntax: Rewrite parsing of impls · d19e4c4a
      Vadim Petrochenkov 提交于
      Properly parse impls for the never type `!`
      Recover from missing `for` in `impl Trait for Type`
      Prohibit inherent default impls and default impls of auto traits
      Change wording in more diagnostics to use "auto traits"
      Some minor code cleanups in the parser
      d19e4c4a
    • B
      Auto merge of #47322 - nikomatsakis:nll-ice, r=pnkfelix · adc9d863
      bors 提交于
      resolve type and region variables in "NLL dropck"
      
      Fixes #47022.
      
      r? @pnkfelix
      adc9d863
    • B
      Auto merge of #47274 - Manishearth:rustdoc-span, r=QuietMisdreavus · 5d6f6e65
      bors 提交于
      Use correct line offsets for doctests
      
      Not yet tested.
      
      This doesn't handle char positions. It could if I collected a map of char offsets and lines, but this is a bit more work and requires hooking into the parser much more (unsure if it's possible).
      
      r? @QuietMisdreavus
      
      (fixes #45868)
      5d6f6e65
    • B
      Auto merge of #47268 - EdSchouten:cloudabi-libstd, r=alexcrichton · 48ab4cde
      bors 提交于
      Implement libstd for CloudABI.
      
      Though CloudABI is strongly inspired by POSIX, its absence of features that don't work well with capability-based sandboxing makes it different enough that adding bits to `sys/unix` will make things a mess. This change therefore adds CloudABI specific platform code under `sys/cloudabi`.
      
      One of the goals of this implementation is to build as much as possible directly on top of CloudABI's system call layer, as opposed to using the C library. This is preferred, as the system call layer is supposed to be stable, whereas the C library ABI technically is not. An advantage of this approach is that it allows us to implement certain interfaces, such as mutexes and condition variables more optimally. They can be lighter than the ones provided by pthreads.
      
      This change disables some modules that cannot realistically be implemented right now. For example, libstd's pathname abstraction is not designed with POSIX `*at()` (e.g., `openat()`) in mind. The `*at()` functions are the only set of file system APIs available on CloudABI. There is no global file system namespace, nor a process working directory. Discussions on how to port these modules over are outside the scope of this change.
      48ab4cde
    • E
      4e40a0d4
    • E
      rustc_trans: rename bcx to bx. · 209abc71
      Eduard-Mihai Burtescu 提交于
      209abc71