1. 27 11月, 2014 31 次提交
    • A
      rollup merge of #19312: steveklabnik/gh19177 · 935a39b3
      Alex Crichton 提交于
      935a39b3
    • A
      rollup merge of #19310: steveklabnik/gh19178 · 8790ab14
      Alex Crichton 提交于
      Fixes #19178
      8790ab14
    • A
      rollup merge of #19308: thestinger/oom · 989d7a78
      Alex Crichton 提交于
      Closes #19305
      989d7a78
    • A
      rollup merge of #19307: steveklabnik/gh19199 · 6939e4f5
      Alex Crichton 提交于
      Fixes #19199
      6939e4f5
    • A
      rollup merge of #19304: steveklabnik/gh19302 · ea494423
      Alex Crichton 提交于
      Fixes #19302.
      
      Also made a minor cosmetic change to bring the example in line with style guidelines.
      ea494423
    • A
      rollup merge of #19301: Gankro/take-fix · 69e7554a
      Alex Crichton 提交于
      Was taking the value out correctly, but then not doing anything to actually fix the table. derp.
      69e7554a
    • A
      rollup merge of #19300: killercup/patch-1 · b095eb17
      Alex Crichton 提交于
      Just saw this when looking at #19297 and couldn't find an issue/PR dealing with this. #18773 seems to have missed this file.
      
      Compiler output is generated [here](https://github.com/rust-lang/rust/blob/770378a313a573776b16237a46b75bafa49072c1/src/librustc_trans/driver/mod.rs#L466).
      
      cc @steveklabnik
      b095eb17
    • A
      rollup merge of #19299: nikomatsakis/stop-indenting-test-output · 24349fbe
      Alex Crichton 提交于
      This fixes a long-time irritant of mine. Inserting tabs causes M-x next-error to not work in emacs and seems to serve relatively little purpose in improving overall readability.
      
      r? @brson
      24349fbe
    • A
      rollup merge of #19298: nikomatsakis/unboxed-closure-parse-the-plus · f4a77563
      Alex Crichton 提交于
      Implements RFC 438.
      
      Fixes #19092.
      
      This is a [breaking-change]: change types like `&Foo+Send` or `&'a mut Foo+'a` to `&(Foo+Send)` and `&'a mut (Foo+'a)`, respectively.
      
      r? @brson
      f4a77563
    • A
      rollup merge of #19296: csouth3/trieset-union · 702127f6
      Alex Crichton 提交于
      TrieSet doesn't yet have union, intersection, difference, and symmetric difference functions implemented.  Luckily, TrieSet is largely similar to TreeSet, so I was able to reference the implementations of these functions in the latter, and adapt them as necessary to make them work for TrieSet.
      
      One thing that I thought was interesting is that the Iterator yielded by `iter()` for TrieSet iterates over the set's values directly rather than references to the values (whereas I think in most cases I see the Iterator given by `iter()` iterating over immutable references), so for consistency within TrieSet's interface, all of these Iterators also iterate over the values directly.  Let me know if all of these should be instead iterating over references.
      702127f6
    • A
      rollup merge of #19288: steveklabnik/doc_style_cleanup · f40fa830
      Alex Crichton 提交于
      This is considered good convention.
      
      This is about half of them in total, I just don't want an impossible to land patch. 😄
      f40fa830
    • A
      rollup merge of #19287: alexcrichton/issue-19272 · 34b98b30
      Alex Crichton 提交于
      At the same time remove the `pub use` of the variants in favor of accessing
      through the enum type itself. This is a breaking change as the `Found` and
      `NotFound` variants must now be imported through `BinarySearchResult` instead of
      just `std::slice`.
      
      [breaking-change]
      Closes #19271
      34b98b30
    • A
      rollup merge of #19282: steveklabnik/remove_grammar · 60299d75
      Alex Crichton 提交于
      I stumbled across this today, and it's not really working. It's been around for a very, very long time, and seems to be based on stuff we don't even have anymore.
      
      I asked in `#rust-internals`, and @cmr said we should just kill it, so here I am. :) I don't think that anything else uses Java, but maybe I missed something.
      
      And if this _isn't_ what we want, I'm fine with closing too. Just some housekeeping.
      60299d75
    • A
      rollup merge of #19273: ogham/rename-file-types · 3649c2a3
      Alex Crichton 提交于
      All of the enum components had a redundant 'Type' specifier: TypeSymlink, TypeDirectory, TypeFile. This change removes them, replacing them with a namespace: FileType::Symlink, FileType::Directory, and FileType::RegularFile.
      
      RegularFile is used instead of just File, as File by itself could be mistakenly thought of as referring to the struct.
      
      Part of #19253.
      3649c2a3
    • A
      rollup merge of #19272: tomjakubowski/rustdoc-sized · 52d4526e
      Alex Crichton 提交于
      Both `trait Foo for Sized?` and `<Sized? T>` are handled correctly.
      
      Fix #18515
      52d4526e
    • A
      rollup merge of #19266: aochagavia/const · 51d146a5
      Alex Crichton 提交于
      With this PR, the following code works:
      
      ```
      #![feature(tuple_indexing)]
      struct MyStruct { field1: uint }
      
      const S: MyStruct = MyStruct { field1: 42u };
      const T: (uint,) = (42u,);
      
      struct ConstCheck {
          array1: [int, ..S.field1],
          array2: [int, ..T.0],
      }
      ```
      
      Closes https://github.com/rust-lang/rust/issues/19244
      Related https://github.com/rust-lang/rust/issues/19265
      51d146a5
    • A
      rollup merge of #19231: Gankro/ringbuf-into-iter · 74f0ceba
      Alex Crichton 提交于
      r? @huonw @csherratt
      74f0ceba
    • A
      rollup merge of #19224: frewsxcv/unprefix-json-types · 97495da1
      Alex Crichton 提交于
      Addressing the issues brought up in [this thread](https://github.com/rust-lang/rust/pull/19114#discussion_r20614461)
      
      This pull request:
      
      * Unpublicizes reexports
      * Renames type aliases:
       * `json::JsonArray` ☞ `json::Array`
       * `json::JsonObject` ☞ `json::Object`
      97495da1
    • B
      auto merge of #19115 : jakub-/rust/issue-19100, r=alexcrichton · fac5a076
      bors 提交于
      ...of the type being matched.
      
      This change will result in a better diagnostic for code like the following:
      
      ```rust
      enum Enum {
          Foo,
          Bar
      }
      
      fn f(x: Enum) {
          match x {
              Foo => (),
              Bar => ()
          }
      }
      ```
      
      which would currently simply fail with an unreachable pattern error
      on the 2nd arm.
      
      The user is advised to either use a qualified path in the patterns
      or import the variants explicitly into the scope.
      fac5a076
    • J
    • J
      Warn on pattern bindings that have the same name as a variant · 5804a306
      Jakub Bukaj 提交于
      ...of the type being matched.
      
      This change will result in a better diagnostic for code like the following:
      
      ```rust
      enum Enum {
          Foo,
          Bar
      }
      
      fn f(x: Enum) {
          match x {
              Foo => (),
              Bar => ()
          }
      }
      ```
      
      which would currently simply fail with an unreachable pattern error
      on the 2nd arm.
      
      The user is advised to either use a qualified path in the patterns
      or import the variants explicitly into the scope.
      5804a306
    • B
      auto merge of #19144 : michaelwoerister/rust/lldb-scripts, r=alexcrichton · 6faff24e
      bors 提交于
      This PR adds the `rust-lldb` script (feel free to bikeshed about the name).
      The script will start LLDB and, before doing anything else, load [LLDB type summaries](http://lldb.llvm.org/varformats.html) that will make LLDB print values with Rust syntax. Just use the script like you would normally use LLDB:
      
      ```
      rust-lldb executable-to-debug --and-any-other-commandline --args 
      ```
      The script will just add one additional commandline argument to the LLDB invocation and pass along the rest of the arguments to LLDB after that.
      
      Given the following program...
      ```rust
      fn main() {
      	let x = Some(1u);
      	let y = [0, 1, 2i];
      	let z = (x, y);
      
      	println!("{} {} {}", x, y, z);
      }
      ```
      ...*without* the 'LLDB type summaries', values will be printed something like this...
      ```
      (lldb) p x
      (core::option::Option<uint>) $3 = {
         = (RUST$ENUM$DISR = Some)
         = (RUST$ENUM$DISR = Some, 1)
      }
      (lldb) p y
      (long [3]) $4 = ([0] = 0, [1] = 1, [2] = 2)
      (lldb) p z
      ((core::option::Option<uint>, [int, ..3])) $5 = {
         = {
           = (RUST$ENUM$DISR = Some)
           = (RUST$ENUM$DISR = Some, 1)
        }
         = ([0] = 0, [1] = 1, [2] = 2)
      }
      ```
      ...*with* the 'LLDB type summaries', values will be printed like this:
      ```
      (lldb) p x
      (core::option::Option<uint>) $0 = Some(1)
      (lldb) p y
      (long [3]) $1 = [0, 1, 2]
      (lldb) p z
      ((core::option::Option<uint>, [int, ..3])) $2 = (Some(1), [0, 1, 2])
      ```
      
      The 'LLDB type summaries' used by the script have been in use for a while in the LLDB autotests but I still consider them to be of alpha-version quality. If you see anything weird when you use them, feel free to file an issue.
      
      The script will use whatever Rust "installation" is in PATH, so whichever `rustc` will be called if you type `rustc` into the console, this is the one that the script will ask for the LLDB extension module location. The build system will take care of putting the script and LLDB python module in the right places, whether you want to use the stage1 or stage2 compiler or the one coming with `make install` / `rustup.sh`.
      
      Since I don't have much experience with the build system, Makefiles and shell scripts, please look these changes over carefully.
      6faff24e
    • B
      auto merge of #19176 : aturon/rust/stab-iter, r=alexcrichton · 1a44875a
      bors 提交于
      This is an initial pass at stabilizing the `iter` module. The module is
      fairly large, but is also pretty polished, so most of the stabilization
      leaves things as they are.
      
      Some changes:
      
      * Due to the new object safety rules, various traits needs to be split
        into object-safe traits and extension traits. This includes `Iterator`
        itself. While splitting up the traits adds some complexity, it will
        also increase flexbility: once we have automatic impls of `Trait` for
        trait objects over `Trait`, then things like the iterator adapters
        will all work with trait objects.
      
      * Iterator adapters that use up the entire iterator now take it by
        value, which makes the semantics more clear and helps catch bugs. Due
        to the splitting of Iterator, this does not affect trait objects. If
        the underlying iterator is still desired for some reason, `by_ref` can
        be used. (Note: this change had no fallout in the Rust distro except
        for the useless mut lint.)
      
      * In general, extension traits new and old are following an [in-progress
        convention](rust-lang/rfcs#445). As such, they
        are marked `unstable`.
      
      * As usual, anything involving closures is `unstable` pending unboxed
        closures.
      
      * A few of the more esoteric/underdeveloped iterator forms (like
        `RandomAccessIterator` and `MutableDoubleEndedIterator`, along with
        various unfolds) are left experimental for now.
      
      * The `order` submodule is left `experimental` because it will hopefully
        be replaced by generalized comparison traits.
      
      * "Leaf" iterators (like `Repeat` and `Counter`) are uniformly
        constructed by free fns at the module level. That's because the types
        are not otherwise of any significance (if we had `impl Trait`, you
        wouldn't want to define a type at all).
      
      Closes #17701
      
      Due to renamings and splitting of traits, this is a:
      
      [breaking-change]
      1a44875a
    • M
    • N
      21d5d139
    • N
      1479a909
    • N
      Fix rustdoc · bc235655
      Niko Matsakis 提交于
      bc235655
    • N
    • N
      f4e29e7e
    • N
    • C
      Unpublicize reexports, unprefix JSON type aliases · ce238d75
      Corey Farwell 提交于
      The type aliases json::JsonString and json::JsonObject were originally
      prefixed with 'json' to prevent collisions with (at the time) the enums
      json::String and json::Object respectively. Now that enum namespacing
      has landed, this 'json' prefix is redundant and can be removed:
      
      json::JsonArray -> json::Array
      json::JsonObject -> json::Object
      
      In addition, this commit also unpublicizes all of the re-exports in this
      JSON module, as a part of #19253
      
      [breaking-change]
      ce238d75
  2. 26 11月, 2014 9 次提交