1. 10 11月, 2018 1 次提交
  2. 09 11月, 2018 19 次提交
    • B
      Auto merge of #55803 - Mark-Simulacrum:rollup, r=Mark-Simulacrum · 36a50c29
      bors 提交于
      Rollup of 17 pull requests
      
      Successful merges:
      
       - #55576 (Clarify error message for -C opt-level)
       - #55633 (Support memcpy/memmove with differing src/dst alignment)
       - #55638 (Fix ICE in msg_span_from_free_region on ReEmpty)
       - #55659 (rustc: Delete grouping logic from the musl target)
       - #55719 (Sidestep link error from rustfix'ed code by using a *defined* static.)
       - #55736 (Elide anon lifetimes in conflicting impl note)
       - #55739 (Consume optimization fuel from the MIR inliner)
       - #55742 (Avoid panic when matching function call)
       - #55753 (borrow_set: remove a helper function and a clone it uses)
       - #55755 (Improve creation of 3 IndexVecs)
       - #55758 ([regression - rust2018]: unused_mut lint false positives on nightly)
       - #55760 (Remove intermediate font specs)
       - #55761 (mir: remove a hacky recursive helper function)
       - #55774 (wasm32-unknown-emscripten expects the rust_eh_personality symbol)
       - #55777 (Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.)
       - #55783 (Deprecate mpsc channel selection)
       - #55788 (rustc: Request ansi colors if stderr isn't a tty)
      
      Failed merges:
      
      r? @ghost
      36a50c29
    • M
      Rollup merge of #55788 - alexcrichton:wincolors, r=petrochenkov · d293d1ee
      Mark Rousskov 提交于
      rustc: Request ansi colors if stderr isn't a tty
      
      Currently Cargo will always capture the output of rustc meaning that
      rustc is never hooked up to a tty. To retain colors Cargo uses the
      `fwdansi` crate to ensure that ansi color codes are translated to
      windows terminal methods (and ansi codes otherwise just go their natural
      route on Unix).
      
      Cargo passes `--color always` to rustc to ensure that using a pipe
      doesn't trick it into not emitting colors at all. It turns out, however,
      that `--color always` ends up still accidentally using the native shell
      api on native windows shells.
      
      The fix here is to instead pass `AlwaysAnsi` to `termcolor` instead of
      `Always`, ensuring that when `--color always` is passed to rustc and its
      output isn't a terminal, we're always generating ansi colors regardless
      of the platform.
      
      Closes #55769
      d293d1ee
    • M
      Rollup merge of #55783 - stjepang:deprecate-select, r=SimonSapin · 667904f0
      Mark Rousskov 提交于
      Deprecate mpsc channel selection
      
      Rationale: https://github.com/rust-lang/rust/issues/27800#issuecomment-421760863
      
      r? @SimonSapin
      667904f0
    • M
      Rollup merge of #55777 - nnethercote:less-P-in-ast, r=petrochenkov · 686de87d
      Mark Rousskov 提交于
      Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.
      
      Because it results in fewer allocations and small speedups on some
      benchmarks.
      686de87d
    • M
      Rollup merge of #55774 - CryZe:patch-5, r=alexcrichton · 7125b8fa
      Mark Rousskov 提交于
      wasm32-unknown-emscripten expects the rust_eh_personality symbol
      
      The `wasm32-unknown-emscripten` expects the `rust_eh_personality` symbol to be there, but a cfg checking for `target_arch = "wasm32"` which was meant to remove the symbol from the `wasm32-unknown-unknown` target, didn't check for whether `emscripten` is targeted or not, so the symbol accidentally got filtered out there as well.
      
      Fixes #55276
      7125b8fa
    • M
      Rollup merge of #55761 - ljedrz:fix_promote_candidate_hack, r=estebank · 6117195b
      Mark Rousskov 提交于
      mir: remove a hacky recursive helper function
      
      It can be replaced with a `while let` loop.
      6117195b
    • M
      Rollup merge of #55760 - jonhoo:no-intermediate-fonts, r=GuillaumeGomez · 2d0a6978
      Mark Rousskov 提交于
      Remove intermediate font specs
      
      This is a (much) more constrained version of #54772 that also aims at improving the situation in #34681. It removes any font specifications that are not the "official" rustdoc font, and instead relies on the browser to provide the fallback font if the official on is not available. On Linux systems, this is particularly important, as fonts like Helvetica, Arial, and Times often look pretty bad since they're pulled from extracted MS fonts. A specification like `serif` or `sans-serif` lets the browser instead choose a good font.
      2d0a6978
    • M
      Rollup merge of #55758 - davidtwco:issue-55344, r=pnkfelix · 7944075e
      Mark Rousskov 提交于
      [regression - rust2018]: unused_mut lint false positives on nightly
      
      Fixes #55344.
      
      This commit filters out locals that have never been initialized for
      consideration in the `unused_mut` lint.
      
      This is intended to detect when the statement that would have
      initialized the local was removed as unreachable code. In these cases,
      we would not want to lint. This is the same behaviour as the AST borrow
      checker.
      
      This is achieved by taking advantage of an existing pass over the MIR
      for the `unused_mut` lint and creating a set of those locals that were
      never initialized.
      
      r? @pnkfelix
      7944075e
    • M
      Rollup merge of #55755 - ljedrz:a_few_indexvec_tweaks, r=varkor · 660340e4
      Mark Rousskov 提交于
      Improve creation of 3 IndexVecs
      
      - preallocate when the minimal size is known
      - use `from_elem_n` instead of `new`+`resize`
      660340e4
    • M
      Rollup merge of #55753 - ljedrz:borrow_set_insert_clone, r=oli-obk · 7864780f
      Mark Rousskov 提交于
      borrow_set: remove a helper function and a clone it uses
      
      This clone doesn't seem necessary.
      
      r? @oli-obk
      7864780f
    • M
      Rollup merge of #55742 - F001:fix-55718, r=petrochenkov · 79247651
      Mark Rousskov 提交于
      Avoid panic when matching function call
      
      Fix #55718
      
      This bug is introduced by #53751. The original code checked `Def::AssociatedConst(..) | Def::Method(..)` before `pat_ty.no_bound_vars().expect("expected fn type")`. But somehow I exchanged the sequence carelessly. Sorry about that.
      
      r? @petrochenkov
      79247651
    • M
      Rollup merge of #55739 - wesleywiser:mir_inline_fuel, r=nikomatsakis · 96ee13a5
      Mark Rousskov 提交于
      Consume optimization fuel from the MIR inliner
      
      This makes it easier to debug mis-optimizations that occur during
      inlining. Thanks to @nikomatsakis for the suggestion!
      96ee13a5
    • M
      Rollup merge of #55736 - estebank:elide-anon-lt, r=petrochenkov · e873984f
      Mark Rousskov 提交于
      Elide anon lifetimes in conflicting impl note
      
      Fix #54690.
      e873984f
    • M
      Rollup merge of #55719 -... · 8fd4e5a4
      Mark Rousskov 提交于
      Rollup merge of #55719 - pnkfelix:issue-54388-sidestep-link-error-from-rustfixed-code, r=alexcrichton
      
      Sidestep link error from rustfix'ed code by using a *defined* static.
      
      As a drive-by, added `-g` to the compile-flags so that the test more
      reliably fails to compile when the extern static in question is *not*
      provided. (I.e. this is making the test more robust in the face of
      potential future revisions.)
      
      Fix #54388.
      8fd4e5a4
    • M
      Rollup merge of #55659 - alexcrichton:musl-no-group, r=michaelwoerister · 602a8b40
      Mark Rousskov 提交于
      rustc: Delete grouping logic from the musl target
      
      This commit deletes the injection of `-(` and `-)` options to the linker
      for the musl targets. This actually causes problems today on nightly if
      you execute:
      
          $ echo 'fn main() {}' >> foo.rs
          $ rustc --target x86_64-unknown-linux-musl -C panic=abort
      
      you get a linker error about "cannot nest groups". This comes about
      because rustc injects its own `--start-group` and `--end-group`
      variables which clash with the outer `-(` and `-)` variables. It's not
      entirely clear to me why this doesn't affect the musl target by default
      (in `-C panic=unwind` mode).
      
      The compiler's own injection of `--start-group` and `--end-group` should
      solve the issues mentioned in the comment for injecting `-(` and `-)` as
      well.
      602a8b40
    • M
      Rollup merge of #55638 - pnkfelix:issue-55608-ice-reempty-msg_span_from_free_region, r=estebank · 4805a972
      Mark Rousskov 提交于
      Fix ICE in msg_span_from_free_region on ReEmpty
      
      On an example like this:
      
      ```rust
      #![feature(conservative_impl_trait)]
      
      fn server() -> impl FilterBase2 {
          segment2(|| { loop { } }).map2(|| "")
      }
      
      trait FilterBase2 {
          fn map2<F>(self, _fn: F) -> Map2<F> where Self: Sized { loop { } }
      }
      
      struct Map2<F> { _func: F }
      
      impl<F> FilterBase2 for Map2<F> { }
      
      fn segment2<F>(_fn: F) -> Map2<F> where F: Fn() -> Result<(), ()> {
          loop { }
      }
      ```
      
      we now, instead of ICE'ing, get a diagnostic like:
      
      ```
      error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
       --> issue-55608.rs:3:16
        |
      3 | fn server() -> impl FilterBase2 {
        |                ^^^^^^^^^^^^^^^^
        |
        = note: hidden type `Map2<[closure@issue-55608.rs:4:36: 4:41]>` captures an empty lifetime
      ```
      
      Fix #55608
      4805a972
    • M
      Rollup merge of #55633 - nikic:memcpy-align, r=nagisa · 78cab361
      Mark Rousskov 提交于
      Support memcpy/memmove with differing src/dst alignment
      
      If LLVM 7 is used, generate memcpy/memmove with differing src/dst alignment. I've added new FFI functions to construct these through the builder API, which is more convenient than dealing with differing intrinsic signatures depending on the LLVM version.
      
      Fixes #49740.
      78cab361
    • M
      Rollup merge of #55576 - birkenfeld:opt-level-error-msg, r=cramertj · 6153ce12
      Mark Rousskov 提交于
      Clarify error message for -C opt-level
      
      The new levels s and z are not mentioned as possible values.
      6153ce12
    • S
      Deprecate channel selection · d75dae30
      Stjepan Glavina 提交于
      d75dae30
  3. 08 11月, 2018 11 次提交
    • A
      rustc: Request ansi colors if stderr isn't a tty · 255cc1ae
      Alex Crichton 提交于
      Currently Cargo will always capture the output of rustc meaning that
      rustc is never hooked up to a tty. To retain colors Cargo uses the
      `fwdansi` crate to ensure that ansi color codes are translated to
      windows terminal methods (and ansi codes otherwise just go their natural
      route on Unix).
      
      Cargo passes `--color always` to rustc to ensure that using a pipe
      doesn't trick it into not emitting colors at all. It turns out, however,
      that `--color always` ends up still accidentally using the native shell
      api on native windows shells.
      
      The fix here is to instead pass `AlwaysAnsi` to `termcolor` instead of
      `Always`, ensuring that when `--color always` is passed to rustc and its
      output isn't a terminal, we're always generating ansi colors regardless
      of the platform.
      
      Closes #55769
      255cc1ae
    • L
      Improve creation of 3 IndexVecs · e3390d89
      ljedrz 提交于
      e3390d89
    • B
      Auto merge of #55532 - pnkfelix:rustc_error-survey, r=nikomatsakis · 653da4fd
      bors 提交于
      #[rustc_error] survey
      
      Fix #55505
      653da4fd
    • N
      Use `Lit` rather than `P<Lit>` in `ast::ExprKind`. · 706c2ad6
      Nicholas Nethercote 提交于
      Because it results in fewer allocations and small speedups on some
      benchmarks.
      706c2ad6
    • B
      Auto merge of #55366 - Amanieu:stable_layout, r=Amanieu · 1d834550
      bors 提交于
      Add tracking issue for Layout methods (and some API changes)
      
      These methods are already useful when used with the stable global allocator API (stabilized in #51241).
      
      ```rust
      pub fn align_to(&self, align: usize) -> Result<Layout, LayoutErr>;
      pub fn padding_needed_for(&self, align: usize) -> usize;
      pub fn repeat(&self, n: usize) -> Result<(Layout, usize), LayoutErr>;
      pub fn extend(&self, next: Layout) -> Result<(Layout, usize), LayoutErr>;
      pub fn repeat_packed(&self, n: usize) -> Result<Layout, LayoutErr>;
      pub fn extend_packed(&self, next: Layout) -> Result<Layout, LayoutErr>;
      pub fn array<T>(n: usize) -> Result<Layout, LayoutErr>;
      ```
      
      cc #32838
      
      r? @SimonSapin
      1d834550
    • C
      wasm32-unknown-emscripten expects the rust_eh_personality symbol · a9b59888
      Christopher Serr 提交于
      The `wasm32-unknown-emscripten` expects the `rust_eh_personality` symbol to be there, but a cfg checking for `target_arch = "wasm32"` which was meant to remove the symbol from the `wasm32-unknown-unknown` target, didn't check for whether `emscripten` is targeted or not, so the symbol accidentally got filtered out there as well.
      
      Fixes #55276
      a9b59888
    • B
      Auto merge of #55187 - malbarbo:fix-manifest, r=alexcrichton · 9c304fb0
      bors 提交于
      Remove targets from the manifest that are not built on travis
      
      Fixes https://github.com/rust-lang/rust/issues/55020
      9c304fb0
    • M
    • B
      Auto merge of #55746 - kennytm:rollup, r=kennytm · 25a42b2c
      bors 提交于
      Rollup of 14 pull requests
      
      Successful merges:
      
       - #55377 (Slight copy-editing for `std::cell::Cell` docs)
       - #55441 (Remove unused re import in gdb_rust_pretty_printing)
       - #55453 (Choose predicates without inference variables over those with them)
       - #55495 (Don't print opt fuel messages to stdout because it breaks Rustbuild)
       - #55501 (Make `process_obligations`' computation of `completed` optional.)
       - #55510 (Fix feature gate only being checked on first repr attr.)
       - #55609 (Run name-anon-globals after LTO passes as well)
       - #55645 (do not print wrapping ranges like normal ranges in validity diagnostics)
       - #55688 (Standardised names and location of ui issue tests)
       - #55692 (-C remark: fix incorrect warning about requiring "--debuginfo" instead of "-C debuginfo=n")
       - #55702 (Add `aarch64-pc-windows-msvc` to deployed targets)
       - #55728 (Update lldb)
       - #55730 (Use trait impl method span when type param mismatch is due to impl Trait)
       - #55734 (refactor: use shorthand fields)
      25a42b2c
    • J
      Remove intermediate font specs · 36f815bf
      Jon Gjengset 提交于
      This is a (much) more constrained version of #54772 that also aims at
      improving the situation in #34681. It removes any font specifications
      that are not the "official" rustdoc font, and instead relies on the
      browser to provide the fallback font if the official on is not
      available. On Linux systems, this is particularly important, as fonts
      like Helvetica, Arial, and Times often look pretty bad since they're
      pulled from extracted MS fonts. A specification like `serif` or
      `sans-serif` lets the browser instead choose a good font.
      36f815bf
    • L
      mir: remove a hacky recursive helper function · 5159b329
      ljedrz 提交于
      5159b329
  4. 07 11月, 2018 9 次提交