1. 17 8月, 2018 34 次提交
  2. 16 8月, 2018 6 次提交
    • B
      Auto merge of #53304 - dtolnay:extend, r=dtolnay · b5590423
      bors 提交于
      TokenStream::extend
      
      Two new insta-stable impls in libproc_macro:
      
      ```rust
      impl Extend<TokenTree> for TokenStream
      impl Extend<TokenStream> for TokenStream
      ```
      
      `proc_macro::TokenStream` already implements `FromIterator<TokenTree>` and `FromIterator<TokenStream>` so I elected to support the same input types for `Extend`.
      
      **This commit reduces compile time of Serde derives by 60% (takes less than half as long to compile)** as measured by building our test suite:
      
      ```console
      $ git clone https://github.com/serde-rs/serde
      $ cd serde/test_suite
      $ cargo check --tests --features proc-macro2/nightly
      $ rm -f ../target/debug/deps/libtest_*.rmeta
      $ time cargo check --tests --features proc-macro2/nightly
      Before: 20.8 seconds
      After: 8.6 seconds
      ```
      
      r? @alexcrichton
      b5590423
    • B
      Auto merge of #53256 - ollie27:writeln, r=KodrAus · 50503497
      bors 提交于
      Don't accept non-string literals for the format string in writeln
      
      This is to improve diagnostics.
      
      `println` and `eprintln` were already fixed by #52394.
      
      Fixes #30143
      50503497
    • B
      Auto merge of #53173 - alexcrichton:win-arm64, r=sfackler · b837f5be
      bors 提交于
      Start adding an `aarch64-pc-windows-msvc` target
      
      This commit adds the necessary definitions for target specs and such as well as
      the necessary support in libstd to compile basic `aarch64-pc-windows-msvc`
      binaries. The target is not currently built on CI, but it can be built locally
      with:
      
          ./configure --target=aarch64-pc-windows-msvc --set rust.lld
          ./x.py build src/libstd --target aarch64-pc-windows-msvc
      
      Currently this fails to build `libtest` due to a linker bug (seemingly in LLD?)
      which hasn't been investigate yet. Otherwise though with libstd you can build a
      hello world program (linked with LLD). I've not tried to execute it yet, but it
      at least links!
      
      Full support for this target is still a long road ahead, but this is hopefully a
      good stepping stone to get started.
      
      Points of note about this target are:
      
      * Currently defaults to `panic=abort` as support is still landing in LLVM for
        SEH on AArch64.
      * Currently defaults to LLD as a linker as I was able to get farther with it
        than I was with `link.exe`
      b837f5be
    • B
      Auto merge of #53147 - ashtneoi:dont-suggest-ref, r=estebank · 142bb273
      bors 提交于
      For move errors, suggest match ergonomics instead of `ref`
      
      Partially fixes issue #52423. Also makes errors and suggestions more consistent between move-from-place and move-from-value errors.
      
      Limitations:
      - Only the first pattern in a match arm can have a "consider removing this borrow operator" suggestion.
      - Suggestions don't always compile as-is (see the TODOs in the test for details).
      
      Sorry for the really long test. I wanted to make sure I handled every case I could think of, and it turned out there were a lot of them.
      
      Questions:
      - Is there any particular applicability I should set on those suggestions?
      - Are the notes about the `Copy` trait excessive?
      142bb273
    • B
      Auto merge of #53295 - estebank:on-unimplemented, r=michaelwoerister · 996e26c2
      bors 提交于
      Various changes to `rustc_on_unimplemented`
      
      - Add `from_method` and `from_desugaring` to formatting options
      - Change wording of errors slightly
      996e26c2
    • A
      Split tests more and bless them again · 0023dd9b
      ashtneoi 提交于
      0023dd9b