1. 07 4月, 2016 2 次提交
  2. 05 4月, 2016 4 次提交
    • B
      Auto merge of #32328 - jseyfried:coherence, r=nikomatsakis · 7fd331e1
      bors 提交于
      resolve: Improve import failure detection and lay groundwork for RFC 1422
      
      This PR improves import failure detection and lays some groundwork for RFC 1422.
      More specifically, it
       - Avoids recomputing the resolution of an import directive's module path.
       - Refactors code in `resolve_imports` that does not scale to the arbitrarily many levels of visibility that will be required by RFC 1422.
        - Replaces `ModuleS`'s fields `public_glob_count`, `private_glob_count`, and `resolved_globs` with a list of glob import directives `globs`.
        - Replaces `NameResolution`'s fields `pub_outstanding_references` and `outstanding_references` with a field `single_imports` of a newly defined type `SingleImports`.
       - Improves import failure detection by detecting cycles that include single imports (currently, only cycles of globs are detected). This fixes #32119.
      
      r? @nikomatsakis
      7fd331e1
    • B
      Auto merge of #32647 - Amanieu:checked_atomic_intrinsics, r=eddyb · 600dc355
      bors 提交于
      Only allow using the atomic intrinsics on integer types
      
      Using these with non-integer types results in LLVM asserts. Atomic operations on non-integer types will require values be transmuted into an integer type of suitable size.
      
      This doesn't affect the standard library since `AtomicBool` and `AtomicPtr` currently use `usize` for atomic operations.
      
      r? @EddyB
      600dc355
    • B
      Auto merge of #32582 - nikomatsakis:issue-32326, r=aturon · 8d5e8457
      bors 提交于
      process cycles as soon as they are detected
      
      We used to wait for the recursion limit, but that might well be too
      long!
      
      Fixes #32326
      r? @aturon
      8d5e8457
    • N
      add error code to test · e733b86a
      Niko Matsakis 提交于
      e733b86a
  3. 04 4月, 2016 6 次提交
  4. 03 4月, 2016 10 次提交
    • B
      Auto merge of #32210 - Aatch:mir-traversal, r=nikomatsakis · c0b8c438
      bors 提交于
      rBreak Critical Edges and other MIR work
      
      This PR is built on top of #32080.
      
      This adds the basic depth-first traversals for MIR, preorder, postorder and reverse postorder. The MIR blocks are now translated using reverse postorder. There is also a transform for breaking critical edges, which includes the edges from `invoke`d calls (`Drop` and `Call`), to account for the fact that we can't add code after an `invoke`. It also stops generating the intermediate block (since the transform essentially does it if necessary already).
      
      The kinds of cases this deals with are difficult to produce, so the test is the one I managed to get. However, it seems to bootstrap with `-Z orbit`, which it didn't before my changes.
      c0b8c438
    • O
      913a2b4b
    • B
      Auto merge of #32168 - alexcrichton:fix-filecheck, r=aturon · 0894b062
      bors 提交于
      mk: Add configure option for disabling codegen tests
      
      Our `codegen` test suite requires the LLVM `FileCheck` utility but unfortunately
      this isn't always available in all custom LLVM roots (e.g. those specified via
      `--llvm-root`). This commit adds a `./configure` option called
      `--disable-codegen-tests` which will manually disable running these tests. In
      the case that this option is passed we can forgo the need for the `FileCheck`
      executable. Note that we still require `FileCheck` by default as we will attempt
      to run these tests.
      
      Closes #28667
      0894b062
    • A
      mk: Add configure option for disabling codegen tests · a3fdde74
      Alex Crichton 提交于
      Our `codegen` test suite requires the LLVM `FileCheck` utility but unfortunately
      this isn't always available in all custom LLVM roots (e.g. those specified via
      `--llvm-root`). This commit adds a `./configure` option called
      `--disable-codegen-tests` which will manually disable running these tests. In
      the case that this option is passed we can forgo the need for the `FileCheck`
      executable. Note that we still require `FileCheck` by default as we will attempt
      to run these tests.
      
      Closes #28667
      a3fdde74
    • B
      Auto merge of #32579 - michaelwoerister:stable-symbol-name-fix, r=eddyb · a09f386e
      bors 提交于
      Fix typo in TxCtxt::crate_disambiguator() and add test case.
      
      r? @nikomatsakis
      
      Fixes #32554
      a09f386e
    • M
      c2ede7e1
    • J
      Use a BitVector instead of Vec<bool> for recording cleanup blocks · 605bc042
      James Miller 提交于
      Also adds a FromIterator impl for BitVector to allow construction of a
      BitVector from an iterator yeilding bools.
      605bc042
    • B
      Auto merge of #32633 - frewsxcv:map-values-mut, r=alexcrichton · 080edd99
      bors 提交于
      Implement `values_mut` on `{BTree, Hash}Map`
      
      https://github.com/rust-lang/rust/issues/32551
      080edd99
    • B
      Auto merge of #32667 - dotdash:def_dec, r=nagisa · 5ab11d72
      bors 提交于
      Stop accepting declarations when looking for definitions
      
      eternally_available linkage isn't legal for declarations anyway, so the
      check for an externally_available declaration should never succeed, so
      let's remove it.
      5ab11d72
    • B
      Auto merge of #32598 - alexcrichton:rustbuild-osx, r=aturon · 3ec71b03
      bors 提交于
      rustbuild: Fix compile on OSX for 10.7
      
      This commit should help configure our OSX rustbuild builder for targeting 10.7.
      A key part of this is using `libc++` instead of `libstdc++` as apparently it's
      more filled out and otherwise LLVM's cmake configuration would fail.
      3ec71b03
  5. 02 4月, 2016 14 次提交
    • B
      Auto merge of #32562 - ben0x539:bug-macro, r=nikomatsakis · 1af79cf3
      bors 提交于
      librustc: Add bug!(), bug_span!() macros as unified entry points for internal compiler errors
      
      The macros pass `file!()`, `line!()` and `format_args!(...)` on to a cold, never-inlined function, ultimately calling `session::{span_,}bug_fmt` via the tcx in tls or, failing that, panicking directly.
      
      cc @EddyB
      r? @nikomatsakis
      1af79cf3
    • B
      Auto merge of #32549 - respeccing:rust_backtrace_disabled, r=alexcrichton · f2285bda
      bors 提交于
      allow RUST_BACKTRACE=0 to act as if unset
      
      **UPDATE:** `RUST_BACKTRACE=0` to act as if the env. var is unset! (now `0` is what `disabled` was for, below)
      
      When RUST_BACKTRACE is set to "disabled" then this acts as if the env. var is unset. So, either make sure `RUST_BACKTRACE` is not set OR set it to `disabled` to achieve the same effect.
      
      Sample usage:
      
      ```bash
      $ rustc -o /tmp/a.out -- <(echo 'fn main(){ panic!() }') && RUST_BACKTRACE=disabled /tmp/a.out
      !! executing '/home/zazdxscf/build/1nonpkgs/rust/rust//x86_64-unknown-linux-gnu/stage2/bin//rustc' with args: '-o /tmp/a.out -- /dev/fd/63'
      thread '<main>' panicked at 'explicit panic', /dev/fd/63:1
      note: Run with `RUST_BACKTRACE=1` for a backtrace.
      
      $ rustc -o /tmp/a.out -- <(echo 'fn main(){ panic!() }') && RUST_BACKTRACE=1 /tmp/a.out
      !! executing '/home/zazdxscf/build/1nonpkgs/rust/rust//x86_64-unknown-linux-gnu/stage2/bin//rustc' with args: '-o /tmp/a.out -- /dev/fd/63'
      thread '<main>' panicked at 'explicit panic', /dev/fd/63:1
      stack backtrace:
         1:     0x55709e8148c0 - sys::backtrace::tracing::imp::write::h140f24a0cfc189b98Ru
         2:     0x55709e816a5b - panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::closure.45165
         3:     0x55709e8166e8 - panicking::default_hook::hed419823688cb82aXoA
         4:     0x55709e810fff - sys_common::unwind::begin_unwind_inner::hbb9642f6e212d56fmHt
         5:     0x55709e810513 - sys_common::unwind::begin_unwind::h16232867470678019594
         6:     0x55709e810489 - main::hb524f9576270962feaa
         7:     0x55709e816314 - sys_common::unwind::try::try_fn::h1274188004693518534
         8:     0x55709e813dfb - __rust_try
         9:     0x55709e815dab - rt::lang_start::h712b1cd650781872ahA
        10:     0x55709e810679 - main
        11:     0x7efd1026859f - __libc_start_main
        12:     0x55709e810348 - _start
        13:                0x0 - <unknown>
      ```
      
      Some programs(eg. [vim's syntactic](https://github.com/scrooloose/syntastic) used by [rust.vim](https://github.com/rust-lang/rust.vim)) cannot unset the env. var RUST_BACKTRACE if it's already set(eg. in .bashrc) but [they can set it to some value](https://github.com/respeccing/gentooskyline/blob/cb5533e1598f871d3fdf7c3d8248ce767b5b9360/system/Z575/OSes/gentoo/on_baremetal/filesystem_now/gentoo/home/zazdxscf/build/1nonpkgs/rust.vim/upd#L17), and I needed to ensure the env. var is unset in order to avoid this issue: https://github.com/rust-lang/rust/issues/29293
      
      **EDIT:** Sample usage 2:
      
      ```bash
      $ export RUST_BACKTRACE=1
      
      $ rustc -o /tmp/a.out -- <(echo 'fn main(){ panic!() }') && /tmp/a.out
      !! executing '/home/zazdxscf/build/1nonpkgs/rust/rust//x86_64-unknown-linux-gnu/stage2/bin//rustc' with args: '-o /tmp/a.out -- /dev/fd/63'
      thread '<main>' panicked at 'explicit panic', /dev/fd/63:1
      stack backtrace:
         1:     0x55c2696738c0 - sys::backtrace::tracing::imp::write::h140f24a0cfc189b98Ru
         2:     0x55c269675a5b - panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::closure.45165
         3:     0x55c2696756e8 - panicking::default_hook::hed419823688cb82aXoA
         4:     0x55c26966ffff - sys_common::unwind::begin_unwind_inner::hbb9642f6e212d56fmHt
         5:     0x55c26966f513 - sys_common::unwind::begin_unwind::h16023941661074805588
         6:     0x55c26966f489 - main::hb524f9576270962feaa
         7:     0x55c269675314 - sys_common::unwind::try::try_fn::h1274188004693518534
         8:     0x55c269672dfb - __rust_try
         9:     0x55c269674dab - rt::lang_start::h712b1cd650781872ahA
        10:     0x55c26966f679 - main
        11:     0x7f593d58459f - __libc_start_main
        12:     0x55c26966f348 - _start
        13:                0x0 - <unknown>
      
      $ rustc -o /tmp/a.out -- <(echo 'fn main(){ panic!() }') && RUST_BACKTRACE=disabled /tmp/a.out
      !! executing '/home/zazdxscf/build/1nonpkgs/rust/rust//x86_64-unknown-linux-gnu/stage2/bin//rustc' with args: '-o /tmp/a.out -- /dev/fd/63'
      thread '<main>' panicked at 'explicit panic', /dev/fd/63:1
      note: Run with `RUST_BACKTRACE=1` for a backtrace.
      
      ```
      f2285bda
    • A
      add missing spaces in #16758 warning · a14f14f6
      Alex Burka 提交于
      a14f14f6
    • B
      Auto merge of #32334 - tbu-:pr_ipv6_octets, r=aturon · 211c35af
      bors 提交于
      Add functions to convert IPv6 addresses from and to octets
      
      See also #32313.
      211c35af
    • B
      Auto merge of #32666 - Manishearth:rollup, r=Manishearth · 18172d13
      bors 提交于
      Rollup of 11 pull requests
      
      - Successful merges: #32622, #32629, #32640, #32641, #32642, #32645, #32647, #32649, #32652, #32654, #32656
      - Failed merges:
      18172d13
    • O
      564ec1ae
    • C
    • C
    • M
      Rollup merge of #32656 - tbu-:pr_ty_outdated_comment, r=alexcrichton · 45c47699
      Manish Goregaokar 提交于
      Remove incorrect comment about `PartialEq` implementation
      45c47699
    • M
      Rollup merge of #32654 - tbu-:pr_doc_joinhandleext, r=sfackler · 55dbffe6
      Manish Goregaokar 提交于
      Fix a typo in the doc comment of `std::os::unix::thread::JoinHandleExt`
      55dbffe6
    • M
      Rollup merge of #32652 - VFLashM:refcell_ref_coercion, r=alexcrichton · cf0a01a1
      Manish Goregaokar 提交于
      Added missing refcell ref/refmut coercions to unsized
      
      Ref/RefMut should be coercible to unsized.
      This commit adds a unit test and two missing CoerceUnsized implementations.
      cf0a01a1
    • B
      Auto merge of #32544 - alexcrichton:rustbuild-dist-libtest, r=brson · c8b8eb1f
      bors 提交于
      rustbuild: Fix dist for non-host targets
      
      The `rust-std` package that we produce is expected to have not only the standard
      library but also libtest for compiling unit tests. Unfortunately this does not
      currently happen due to the way rustbuild is structured.
      
      There are currently two main stages of compilation in rustbuild, one for the
      standard library and one for the compiler. This is primarily done to allow us to
      fill in the sysroot right after the standard library has finished compiling to
      continue compiling the rest of the crates. Consequently the entire compiler does
      not have to explicitly depend on the standard library, and this also should
      allow us to pull in crates.io dependencies into the build in the future because
      they'll just naturally build against the std we just produced.
      
      These phases, however, do not represent a cross-compiled build. Target-only
      builds also require libtest, and libtest is currently part of the
      all-encompassing "compiler build". There's unfortunately no way to learn about
      just libtest and its dependencies (in a great and robust fashion) so to ensure
      that we can copy the right artifacts over this commit introduces a new build
      step, libtest.
      
      The new libtest build step has documentation, dist, and link steps as std/rustc
      already do. The compiler now depends on libtest instead of libstd, and all
      compiler crates can now assume that test and its dependencies are implicitly
      part of the sysroot (hence explicit dependencies being removed). This makes the
      build a tad less parallel as in theory many rustc crates can be compiled in
      parallel with libtest, but this likely isn't where we really need parallelism
      either (all the time is still spent in the compiler).
      
      All in all this allows the `dist-std` step to depend on both libstd and libtest,
      so `rust-std` packages produced by rustbuild should start having both the
      standard library and libtest.
      
      Closes #32523
      c8b8eb1f
    • M
      Fix typo in TxCtxt::crate_disambiguator(). · 6bd72999
      Michael Woerister 提交于
      6bd72999
    • A
      rustbuild: Fix dist for non-host targets · 3d6340ff
      Alex Crichton 提交于
      The `rust-std` package that we produce is expected to have not only the standard
      library but also libtest for compiling unit tests. Unfortunately this does not
      currently happen due to the way rustbuild is structured.
      
      There are currently two main stages of compilation in rustbuild, one for the
      standard library and one for the compiler. This is primarily done to allow us to
      fill in the sysroot right after the standard library has finished compiling to
      continue compiling the rest of the crates. Consequently the entire compiler does
      not have to explicitly depend on the standard library, and this also should
      allow us to pull in crates.io dependencies into the build in the future because
      they'll just naturally build against the std we just produced.
      
      These phases, however, do not represent a cross-compiled build. Target-only
      builds also require libtest, and libtest is currently part of the
      all-encompassing "compiler build". There's unfortunately no way to learn about
      just libtest and its dependencies (in a great and robust fashion) so to ensure
      that we can copy the right artifacts over this commit introduces a new build
      step, libtest.
      
      The new libtest build step has documentation, dist, and link steps as std/rustc
      already do. The compiler now depends on libtest instead of libstd, and all
      compiler crates can now assume that test and its dependencies are implicitly
      part of the sysroot (hence explicit dependencies being removed). This makes the
      build a tad less parallel as in theory many rustc crates can be compiled in
      parallel with libtest, but this likely isn't where we really need parallelism
      either (all the time is still spent in the compiler).
      
      All in all this allows the `dist-std` step to depend on both libstd and libtest,
      so `rust-std` packages produced by rustbuild should start having both the
      standard library and libtest.
      
      Closes #32523
      3d6340ff
  6. 01 4月, 2016 4 次提交