1. 12 3月, 2016 2 次提交
    • A
      Forbid items with the same name being defined in overlapping inherent · 21df87f5
      Aaron Turon 提交于
      impl blocks.
      
      For example, the following is now correctly illegal:
      
      ```rust
      struct Foo;
      
      impl Foo {
          fn id() {}
      }
      
      impl Foo {
          fn id() {}
      }
      ```
      
      "Overlapping" here is determined the same way it is for traits (and in
      fact shares the same code path): roughly, there must be some way of
      substituting any generic types to unify the impls, such that none of the
      `where` clauses are provably unsatisfiable under such a unification.
      
      Closes #22889
      21df87f5
    • A
      Introduce `ImplHeader` · 9cc3bfcc
      Aaron Turon 提交于
      This commit introduces the idea of an "impl header", which consists of
      everything outside the impl body: the Self type, the trait
      reference (when applicable), and predicates from `where` clauses. This
      type is usable with the type folding machinery, making it possible to
      work with impl headers at a higher and more generic level.
      9cc3bfcc
  2. 11 3月, 2016 5 次提交
  3. 10 3月, 2016 21 次提交
    • B
      Auto merge of #32101 - SimonSapin:patch-11, r=alexcrichton · 4b87655e
      bors 提交于
      Add info in `rustdoc --passes list`
      
      CC @mitaa, https://github.com/rust-lang/rust/pull/32055/files#r55205006
      4b87655e
    • B
      Auto merge of #32173 - steveklabnik:rollup, r=steveklabnik · 6d6ae1ff
      bors 提交于
      Rollup of 8 pull requests
      
      - Successful merges: #31830, #32091, #32125, #32136, #32147, #32148, #32149, #32150
      - Failed merges:
      6d6ae1ff
    • S
      Rollup merge of #32150 - steveklabnik:gh20213, r=bluss · 4f8d0291
      Steve Klabnik 提交于
      Remove inaccurate claim about inline assembly
      
      It's not like GCC's.
      
      Fixes #20213
      4f8d0291
    • S
      Rollup merge of #32149 - steveklabnik:gh31628, r=bluss · fc9bc7ac
      Steve Klabnik 提交于
      Add other primitive types to the reference
      
      Fixes #31628
      fc9bc7ac
    • S
      Rollup merge of #32148 - steveklabnik:gh31912, r=apasel422 · c5ec055d
      Steve Klabnik 提交于
      Small grammar fix in Guessing Game
      
      When it was Option.expect(), there was an .ok().expect(), but now that it uses Result.expect(), there's only one method, not two.
      
      Fixes #31912
      c5ec055d
    • S
      Rollup merge of #32147 - steveklabnik:gh31950, r=bluss · 76bcf643
      Steve Klabnik 提交于
      Clarify that try_unwrap needs exactly one
      
      Fixes #31950
      76bcf643
    • S
      Rollup merge of #32136 - nathankleyn:improve-docs-for-btreeset, r=steveklabnik · d6c4b53d
      Steve Klabnik 提交于
      Add missing documentation examples for BTreeSet.
      
      As part of the ongoing effort to document all methods with examples,
      this commit adds the missing examples for the `BTreeSet` collection
      type.
      
      This is part of issue #29348.
      
      r? @steveklabnik
      d6c4b53d
    • S
      Rollup merge of #32125 - pyfisch:patch-2, r=steveklabnik · 3820d38e
      Steve Klabnik 提交于
      Remove final note from testing chapter.
      
      The information that documentation tests cannot be run in binary crates is already given at the beginning of the section.
      3820d38e
    • S
      Rollup merge of #32091 - dirk:dirk/siphasher-docs-clarification, r=alexcrichton · 3e764efe
      Steve Klabnik 提交于
      Clarify documentation of hash::SipHasher
      
      The docs were making assertions/recommendations they shouldn't have. This clarifies them and adds some helpful links.
      
      Fixes #32043.
      
      r? @sfackler
      3e764efe
    • S
      Rollup merge of #31830 - frewsxcv:assoc-func, r=steveklabnik · 09e08bac
      Steve Klabnik 提交于
      Prefer 'associated function' over 'static method' in msg.
      
      TRPL seems to refer to 'static functions' as 'associated functions'.
      This terminology should be used consistently.
      09e08bac
    • B
      Auto merge of #32100 - SimonSapin:patch-6, r=alexcrichton · 25a23271
      bors 提交于
      "can be built on Ref::map"… how?
      
      Now that `std::cell::Ref::filter_map` and `RefMut::filter_map` are deprecated, using them gives a warning like:
      ```
      script/dom/element.rs:754:9: 754:24 warning: use of deprecated item: can be built on Ref::map, #[warn(deprecated)] on by default
      ```
      
      But it’s not at all obvious *how* the functionality can be built on `Ref::map`. This PR adds to the warning message a crates.io URL for a crate that does.
      25a23271
    • B
      Auto merge of #32097 - jseyfried:fix_resolution_regression, r=nikomatsakis · 3ac4076a
      bors 提交于
      Fix a regression in import resolution
      
      This fixes #32089 (caused by #31726) by deducing that name resolution has failed (as opposed to being determinate) in more cases.
      
      r? @nikomatsakis
      3ac4076a
    • C
      Prefer 'associated function' over 'static method' in msg. · d9dba769
      Corey Farwell 提交于
      TRPL seems to refer to 'static functions' as 'associated functions'.
      This terminology should be used consistently.
      d9dba769
    • B
      Auto merge of #31710 - eddyb:reify, r=nikomatsakis · bcda58f4
      bors 提交于
      Distinguish fn item types to allow reification from nothing to fn pointers.
      
      The first commit is a rebase of #26284, except for files that have moved since.
      
      This is a [breaking-change], due to:
      * each FFI function has a distinct type, like all other functions currently do
      * all generic parameters on functions are recorded in their item types, e.g.:
      `size_of::<u8>` & `size_of::<i8>`'s types differ despite their identical signature.
      * function items are zero-sized, which will stop transmutes from working on them
      
      The first two cases are handled in most cases with the new coerce-unify logic,
      which will combine incompatible function item types into function pointers,
      at the outer-most level of if-else chains, match arms and array literals.
      
      The last case is specially handled during type-checking such that transmutes
      from a function item type to a pointer or integer type will continue to work for
      another release cycle, but are being linted against. To get rid of warnings and
      ensure your code will continue to compile, cast to a pointer before transmuting.
      bcda58f4
    • B
      Auto merge of #31618 - alexcrichton:no-thread-spawns, r=brson · 0b9995b2
      bors 提交于
      Optimize some functions in std::process
      
      * Be sure that `read_to_end` gets directed towards `read_to_end_uninitialized` for all handles
      * When spawning a child that guaranteed doesn't need a stdin, don't actually create a stdin pipe for that process, instead just redirect it to /dev/null
      * When calling `wait_with_output`, don't spawn threads to read out the pipes of the child. Instead drain all pipes on the calling thread and *then* wait on the process.
      
      Functionally, it is intended that nothing changes as part of this PR
      
      ---
      
      Note that this was the same as #31613, and even after that it turned out that fixing Windows was easier than I thought! To copy a comment from over there:
      
      > As some rationale for this as well, it's always bothered me that we've spawned threads in the standard library for this (seems a bit overkill), and I've also been curious lately as to our why our build times for Windows are so much higher than Unix (on the buildbots we have). I have done basically 0 investigation into why, but I figured it can't help to try to optimize Command::output which I believe is called quite a few times during the test suite.
      0b9995b2
    • B
      Auto merge of #32165 - alexcrichton:fix-broken-master, r=alexcrichton · cc62db80
      bors 提交于
      collections: Fix broken doc example
      
      PR #32135 was accidentally merged without tests passing, and unfortunately one
      of the tests added was broken, so this fixes that.
      cc62db80
    • A
      collections: Fix broken doc example · 752f2796
      Alex Crichton 提交于
      PR #32135 was accidentally merged without tests passing, and unfortunately one
      of the tests added was broken, so this fixes that.
      752f2796
    • S
      Merge pull request #32135 from nathankleyn/improve-docs-for-btreemap · 996f8181
      Steve Klabnik 提交于
      Add missing documentation examples for BTreeMap.
      996f8181
    • A
      std: Don't spawn threads in `wait_with_output` · 7c3038f8
      Alex Crichton 提交于
      Semantically there's actually no reason for us to spawn threads as part of the
      call to `wait_with_output`, and that's generally an incredibly heavyweight
      operation for just reading a few bytes (especially when stderr probably rarely
      has bytes!). An equivalent operation in terms of what's implemented today would
      be to just drain both pipes of all contents and then call `wait` on the child
      process itself.
      
      On Unix we can implement this through some convenient use of the `select`
      function, whereas on Windows we can make use of overlapped I/O. Note that on
      Windows this requires us to use named pipes instead of anonymous pipes, but
      they're semantically the same under the hood.
      7c3038f8
    • N
      6799895b
    • E
  4. 09 3月, 2016 12 次提交