1. 25 4月, 2016 2 次提交
  2. 24 4月, 2016 3 次提交
  3. 23 4月, 2016 9 次提交
    • B
      Auto merge of #33092 - alexcrichton:rustbuild-docs, r=brson · f01bb5ed
      bors 提交于
      rustbuild: Run all markdown documentation tests
      
      This commit adds support to rustbuild to run all documentation tests, basically
      running `rustdoc --test` over all our documentation.
      f01bb5ed
    • B
      Auto merge of #33084 - alexcrichton:osx-python-sanity, r=michaelwoerister · ef57fb71
      bors 提交于
      Sanity check Python on OSX for LLDB tests
      
      Two primary changes:
      
      * Don't get past the configure stage if `python` isn't coming from `/usr/bin`
      * Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB.
      
      Closes #32994
      ef57fb71
    • B
      Auto merge of #33020 - nikomatsakis:compiletest-json, r=alexcrichton · bb4b0d89
      bors 提交于
      port compiletest to use JSON output
      
      This uncovered a lot of bugs in compiletest and also some shortcomings
      of our existing JSON output. We had to add information to the JSON
      output, such as suggested text and macro backtraces. We also had to fix
      various bugs in the existing tests.
      
      Joint work with @jonathandturner.
      
      r? @alexcrichton
      bb4b0d89
    • B
      Auto merge of #32466 - jooert:btree_append, r=apasel422 · 66ff1630
      bors 提交于
      Implement `append` for b-trees.
      
      I have finally found time to revive #26227, this time only with an `append` implementation.
      
      The algorithm implemented here is linear in the size of the two b-trees. It firsts creates
      a `MergeIter` from the two b-trees and then builds a new b-tree by pushing
      key-value pairs from the `MergeIter` into nodes at the right heights.
      
      Three functions for stealing have been added to the implementation of `Handle` as
      well as a getter for the height of a `NodeRef`.
      
      The docs have been updated with performance information about `BTreeMap::append` and
      the remark about B has been removed now that it is the same for all instances of `BTreeMap`.
      
      cc @gereeter @Gankro @apasel422
      66ff1630
    • B
      Auto merge of #31169 - gmbonnet:disable-option-checking, r=brson · af000a7b
      bors 提交于
      configure: Support --disable-option-checking
      
      I'm trying to package Rust for Fedora (this is nothing official (yet)).
      
      The standard RPM packaging process involves running `./configure` with a whole lot of options that are commonly recognized by autotools configure scripts, but not by Rust's one. Since it does not make much sense to support all of this options, I think it would be great to support at least `--disable-option-checking`, so Rust's configure script would not fail.
      
      [The old attempt](https://github.com/fabiand/rust-spec/blob/master/rustc.spec) to package Rust used a sed script (at line 72), but this is not the recommended way to do that.
      af000a7b
    • M
      Only record the same impl once · 8ab2c20d
      mitaa 提交于
      Due to inlining it is possible to visit the same module multiple times
      during `<Cache as DocFolder>::fold_crate`, so we keep track of the
      modules we've already visited.
      8ab2c20d
    • J
      Fix filepath check for macro backtrace · 10d4cda9
      Jonathan Turner 提交于
      10d4cda9
    • G
    • G
      configure: Support --disable-option-checking · b22c8ec5
      Guillaume Bonnet 提交于
      b22c8ec5
  4. 22 4月, 2016 6 次提交
    • J
    • B
      Auto merge of #33089 - nrc:hir-name-res, r=eddyb · a264f5b7
      bors 提交于
      Move def id collection and extern crate handling to before AST->HIR lowering
      
      r? @jseyfried, @EddyB, or @nikomatsakis
      a264f5b7
    • J
      Implement `append` for b-trees. · 241a3e46
      Johannes Oertel 提交于
      The algorithm implemented here is linear in the size of the two b-trees. It
      firsts creates a `MergeIter` from the two b-trees and then builds a new b-tree
      by pushing key-value pairs from the `MergeIter` into nodes at the right heights.
      
      Three functions for stealing have been added to the implementation of `Handle` as
      well as a getter for the height of a `NodeRef`.
      
      The docs have been updated with performance information about `BTreeMap::append` and
      the remark about B has been removed now that it is the same for all instances of `BTreeMap`.
      241a3e46
    • J
      Fix for filepath for cfail tests in windows · fd0632fa
      Jonathan Turner 提交于
      fd0632fa
    • B
      Auto merge of #33079 - bluss:split-iter, r=alexcrichton · 887e9471
      bors 提交于
      Split core::iter module implementation into parts
      
      Split core::iter module implementation into parts
      
      split iter.rs into a directory of (implementation private) modules.
      
      + mod (adaptor structs whose private fields need to be available both for them and Iterator
        + iterator (Iterator trait)
        + traits (FromIterator, etc; all traits but Iterator itself)
        + range (range related)
        + sources (Repeat, Once, Empty)
      887e9471
    • B
      Auto merge of #33074 - mitaa:rdoc-irlst, r=alexcrichton · b5ba5923
      bors 提交于
      rustdoc: Fix the strip-hidden `ImplStripper`
      
      Instead of stripping impls which reference *stripped* items, we keep impls which reference *retained* items. We do this because when we strip an item we immediately return, and do not recurse into it - leaving the contained items non-stripped from the point of view of the `ImplStripper`.
      
      fixes #33069
      
      r? @alexcrichton
      b5ba5923
  5. 21 4月, 2016 13 次提交
    • N
      fix `transmute-from-fn-item-types-lint` · 399149ac
      Niko Matsakis 提交于
      This test was relying on buggy behavior.
      399149ac
    • N
      add serialize as a dep for compiletest · 906cc48d
      Niko Matsakis 提交于
      906cc48d
    • N
      fix broken test revealed by compiletest · 7aa59479
      Niko Matsakis 提交于
      7aa59479
    • N
      move json.rs file · 6ce5e770
      Niko Matsakis 提交于
      6ce5e770
    • N
      pacify the merciless acrichto (somewhat) · 28a3c881
      Niko Matsakis 提交于
      Also add a comment or two to pacify the merciless self-critic, who hates
      a closure without a comment.
      28a3c881
    • N
      improve tidy to give you file that failed · bf624c41
      Niko Matsakis 提交于
      the current tidy panics give you no idea why it failed
      bf624c41
    • N
      port compiletest to use JSON output · 01d2b4ab
      Niko Matsakis 提交于
      This uncovered a lot of bugs in compiletest and also some shortcomings
      of our existing JSON output. We had to add information to the JSON
      output, such as suggested text and macro backtraces. We also had to fix
      various bugs in the existing tests.
      
      Joint work with jntrnr.
      01d2b4ab
    • S
      Remove IPV6_V6ONLY functionality · c6480e8b
      Steven Fackler 提交于
      These settings can only be adjusted before bind time, which doesn't make
      sense in the current set of functionality. These methods are stable, but
      haven't hit a stable release yet.
      
      Closes #33052
      
      [breaking-change]
      c6480e8b
    • B
      Auto merge of #33030 - nagisa:mir-unrequire-end-block, r=nikomatsakis · 6e036082
      bors 提交于
      MIR: Do not require END_BLOCK to always exist
      
      Basically, all this does, is removing restriction for END_BLOCK to exist past the first invocation of RemoveDeadBlocks pass. This way for functions whose CFG does not reach the `END_BLOCK` end up not containing the block.
      
      As far as the implementation goes, I’m not entirely satisfied with the `BasicBlock::end_block`. I had hoped to make `new` a `const fn` and then just have a `const END_BLOCK` private to mir::build, but it turns out that constant functions don’t yet support conditionals nor a way to assert.
      6e036082
    • B
      Auto merge of #33011 - alexcrichton:pkg-everything, r=brson · 95545e7a
      bors 提交于
      rustbuild: Package librustc & co for cross-hosts
      
      Currently the `rust-std` package produced by rustbuild only contains the
      standard library plus libtest, but the makefiles actually produce a `rust-std`
      package with all known target libraries (including libsyntax, librustc, etc).
      Tweak the behavior so the dependencies of the `dist-docs` step in rustbuild
      depend on the compiler libraries as well (so that they're all packaged).
      
      Closes #32984
      95545e7a
    • T
    • B
      Auto merge of #32968 - alexcrichton:update-suport, r=brson · a0c32598
      bors 提交于
      doc: Update our tier support
      
      This modifies our listing of tiered platforms a few ways:
      
      * All lists are alphabetized based on target now
      * Lots of targets are moved up to "Tier 2" as we're gating on all these builds
        and official releases are provided (and installable via rustup).
      * A few targets now list having a compiler + cargo now as well.
      
      No more platforms have been moved up to Tier 1 at this time, however. The only
      real candidate is ``x86_64-unknown-linux-musl`, but that's not *quite* to a tier
      1 level of quality just yet so let's hold off for another release or so to iron
      it out a bit.
      a0c32598
    • B
      Auto merge of #31709 - ranma42:target_feature-from-llvm, r=alexcrichton · 92e3fb3e
      bors 提交于
      Compute `target_feature` from LLVM
      
      This is a work-in-progress fix for #31662.
      
      The logic that computes the target features from the command line has been replaced with queries to the `TargetMachine`.
      92e3fb3e
  6. 20 4月, 2016 7 次提交
    • B
      Auto merge of #32939 - eddyb:layout, r=nikomatsakis · 6ece1447
      bors 提交于
      Compute LLVM-agnostic type layouts in rustc.
      
      Layout for monomorphic types, and some polymorphic ones (e.g. `&T` where `T: Sized`),
      can now be computed by rustc without involving LLVM in the actual process.
      
      This gives rustc the ability to evaluate `size_of` or `align_of`, as well as obtain field offsets.
      MIR-based CTFE will eventually make use of these layouts, as will MIR trans, shortly.
      
      Layout computation also comes with a `[breaking-change]`, or two:
      * `"data-layout"` is now mandatory in custom target specifications, reverting the decision from #27076.
      This string is needed because it describes endianness, pointer size and alignments for various types.
      We have the first two and we could allow tweaking alignments in target specifications.
      Or we could also extract the data layout from LLVM and feed it back into rustc.
      However, that can vary with the LLVM version, which is fragile and undermines stability.
      For built-in targets, I've added a check that the hardcoded data-layout matches LLVM defaults.
      * `transmute` calls are checked in a stricter fashion, which fixes #32377
      
      To expand on `transmute`, there are only 2 allowed patterns: between types with statically known sizes and between pointers with the same potentially-unsized "tail" (which determines the type of unsized metadata they use, if any).
      If you're affected, my suggestions are:
      * try to use casts (and raw pointer deref) instead of transmutes
      * *really* try to avoid `transmute` where possible
      * if you have a structure, try working on individual fields and unpack/repack the structure instead of transmuting it whole, e.g. `transmute::<RefCell<Box<T>>, RefCell<*mut T>>(x)` doesn't work, but `RefCell::new(Box::into_raw(x.into_inner()))` does (and `Box::into_raw` is just a `transmute`)
      6ece1447
    • B
      Auto merge of #32951 - LukasKalbertodt:collection_contains_rfc1552, r=brson · 133f60f8
      bors 提交于
      Add `contains` to `VecDeque` and `LinkedList` (+ tests)
      
      This implements [RFC 1552](https://github.com/rust-lang/rfcs/blob/master/text/1552-contains-method-for-various-collections.md). Tracking issue: #32630
      
      Sorry for the late response. This is my first contribution, so please tell me if anything isn't optimal!
      133f60f8
    • B
      Auto merge of #32942 - alexcrichton:bootstrap-from-previous, r=brson · 9bba2907
      bors 提交于
      mk: Bootstrap from stable instead of snapshots
      
      This commit removes all infrastructure from the repository for our so-called
      snapshots to instead bootstrap the compiler from stable releases. Bootstrapping
      from a previously stable release is a long-desired feature of distros because
      they're not fans of downloading binary stage0 blobs from us. Additionally, this
      makes our own CI easier as we can decommission all of the snapshot builders and
      start having a regular cadence to when we update the stage0 compiler.
      
      A new `src/etc/get-stage0.py` script was added which shares some code with
      `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists
      the current stage0 compiler as well as cargo that we bootstrap from. This script
      will download the relevant `rustc` package an unpack it into `$target/stage0` as
      we do today.
      
      One problem of bootstrapping from stable releases is that we're not able to
      compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd).
      To overcome this we employ two strategies:
      
      * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt`
        (enabled as a result of #32731) and exported by the build system. This enables
        nightly features in the compiler we download.
      * The standard library and compiler are pinned to a specific stage0, which
        doesn't change, so we're guaranteed that we'll continue compiling as we start
        from a known fixed source.
      
      The process for making a release will also need to be tweaked now to continue to
      cadence of bootstrapping from the previous release. This process looks like:
      
      1. Merge `beta` to `stable`
      2. Produce a new stable compiler.
      3. Change `master` to bootstrap from this new stable compiler.
      4. Merge `master` to `beta`
      5. Produce a new beta compiler
      6. Change `master` to bootstrap from this new beta compiler.
      
      Step 3 above should involve very few changes as `master` was previously
      bootstrapping from `beta` which is the same as `stable` at that point in time.
      Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and
      get to use new features. This also shouldn't slow the release too much as steps
      1-5 requires little work other than waiting and step 6 just needs to happen at
      some point during a release cycle, it's not time sensitive.
      
      Closes #29555
      Closes #29557
      9bba2907
    • A
      Check that the feature strings are well-formed · ce99a5e5
      Andrea Canciani 提交于
      Assert that the feature strings are NUL terminated, so that they will
      be well-formed as C strings.
      
      This is a safety check to ease the maintaninace and update of the
      feature lists.
      ce99a5e5
    • A
      Make the feature whitelists constants · deaa2fe7
      Andrea Canciani 提交于
      This simplifies the code a bit and makes the types nicer, too.
      deaa2fe7
    • B
      Auto merge of #32903 - alexcrichton:fix-rpath, r=brson · 3dd88f60
      bors 提交于
      rustbuild: Fix --enable-rpath usage
      
      This commit fixes the `--enable-rpath` configure flag in rustbuild to work
      despite the compile-time directories being different than the runtime
      directories. This unfortunately means that we can't use `-C rpath` out of the
      box but hopefully the portability story here isn't too bad as
      `src/librustc_back/rpath.rs` isn't *too* complicated.
      
      Closes #32886
      3dd88f60
    • B
      Auto merge of #31253 - ranma42:improve-unicode-iter-offset, r=brson · 9cf6fba9
      bors 提交于
      Improve computation of offset in `EscapeUnicode`
      
      Unify the computation of `offset` and use `leading_zeros` instead of manually scanning the bits.
      This PR removes some duplicated code and makes it a little simpler .
      The computation of `offset` is also faster, but it is unlikely to have an impact on actual code.
      
      (split from #31049)
      9cf6fba9