1. 20 2月, 2015 1 次提交
  2. 19 2月, 2015 39 次提交
    • A
      163be752
    • A
      Round 5 test fixes and rebase conflicts · 0cd54b85
      Alex Crichton 提交于
      0cd54b85
    • B
      Auto merge of #22517 - brson:relnotes, r=Gankro · 0b664bb8
      bors 提交于
      p=1 please
      0b664bb8
    • B
      Auto merge of #22497 - nikomatsakis:suffixes, r=alexcrichton · 149f0024
      bors 提交于
      The old suffixes now issue warnings unless a feature-gate is given.
      
      Fixes #22496.
      
      r? @alexcrichton 
      149f0024
    • A
      Fix from niko for cfail tests · cb29c468
      Alex Crichton 提交于
      cb29c468
    • A
      rollup merge of #22517: brson/relnotes · b8d35ded
      Alex Crichton 提交于
      p=1 please
      b8d35ded
    • A
      Round 4 test fixes and rebase conflicts · b7c0813e
      Alex Crichton 提交于
      b7c0813e
    • B
      Update AUTHORS.txt and RELEASES.md · c4bb064b
      Brian Anderson 提交于
      c4bb064b
    • N
      Exempt phantom fns from the object safety check · 63f51ee9
      Niko Matsakis 提交于
      63f51ee9
    • A
      Round 3 test fixes and conflicts · d6e939a2
      Alex Crichton 提交于
      d6e939a2
    • B
      Auto merge of #22436 - nikomatsakis:issue-22246-bound-lifetimes-of-assoc-types, r=nikomatsakis · 22992358
      bors 提交于
      Take 2. This PR includes a bunch of refactoring that was part of an experimental branch implementing [implied bounds]. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing #22246. The implied bounds branch also exposed #22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs. I patched the two issues I was concerned about, which was the handling of supertraits and HRTB (the latter turned out to be fine, so I added a comment explaining why.)
      
      r? @pnkfelix (for now, anyway)
      cc @aturon 
      
      [implied bounds]: http://smallcultfollowing.com/babysteps/blog/2014/07/06/implied-bounds/
      22992358
    • A
      rollup merge of #22286: nikomatsakis/variance-4b · 1506b34e
      Alex Crichton 提交于
      Conflicts:
      	src/librustc/middle/infer/combine.rs
      	src/librustc_typeck/check/wf.rs
      1506b34e
    • A
      Round 2 test fixes and conflicts · 3e7a04cb
      Alex Crichton 提交于
      3e7a04cb
    • A
      rollup merge of #22502: nikomatsakis/deprecate-bracket-bracket · 231eeaa3
      Alex Crichton 提交于
      Conflicts:
      	src/libcollections/slice.rs
      	src/libcollections/str.rs
      	src/librustc/middle/lang_items.rs
      	src/librustc_back/rpath.rs
      	src/librustc_typeck/check/regionck.rs
      	src/libstd/ffi/os_str.rs
      	src/libsyntax/diagnostic.rs
      	src/libsyntax/parse/parser.rs
      	src/libsyntax/util/interner.rs
      	src/test/run-pass/regions-refcell.rs
      231eeaa3
    • A
      rollup merge of #22210: aturon/stab-final-borrow · 2cdbd288
      Alex Crichton 提交于
      Conflicts:
      	src/libcollections/btree/map.rs
      	src/libcollections/str.rs
      	src/libcollections/vec.rs
      	src/libcore/borrow.rs
      	src/libcore/hash/mod.rs
      	src/libstd/collections/hash/map.rs
      	src/libstd/collections/hash/set.rs
      2cdbd288
    • A
      Round 1 fixes and rebase conflicts · 365bd9a9
      Alex Crichton 提交于
      365bd9a9
    • A
      Stabilize std::borrow · a99e6986
      Aaron Turon 提交于
      This commit stabilizes `std::borrow`, making the following modifications
      to catch up the API with language changes:
      
      * It renames `BorrowFrom` to `Borrow`, as was originally intended (but
        blocked for technical reasons), and reorders the parameters
        accordingly.
      
      * It moves the type parameter of `ToOwned` to an associated type. This
        is somewhat less flexible, in that each borrowed type must have a
        unique owned type, but leads to a significant simplification for
        `Cow`. Flexibility can be regained by using newtyped slices, which is
        advisable for other reasons anyway.
      
      * It removes the owned type parameter from `Cow`, making the type much
        less verbose.
      
      * Deprecates the `is_owned` and `is_borrowed` predicates in favor of
        direct matching.
      
      The above API changes are relatively minor; the basic functionality
      remains the same, and essentially the whole module is now marked
      `#[stable]`.
      
      [breaking-change]
      a99e6986
    • N
      9ea84aee
    • N
      Declare `&foo[]` to be obsolete syntax. Modify the obsolete mechanism to · 64cd30e0
      Niko Matsakis 提交于
      support warnings.
      64cd30e0
    • A
      rollup merge of #22498: nagisa/style-fixes · b64dfff3
      Alex Crichton 提交于
      b64dfff3
    • A
      rollup merge of #22497: nikomatsakis/suffixes · 5250a82f
      Alex Crichton 提交于
      Conflicts:
      	src/librustc_trans/trans/tvec.rs
      5250a82f
    • A
      rollup merge of #22491: Gankro/into_iter · 5a32b4a3
      Alex Crichton 提交于
      Conflicts:
      	src/libcollections/bit.rs
      	src/libcollections/linked_list.rs
      	src/libcollections/vec_deque.rs
      	src/libstd/sys/common/wtf8.rs
      5a32b4a3
    • A
      rollup merge of #22485: pnkfelix/fsk-int-uint-audit · 9aee389b
      Alex Crichton 提交于
      cc #22240
      9aee389b
    • A
      rollup merge of #22484: riginding/master · b90e4071
      Alex Crichton 提交于
      b90e4071
    • A
      rollup merge of #22482: alexcrichton/cstr-changes · f3657170
      Alex Crichton 提交于
      This commit is an implementation of [RFC 592][r592] and [RFC 840][r840]. These
      two RFCs tweak the behavior of `CString` and add a new `CStr` unsized slice type
      to the module.
      
      [r592]: https://github.com/rust-lang/rfcs/blob/master/text/0592-c-str-deref.md
      [r840]: https://github.com/rust-lang/rfcs/blob/master/text/0840-no-panic-in-c-string.md
      
      The new `CStr` type is only constructable via two methods:
      
      1. By `deref`'ing from a `CString`
      2. Unsafely via `CStr::from_ptr`
      
      The purpose of `CStr` is to be an unsized type which is a thin pointer to a
      `libc::c_char` (currently it is a fat pointer slice due to implementation
      limitations). Strings from C can be safely represented with a `CStr` and an
      appropriate lifetime as well. Consumers of `&CString` should now consume `&CStr`
      instead to allow producers to pass in C-originating strings instead of just
      Rust-allocated strings.
      
      A new constructor was added to `CString`, `new`, which takes `T: IntoBytes`
      instead of separate `from_slice` and `from_vec` methods (both have been
      deprecated in favor of `new`). The `new` method returns a `Result` instead of
      panicking.  The error variant contains the relevant information about where the
      error happened and bytes (if present). Conversions are provided to the
      `io::Error` and `old_io::IoError` types via the `FromError` trait which
      translate to `InvalidInput`.
      
      This is a breaking change due to the modification of existing `#[unstable]` APIs
      and new deprecation, and more detailed information can be found in the two RFCs.
      Notable breakage includes:
      
      * All construction of `CString` now needs to use `new` and handle the outgoing
        `Result`.
      * Usage of `CString` as a byte slice now explicitly needs a `.as_bytes()` call.
      * The `as_slice*` methods have been removed in favor of just having the
        `as_bytes*` methods.
      
      Closes #22469
      Closes #22470
      [breaking-change]
      f3657170
    • A
      rollup merge of #22480: alexcrichton/hashv3 · 9774b7e6
      Alex Crichton 提交于
      This commit is an implementation of [RFC 823][rfc] which is another pass over
      the `std::hash` module for stabilization. The contents of the module were not
      entirely marked stable, but some portions which remained quite similar to the
      previous incarnation are now marked `#[stable]`. Specifically:
      
      [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md
      
      * `std::hash` is now stable (the name)
      * `Hash` is now stable
      * `Hash::hash` is now stable
      * `Hasher` is now stable
      * `SipHasher` is now stable
      * `SipHasher::new` and `new_with_keys` are now stable
      * `Hasher for SipHasher` is now stable
      * Many `Hash` implementations are now stable
      
      All other portions of the `hash` module remain `#[unstable]` as they are less
      commonly used and were recently redesigned.
      
      This commit is a breaking change due to the modifications to the `std::hash` API
      and more details can be found on the [RFC][rfc].
      
      Closes #22467
      [breaking-change]
      9774b7e6
    • A
      rollup merge of #22452: nikomatsakis/issue-22040-18956-Self · 261364d4
      Alex Crichton 提交于
      The big change here is that we update the object-safety rules to prohibit references to `Self` in the supertrait listing. See #22040 for the motivation. The other change is to handle the interaction of defaults that reference `Self` and object types (where `Self` is erased). We force users to give an explicit type in that scenario.
      
      r? @aturon
      261364d4
    • A
      rollup merge of #22438: dotdash/iter_vec_loop · d8753a0e
      Alex Crichton 提交于
      No need to create a bunch of blocks and a stack allocated temporary just
      to build a simple loop.
      d8753a0e
    • A
      rollup merge of #22437: dotdash/fix_array_type · 386d329a
      Alex Crichton 提交于
      In trans_slice_vec we currently use arrayalloca, which gives us a
      pointer to the element type with enough memory allocated for the
      requested number of elements.  This works, but everywhere else we use
      the [n x T] type for fixed size arrays and so we have to bitcast the
      pointer here. Let's directly use the proper type for the allocation and
      remove some code duplication along the way.
      386d329a
    • A
      rollup merge of #22436: nikomatsakis/issue-22246-bound-lifetimes-of-assoc-types · 754db0f7
      Alex Crichton 提交于
      Take 2. This PR includes a bunch of refactoring that was part of an experimental branch implementing [implied bounds]. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing #22246. The implied bounds branch also exposed #22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs. I patched the two issues I was concerned about, which was the handling of supertraits and HRTB (the latter turned out to be fine, so I added a comment explaining why.)
      
      r? @pnkfelix (for now, anyway)
      cc @aturon
      
      [implied bounds]: http://smallcultfollowing.com/babysteps/blog/2014/07/06/implied-bounds/
      754db0f7
    • A
      rollup merge of #22395: brson/readme-cleanup · 31166ecf
      Alex Crichton 提交于
      Just a few things to make the README ever more perfect.
      
      r? @steveklabnik
      31166ecf
    • A
      rollup merge of #22287: Ryman/purge_carthographers · c07ec507
      Alex Crichton 提交于
      This overlaps with #22276 (I left make check running overnight) but covers a number of additional cases and has a few rewrites where the clones are not even necessary.
      
      This also implements `RandomAccessIterator` for `iter::Cloned`
      
      cc @steveklabnik, you may want to glance at this before #22281 gets the bors treatment
      c07ec507
    • N
      Update tests to use #[feature(rustc_attrs)] · 9f8b9d68
      Niko Matsakis 提交于
      9f8b9d68
    • N
      Minor unused imports etc. · cc61f9c1
      Niko Matsakis 提交于
      cc61f9c1
    • A
      rollup merge of #22118: fhahn/separate-parse-fail-2 · c5fddd81
      Alex Crichton 提交于
      After making `rustc` fail on errors at a stop point, like `-Z parse-only`, in #22117, the files in this PR also fail during the parse stage and should be moved as well. Sorry for spliting this move up in two PRs.
      c5fddd81
    • A
      rollup merge of #21886: dotdash/fast_slice_iter · fa30c4f1
      Alex Crichton 提交于
      The data pointer used in the slice is never null, using assume() to tell
      LLVM about it gets rid of various unneeded null checks when iterating
      over the slice.
      
      Since the snapshot compiler is still using an older LLVM version, omit
      the call in stage0, because compile times explode otherwise.
      
      Benchmarks from #18193
      ````
      running 5 tests
      test _range    ... bench:     33329 ns/iter (+/- 417)
      test assembly  ... bench:     33299 ns/iter (+/- 58)
      test enumerate ... bench:     33318 ns/iter (+/- 83)
      test iter      ... bench:     33311 ns/iter (+/- 130)
      test position  ... bench:     33300 ns/iter (+/- 47)
      
      test result: ok. 0 passed; 0 failed; 0 ignored; 5 measured
      ````
      
      Fixes #18193
      fa30c4f1
    • N
      Stabilize Send/Sync. · f5491e63
      Niko Matsakis 提交于
      f5491e63
    • N
      Try to write some basic docs. · 74199c24
      Niko Matsakis 提交于
      74199c24
    • A
      std: Implement CString-related RFCs · 1860ee52
      Alex Crichton 提交于
      This commit is an implementation of [RFC 592][r592] and [RFC 840][r840]. These
      two RFCs tweak the behavior of `CString` and add a new `CStr` unsized slice type
      to the module.
      
      [r592]: https://github.com/rust-lang/rfcs/blob/master/text/0592-c-str-deref.md
      [r840]: https://github.com/rust-lang/rfcs/blob/master/text/0840-no-panic-in-c-string.md
      
      The new `CStr` type is only constructable via two methods:
      
      1. By `deref`'ing from a `CString`
      2. Unsafely via `CStr::from_ptr`
      
      The purpose of `CStr` is to be an unsized type which is a thin pointer to a
      `libc::c_char` (currently it is a fat pointer slice due to implementation
      limitations). Strings from C can be safely represented with a `CStr` and an
      appropriate lifetime as well. Consumers of `&CString` should now consume `&CStr`
      instead to allow producers to pass in C-originating strings instead of just
      Rust-allocated strings.
      
      A new constructor was added to `CString`, `new`, which takes `T: IntoBytes`
      instead of separate `from_slice` and `from_vec` methods (both have been
      deprecated in favor of `new`). The `new` method returns a `Result` instead of
      panicking.  The error variant contains the relevant information about where the
      error happened and bytes (if present). Conversions are provided to the
      `io::Error` and `old_io::IoError` types via the `FromError` trait which
      translate to `InvalidInput`.
      
      This is a breaking change due to the modification of existing `#[unstable]` APIs
      and new deprecation, and more detailed information can be found in the two RFCs.
      Notable breakage includes:
      
      * All construction of `CString` now needs to use `new` and handle the outgoing
        `Result`.
      * Usage of `CString` as a byte slice now explicitly needs a `.as_bytes()` call.
      * The `as_slice*` methods have been removed in favor of just having the
        `as_bytes*` methods.
      
      Closes #22469
      Closes #22470
      [breaking-change]
      1860ee52