1. 03 12月, 2017 3 次提交
  2. 02 12月, 2017 26 次提交
    • B
      Auto merge of #46349 - estebank:highlight-ref, r=arielb1 · 9053fdd4
      bors 提交于
      On type mismatch error highlight `&` when type matches
      
      When the only difference between the two types in a type error is that
      one is a reference to the other type (`T` vs `&T`) or both are
      references differing only in their mutability (`&T` vs `&mut T`), don't
      highlight the type (`T`).
      9053fdd4
    • B
      Auto merge of #46347 - raventid:did-you-mean-increase-accuracy, r=estebank · 7a649872
      bors 提交于
      Add case insensitive comparison, besides Levenstein for DYM
      
      Closes #46332
      
      Draft version. The idea is that Levenstein does not work for some cases when we have multiple equal weights for strings. I didn't understand the case with `if found != name => Some(found)` so it means that new code does not work correctly yet.
      
      At least now I think that we might return all maximal weights from levenstein and think about next cases in priority order:
      
      1) There is exact match -> None
      2) There is exact match, but case insensitive -> Some(match)
      3) There is some match from levenstein -> Some(matches.take_any)
      4) There is no match -> None
      
      @estebank WDYT?
      7a649872
    • B
      Auto merge of #46343 - jseyfried:fix_hygiene_bug, r=nrc · e0d11f39
      bors 提交于
      Fix hygiene bug.
      
      Fixes #42708.
      r? @nrc
      e0d11f39
    • B
      Auto merge of #46326 - GuillaumeGomez:sidebar-text, r=QuietMisdreavus · 8bcbf91a
      bors 提交于
      Fix invalid HTML escape
      
      Fixes #46289.
      
      r? @QuietMisdreavus
      8bcbf91a
    • B
      Auto merge of #46288 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum · c3942e75
      bors 提交于
      Bump to 1.24.0
      
      * Update the in-tree version number
      * Update the bootstrap compiler
      * Remove `cfg(stage0)` annotations
      * Update crate dependencies
      * Update Cargo itself
      c3942e75
    • B
      Auto merge of #46256 - estebank:suggest-deref, r=arielb1 · b15a8eaf
      bors 提交于
      Use suggestions instead of notes ref mismatches
      
      On type mismatch errors, use a suggestion when encountering minimal
      differences in type differences due to refs, instead of a note.
      b15a8eaf
    • B
      Auto merge of #45904 - sunjay:gat-parser, r=nikomatsakis · ddaebe93
      bors 提交于
      Generic Associated Types Parsing & Name Resolution
      
      Hi!
      This PR adds parsing for generic associated types! 🎉 🎉 🎉
      
      Tracking Issue: #44265
      
      ## Notes For Reviewers
      * [x] I still need to add the stdout and stderr files to my ui tests. It takes me a *long* time to compile the compiler locally, so I'm going to add this as soon as possible in the next day or so.
      * [ ] My current ui tests aren't very good or very thorough. I'm reusing the `parse_generics` and `parse_where_clause` methods from elsewhere in the parser, so my changes work without being particularly complex. I'm not sure if I should duplicate all of the generics test cases for generic associated types. It might actually be appropriate to duplicate everything here, since we don't want to rely on an implementation detail in case it changes in the future. If you think so too, I'll adapt all of the generics test cases into the generic associated types test cases.
      * [ ] There is still more work required to make the run-pass tests pass here. In particular, we need to make the following errors disappear:
      ```
      error[E0110]: lifetime parameters are not allowed on this type
        --> ./src/test/run-pass/rfc1598-generic-associated-types/streaming_iterator.rs:23:41
         |
      23 |     bar: <T as StreamingIterator>::Item<'static>,
         |                                         ^^^^^^^ lifetime parameter not allowed on this type
      ```
      ```
      error[E0261]: use of undeclared lifetime name `'a`
        --> ./src/test/run-pass/rfc1598-generic-associated-types/iterable.rs:15:47
         |
      15 |     type Iter<'a>: Iterator<Item = Self::Item<'a>>;
         |                                               ^^ undeclared lifetime
      ```
      There is a FIXME comment in streaming_iterator. If you uncomment that line, you get the following:
      ```
      error: expected one of `!`, `+`, `,`, `::`, or `>`, found `=`
        --> ./src/test/run-pass/rfc1598-generic-associated-types/streaming_iterator.rs:29:45
         |
      29 | fn foo<T: for<'a> StreamingIterator<Item<'a>=&'a [i32]>>(iter: T) { /* ... */ }
         |                                             ^ expected one of `!`, `+`, `,`, `::`, or `>` here
      ```
      
      r? @nikomatsakis
      ddaebe93
    • B
      Auto merge of #46430 - kennytm:rollup, r=kennytm · 70517540
      bors 提交于
      Rollup of 13 pull requests
      
      - Successful merges: #45880, #46280, #46373, #46376, #46385, #46386, #46387, #46392, #46400, #46401, #46405, #46412, #46421
      - Failed merges:
      70517540
    • B
      Auto merge of #46425 - eddyb:mir-place, r=nikomatsakis · bb42071f
      bors 提交于
      MIR: change "lvalue" terminology to "place".
      
      As pointed out elsewhere, "lvalue" vs "rvalue" is a misleading/obscure distinction and several other choices have been proposed, the one I prefer being "place" vs "value".
      
      This PR only touches the "lvalue" side, and only in MIR-related code, as it's already a lot and could rot.
      bb42071f
    • E
      Use suggestions instead of notes ref mismatches · 36faafee
      Esteban Küber 提交于
      On type mismatch errors, use a suggestion when encountering minimal
      differences in type differences due to refs, instead of a note.
      36faafee
    • K
      Rollup merge of #46421 - mnd:fix-build-for-guix, r=alexcrichton · 56174775
      kennytm 提交于
      build_helper: destination file can't be up to date when not exists
      
      Function "up_to_date" return incorrect result if mtime for all fetched sources is set to epoch time. Add existence check to function.
      
      This fix required for a [Guix](https://www.gnu.org/software/guix/) package because a Nix builder set mtime of all sources to epoch time.
      56174775
    • K
      Rollup merge of #46412 - chrisduerr:issue-46380, r=QuietMisdreavus · 662f9027
      kennytm 提交于
      Hide private trait type params and show hidden items with document-private
      
      As discussed in #46380, this PR removes the `strip-hidden` pass from `--document-private-items` which allows showing `#[doc(hidden)]` with rustdoc.
      
      The second commit removes the trait implementation from the docs if the trait's parameter is private.
      662f9027
    • K
      Rollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebank · 3f99b7c9
      kennytm 提交于
      rustc: Filter out bogus extern crate warnings
      
      Rustdoc has for some time now used the "everybody loops" pass in the compiler to
      avoid typechecking and otherwise avoid looking at implementation details.
      In #46115 the placement of this pass was pushed back in the compiler to after
      macro expansion to ensure that it works with macro-expanded code as well. This
      in turn caused the regression in #46271.
      
      The bug here was that the resolver was producing `def_id` instances for
      "possibly unused extern crates" which would then later get processed during
      typeck to actually issue lint warnings. The problem was that *after* resolution
      these `def_id` nodes were actually removed from the AST by the "everybody loops"
      pass. This later, when we tried to take a look at `def_id`, caused the compiler
      to panic.
      
      The fix applied here is a bit of a heavy hammer which is to just, in this one
      case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way
      (basically if it looks like the node was removed after resolution). The real
      underlying bug here is probably that the "everybody loops" AST pass is being
      stressed to much beyond what it was originally intended to do, but this should
      at least fix the ICE for now...
      
      Closes #46271
      3f99b7c9
    • K
      Rollup merge of #46401 - alexcrichton:wasm-tests, r=arielb1 · bd5a4af5
      kennytm 提交于
      wasm: Update LLVM to fix a test
      
      This commit updates LLVM with some tweaks to the integer <-> floating point
      conversion instructions to ensure that `as` in Rust doesn't trap.
      
      Closes #46298
      bd5a4af5
    • K
      Rollup merge of #46400 - michaelwoerister:vtable-encodable, r=eddyb · b86a47f8
      kennytm 提交于
      incr.comp.: Make traits::VTable encodable and decodable.
      
      Make vtables encodable so we can cache the `trans_fulfill_obligation` query at some point.
      
      r? @EddyB
      b86a47f8
    • K
      Rollup merge of #46392 - GuillaumeGomez:fix-tooltip, r=QuietMisdreavus · edaec072
      kennytm 提交于
      Invert colors in important traits tooltip
      
      Part of #46352.
      
      r? @QuietMisdreavus
      edaec072
    • K
      Rollup merge of #46387 - chrisduerr:master, r=QuietMisdreavus · bc8e8fab
      kennytm 提交于
      Fix rustdoc item summaries that are headers
      
      Rustoc item summaries that are headers were not displayed at all because
      they started with whitespace.
      
      This PR fixes this and now removes the whitespace and then displays the
      block.
      
      I'm not sure if the rustdoc test is written correctly, if there's anything to improve, just let me know. :)
      
      This fixes #46377.
      
      This is how it looks when rendered out now:
      ![Rendered](https://i.imgur.com/7u8jUAM.png)
      bc8e8fab
    • K
      Rollup merge of #46386 - Aaron1011:fix_rustdoc_log, r=Mark-Simulacrum · ae243662
      kennytm 提交于
      Remove librustdoc dependency on env_logger
      
      We want librustdoc to pickup the env_logger dependency from
      the sysroot. This ensures that the same copy of env_logger is used
      for both internal crates (e.g. librustc_driver, libsyntax) and
      librustdoc
      
      Closes #46383
      ae243662
    • K
      Rollup merge of #46385 - alexcrichton:fix-cargo-book, r=Mark-Simulacrum · 2341f6c4
      kennytm 提交于
      rustbuild: Fix a typo with the Cargo book
      
      The usage of `Path::new` prevented out-of-tree builds (like the bots do) from
      working by accident!
      
      Closes #46195
      2341f6c4
    • K
      Rollup merge of #46376 - SimonSapin:cargoup, r=kennytm · 613da5c1
      kennytm 提交于
      Update Cargo to Wed Nov 29 15:19:05 2017 +0000
      
      https://github.com/rust-lang/cargo/commit/5bb478a518bcf75537409e8b71f6b7cc4af362df
      
      Pick up `workspace.default-members` support: https://github.com/rust-lang/cargo/pull/4743
      613da5c1
    • K
      Rollup merge of #46373 - jakllsch:netbsd-kern_proc_pathname, r=kennytm · 9493d4b9
      kennytm 提交于
      NetBSD: add sysctl backend for std::env::current_exe
      
      Use the CTL_KERN.KERN_PROC_ARGS.-1.KERN_PROC_PATHNAME sysctl in
      preference over the /proc/curproc/exe symlink.
      
      Additionally, perform more validation of aformentioned symlink.
      Particularly on pre-8.x NetBSD this symlink will point to '/' when
      accurate information is unavailable.
      9493d4b9
    • K
      Rollup merge of #46280 - tamird:remove-old-refs, r=alexcrichton · 263eb4d7
      kennytm 提交于
      rustc_llvm: remove stale references
      
      ...that were removed in 77c3bfa7.
      
      r? @alexcrichton
      263eb4d7
    • K
      Rollup merge of #45880 - arielb1:never-coerce, r=nikomatsakis · 95f465d5
      kennytm 提交于
      make coercions to `!` in unreachable code a hard error
      
      This was added to cover up a lazy extra semicolon in #35849, but does
      not actually make sense. This is removed as a part of the stabilization
      of `never_type`.
      95f465d5
    • E
    • E
      MIR: s/Lvalue/Place in type names. · 511743c4
      Eduard-Mihai Burtescu 提交于
      511743c4
    • B
      Auto merge of #46338 - michaelwoerister:lazy-diagnostics, r=nikomatsakis · 6805b016
      bors 提交于
      incr.comp.: Load cached diagnostics lazily and allow more things in the cache.
      
      This PR implements makes two changes:
      1. Diagnostics are loaded lazily from the incr. comp. cache now. This turned out to be necessary for correctness because diagnostics contain `Span` values and deserializing those requires that the source file they point to is still around in the current compilation session. Obviously this isn't always the case. Loading them lazily allows for never touching diagnostics that are not valid anymore.
      2. The compiler can now deal with there being no cache entry for a given query invocation. Before, all query results of a cacheable query were always expected to be present in the cache. Now, the compiler can fall back to re-computing the result if there is no cache entry found. This allows for caching things that we cannot force from dep-node (like the `symbol_name` query). In such a case we'll just have a "best effort" caching strategy.
      
      ~~This PR is based on https://github.com/rust-lang/rust/pull/46301 (=first 2 commits), so please don't merge until that has landed. The rest of the commits are ready for review though.~~
      
      r? @nikomatsakis
      6805b016
  3. 01 12月, 2017 11 次提交