1. 13 2月, 2015 6 次提交
  2. 12 2月, 2015 34 次提交
    • B
      Auto merge of #21895 - alfie:libcoretest, r=pnkfelix · cca1cf61
      bors 提交于
      cca1cf61
    • B
      Auto merge of #22217 - mmatyas:char_typofix, r=huonw · c34421e4
      bors 提交于
      There are two dots at the end of a line in the documentation of std::char.
      c34421e4
    • M
      7eecb940
    • B
      Auto merge of #22193 - pnkfelix:cleanup-pr22012, r=eddyb · 0fdca30f
      bors 提交于
      PR #22012 followup: clean up vtable::check_object_cast by reusing `fresh_ty`
      
      (hat tip to nikomatsakis, who was the one who pointed out this simplification to the logic.)
      0fdca30f
    • B
      Auto merge of #22192 - alexcrichton:rollup, r=alexcrichton · 3ef8ff1f
      bors 提交于
      3ef8ff1f
    • A
      Even more test fixes · fb1f4d11
      Alex Crichton 提交于
      fb1f4d11
    • A
      18bafad0
    • A
      rustc: Do not link to plugins · d4cece25
      Alex Crichton 提交于
      This flag seems to have erroneously been set to `true`.
      d4cece25
    • A
      More test fixes and rebase conflicts · d2f990f2
      Alex Crichton 提交于
      d2f990f2
    • F
      PR #22012 followup: clean up vtable::check_object_cast by reusing `fresh_ty` · f27b3e25
      Felix S. Klock II 提交于
      (hat tip to nikomatsakis who was the one who pointed out this
      simplification to the logic.)
      f27b3e25
    • A
      rollup merge of #22166: dcrewi/iter-impls-for-windows · adcda460
      Alex Crichton 提交于
      - DoubleEndedIterator
      - ExactSizeIterator
      - RandomAccessIterator
      adcda460
    • A
      rollup merge of #22015: alexcrichton/netv2 · a1056360
      Alex Crichton 提交于
      This commit is an implementation of [RFC 807][rfc] which adds a `std::net`
      module for basic neworking based on top of `std::io`. This module serves as a
      replacement for the `std::old_io::net` module and networking primitives in
      `old_io`.
      
      [rfc]: fillmein
      
      The major focus of this redesign is to cut back on the level of abstraction to
      the point that each of the networking types is just a bare socket. To this end
      functionality such as timeouts and cloning has been removed (although cloning
      can be done through `duplicate`, it may just yield an error).
      
      With this `net` module comes a new implementation of `SocketAddr` and `IpAddr`.
      This work is entirely based on #20785 and the only changes were to alter the
      in-memory representation to match the `libc`-expected variants and to move from
      public fields to accessors.
      a1056360
    • A
      std: Add a `net` module for TCP/UDP · 395709ca
      Alex Crichton 提交于
      This commit is an implementation of [RFC 807][rfc] which adds a `std::net`
      module for basic neworking based on top of `std::io`. This module serves as a
      replacement for the `std::old_io::net` module and networking primitives in
      `old_io`.
      
      [rfc]: fillmein
      
      The major focus of this redesign is to cut back on the level of abstraction to
      the point that each of the networking types is just a bare socket. To this end
      functionality such as timeouts and cloning has been removed (although cloning
      can be done through `duplicate`, it may just yield an error).
      
      With this `net` module comes a new implementation of `SocketAddr` and `IpAddr`.
      This work is entirely based on #20785 and the only changes were to alter the
      in-memory representation to match the `libc`-expected variants and to move from
      public fields to accessors.
      395709ca
    • A
      Test fixes and rebase conflicts · 315730fb
      Alex Crichton 提交于
      315730fb
    • D
      implement missing iterator traits for slice::Windows · cf475e6b
      David Creswick 提交于
      - DoubleEndedIterator
      - ExactSizeIterator
      - RandomAccessIterator
      cf475e6b
    • A
      rollup merge of #22178: pnkfelix/featuregate-unsafe-no-drop-flag · aa0db172
      Alex Crichton 提交于
      Conflicts:
      	src/libsyntax/feature_gate.rs
      aa0db172
    • A
      rollup merge of #22188: alexcrichton/envv2 · 94922751
      Alex Crichton 提交于
      This commit tweaks the interface of the `std::env` module to make it more
      ergonomic for common usage:
      
      * `env::var` was renamed to `env::var_os`
      * `env::var_string` was renamed to `env::var`
      * `env::args` was renamed to `env::args_os`
      * `env::args` was re-added as a panicking iterator over string values
      * `env::vars` was renamed to `env::vars_os`
      * `env::vars` was re-added as a panicking iterator over string values.
      
      This should make common usage (e.g. unicode values everywhere) more ergonomic
      as well as "the default". This is also a breaking change due to the differences
      of what's yielded from each of these functions, but migration should be fairly
      easy as the defaults operate over `String` which is a common type to use.
      
      [breaking-change]
      94922751
    • A
      rollup merge of #22186: GuillaumeGomez/fix-fs · 43a20044
      Alex Crichton 提交于
      Fixes issue #22174.
      43a20044
    • A
      rollup merge of #22185: edwardw/default-methods · 9675f514
      Alex Crichton 提交于
      When projecting associate types for a trait's default methods, the
      trait itself was added to the predicate candidate list twice: one from
      parameter environment, the other from trait definition. Then the
      duplicates were deemed as code ambiguity and the compiler rejected the
      code. Simply checking and dropping the duplicates solves the issue.
      
      Closes #22036
      9675f514
    • A
      rollup merge of #22184: nagisa/revert-emissions · 76a3852b
      Alex Crichton 提交于
      This resulted in some very unexpected fallout such as empty llvm-ir, llvm-bc and asm in some cases.
      See #22183 for related info.
      
      r? @alexcrichton
      76a3852b
    • A
      rollup merge of #22177: semarie/openbsd-notls · 5bcf2a92
      Alex Crichton 提交于
      OpenBSD doesn't have thread-local-storage support (yet).
      Permit to compile (and run) `check-stage1-crates` under OpenBSD.
      5bcf2a92
    • A
      rollup merge of #22167: kmcallister/undef-macro · 7362bd57
      Alex Crichton 提交于
      Fixes #21062.
      7362bd57
    • A
      rollup merge of #22164: huonw/alloc-- · 48767165
      Alex Crichton 提交于
      It doesn't have to be a literal memory allocation (ala malloc), e.g. it
      can be in static memory, so saying "allocated" is mildly misleading.
      
      Thanks to @mahkoh for pointing it out.
      
      r? @steveklabnik
      48767165
    • A
      rollup merge of #22162: ogham/patch-1 · 5e2b69c1
      Alex Crichton 提交于
      It returns `false`, not `None`.
      5e2b69c1
    • A
      rollup merge of #22161: steveklabnik/close_2741 · 92e7aebf
      Alex Crichton 提交于
      Given that this is entirely internal, this enhancement isn't going to be needed. And if it is, we'll add it.
      
      Closes #2741.
      92e7aebf
    • A
      rollup merge of #22151: Gankro/macro-bench · fcf679cb
      Alex Crichton 提交于
      r? @alexcrichton
      fcf679cb
    • A
      rollup merge of #22150: nagisa/de-perm-frost · 18d31cc1
      Alex Crichton 提交于
      Fixes #22124
      18d31cc1
    • A
      rollup merge of #22127: alexcrichton/stability-holes · 84e5c117
      Alex Crichton 提交于
      There are a number of holes that the stability lint did not previously cover,
      including:
      
      * Types
      * Bounds on type parameters on functions and impls
      * Where clauses
      * Imports
      * Patterns (structs and enums)
      
      These holes have all been fixed by overriding the `visit_path` function on the
      AST visitor instead of a few specialized cases. This change also necessitated a
      few stability changes:
      
      * The `collections::fmt` module is now stable (it was already supposed to be).
      * The `thread_local::imp::Key` type is now stable (it was already supposed to
        be).
      * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable.
        These are required via the `panic!` macro.
      * The `std::old_io::stdio::{println, println_args}` functions are now stable.
        These are required by the `print!` and `println!` macros.
      * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to
        make bounds with these traits stable. Note that manual implementations of
        these traits are still gated by default, this stability only allows bounds
        such as `F: FnOnce()`.
      
      Closes #8962
      Closes #16360
      Closes #20327
      84e5c117
    • A
      rollup merge of #22048: LeoTestard/impl-patterns-used · c9fdfdb2
      Alex Crichton 提交于
      The live code analysis only visited the function's body when visiting a
      method, and not the FnDecl and the generics, resulting in code to be
      incorrectly marked as unused when it only appeared in the generics, the
      arguments, or the return type, whereas the same code in non-method
      functions was correctly detected as used. Fixes #20343.
      
      Originally I just added a call to `walk_generics` and `walk_fndecl` alongside `walk_block` but then I noticed the `walk_method_helper` function did pretty much the same thing. The only difference is that it also calls `visit_mac`, but since this is not going to happen at this stage, I think it's ok. However let me know if this was not the right thing to do.
      c9fdfdb2
    • A
      rollup merge of #21881: richo/lint-no-mangle-const · 8b8331ad
      Alex Crichton 提交于
      This renames the PrivateNoMangleFns lint to allow both to happen in a
      single pass, since they do roughly the same work.
      
      Closes #21856
      
      Open questions:
      
      [ ]: Do the tests actually pass (I'm running make check and running out the door now)
      [ ]: Is the name of this lint ok. it seems to mostly be fine with [convention](https://github.com/rust-lang/rfcs/blob/cc53afbe5dea41e1f7d1c3dce71e013abe025211/text/0344-conventions-galore.md#lints)
      [ ]: I'm not super thrilled about the warning text
      
      r? @kmcallister (Shamelessly nominating because you were looking at my other ticket)
      8b8331ad
    • A
      std: Tweak the std::env OsString/String interface · a828e794
      Alex Crichton 提交于
      This commit tweaks the interface of the `std::env` module to make it more
      ergonomic for common usage:
      
      * `env::var` was renamed to `env::var_os`
      * `env::var_string` was renamed to `env::var`
      * `env::args` was renamed to `env::args_os`
      * `env::args` was re-added as a panicking iterator over string values
      * `env::vars` was renamed to `env::vars_os`
      * `env::vars` was re-added as a panicking iterator over string values.
      
      This should make common usage (e.g. unicode values everywhere) more ergonomic
      as well as "the default". This is also a breaking change due to the differences
      of what's yielded from each of these functions, but migration should be fairly
      easy as the defaults operate over `String` which is a common type to use.
      
      [breaking-change]
      a828e794
    • A
      rustc: Fix a number of stability lint holes · bbbb571f
      Alex Crichton 提交于
      There are a number of holes that the stability lint did not previously cover,
      including:
      
      * Types
      * Bounds on type parameters on functions and impls
      * Where clauses
      * Imports
      * Patterns (structs and enums)
      
      These holes have all been fixed by overriding the `visit_path` function on the
      AST visitor instead of a few specialized cases. This change also necessitated a
      few stability changes:
      
      * The `collections::fmt` module is now stable (it was already supposed to be).
      * The `thread_local::imp::Key` type is now stable (it was already supposed to
        be).
      * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable.
        These are required via the `panic!` macro.
      * The `std::old_io::stdio::{println, println_args}` functions are now stable.
        These are required by the `print!` and `println!` macros.
      * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to
        make bounds with these traits stable. Note that manual implementations of
        these traits are still gated by default, this stability only allows bounds
        such as `F: FnOnce()`.
      
      Additionally, the compiler now has special logic to ignore its own generated
      `__test` module for the `--test` harness in terms of stability.
      
      Closes #8962
      Closes #16360
      Closes #20327
      
      [breaking-change]
      bbbb571f
    • G
      d4985acc
    • B
      Auto merge of #21972 - pnkfelix:new-dtor-semantics-6, r=nikomatsakis · e29f4202
      bors 提交于
      This is a resurrection and heavy revision/expansion of a PR that pcwalton did to resolve #8861.
      
      The most relevant, user-visible semantic change is this: #[unsafe_destructor] is gone. Instead, if a type expression for some value has a destructor, then any lifetimes referenced within that type expression must strictly outlive the scope of the value.
      
      See discussion on https://github.com/rust-lang/rfcs/pull/769
      e29f4202