1. 26 4月, 2018 9 次提交
  2. 25 4月, 2018 17 次提交
    • B
      Auto merge of #49321 - ishitatsuyuki:compile-pass, r=alexcrichton · 25749ad6
      bors 提交于
      Introduce compile-pass
      
      r? @alexcrichton
      
      The plan is to move things that cannot fail (no assert, unwrap, etc) out so we don't have to run them, and in the long term we can also stop running LLVM for them.
      
      Out of 3215 tests...
      
      ```
      Language            Files        Lines         Code     Comments       Blanks
      Rust                 3215       119254        64688        35135        19431
      ```
      
      16% of them has an empty main (which is already moved in this PR).
      
      ```
      grep -rnPzl 'fn main\(\)\s*{\s*}' | xargs rg --files-without-match cfg | wc -l
      547
      ```
      
      And only 50% of the tests contains assertions:
      
      ```
      rg -e assert -e unwrap -e expect -e panic -l | wc -l
      1600
      ```
      
      The remainder is likely able to get moved, but they need check by a human so I didn't touch them in PR.
      
      cc @rust-lang/compiler
      
      * [ ] Update documentation
      25749ad6
    • B
      Auto merge of #50134 - andjo403:jobserver, r=michaelwoerister · 81135c9d
      bors 提交于
      make rustdoc test follow the jobserver limit of threads
      
      fix that to many threads is executing at the same time
      when rustdoc test is executed.
      81135c9d
    • J
      Move the Lock into OpenTask · 3f802ee8
      John Kåre Alsaker 提交于
      3f802ee8
    • J
      Address comments · 8ec629b3
      John Kåre Alsaker 提交于
      8ec629b3
    • J
      Make DepGraph thread-safe · 64b5d408
      John Kåre Alsaker 提交于
      64b5d408
    • B
      Auto merge of #50110 - oli-obk:warn_all_the_constants, r=estebank · 5ec6637c
      bors 提交于
      Warn on all erroneous constants
      
      fixes #49791
      fixes #47054
      
      @Zoxc this PR triggers the nondeterministic errors of https://github.com/rust-lang/rust/pull/49950#issuecomment-383074959 really often (at least on stage1).
      5ec6637c
    • T
      compiletest: introduce skip-trans · 00bc634f
      Tatsuyuki Ishi 提交于
      00bc634f
    • B
      Auto merge of #50106 - nnethercote:nearest_common_ancestor, r=nikomatsakis · cc794209
      bors 提交于
      Speed up `nearest_common_ancestor`.
      
      `nearest_common_ancestor` can be made faster.
      
      Here are all the benchmarks where one of the measurements improved by at least 1%.
      ```
      clap-rs-check
      	avg: -4.5%	min: -8.8%	max: -0.3%
      clap-rs
      	avg: -2.6%	min: -4.5%	max: 0.5%
      script-servo
      	avg: -1.7%	min: -3.6%	max: 0.0%
      regression-31157
      	avg: -1.5%	min: -2.6%	max: -0.4%
      hyper
      	avg: -1.2%	min: -2.5%	max: -0.0%
      piston-image
      	avg: -1.6%	min: -2.5%	max: 0.1%
      regex
      	avg: -1.2%	min: -2.2%	max: 0.0%
      issue-46449
      	avg: -1.8%	min: -2.1%	max: -0.7%
      crates.io
      	avg: -1.2%	min: -2.1%	max: 0.0%
      hyper-check
      	avg: -1.0%	min: -2.1%	max: -0.1%
      clap-rs-opt
      	avg: -1.4%	min: -2.0%	max: -0.3%
      piston-image-check
      	avg: -1.2%	min: -1.9%	max: -0.1%
      regex-check
      	avg: -0.5%	min: -1.8%	max: -0.1%
      syn
      	avg: -1.1%	min: -1.7%	max: -0.1%
      tokio-webpush-simple-check
      	avg: -1.1%	min: -1.6%	max: -0.3%
      tokio-webpush-simple
      	avg: -1.2%	min: -1.6%	max: -0.0%
      helloworld-check
      	avg: -1.4%	min: -1.6%	max: -1.2%
      deeply-nested
      	avg: -1.2%	min: -1.4%	max: -0.8%
      encoding-check
      	avg: -0.8%	min: -1.3%	max: -0.3%
      unify-linearly-check
      	avg: -1.0%	min: -1.3%	max: -0.8%
      script-servo-check
      	avg: -0.6%	min: -1.3%	max: 0.0%
      regression-31157-check
      	avg: -0.9%	min: -1.2%	max: -0.7%
      script-servo-opt
      	avg: -0.5%	min: -1.2%	max: 0.1%
      deeply-nested-check
      	avg: -0.8%	min: -1.2%	max: -0.7%
      encoding
      	avg: -0.7%	min: -1.1%	max: -0.3%
      issue-46449-check
      	avg: -0.9%	min: -1.1%	max: -0.6%
      parser-check
      	avg: -0.9%	min: -1.1%	max: -0.8%
      html5ever
      	avg: -0.5%	min: -1.0%	max: -0.0%
      ```
      cc794209
    • B
      Auto merge of #50100 - Manishearth:edition-path-lint, r=nikomatsakis · 432fe0ce
      bors 提交于
      Edition breakage lint for absolute paths starting with modules
      
      We plan to enable `extern_absolute_paths` in the 2018 edition. To allow for that, folks must transition their paths in a previous edition to the new one. This makes paths which import module contents via `use module::` or `::module::` obsolete, and we must edition-lint these.
      
      https://internals.rust-lang.org/t/the-great-module-adventure-continues/6678/205?u=manishearth is the current plan for paths.
      
      r? @nikomatsakis
      
      Fixes #48722
      432fe0ce
    • T
      Remove methods with implicit Binder::skip_bound · 9ffe9bea
      Tyler Mandry 提交于
      Fixes #20664.
      9ffe9bea
    • T
      Make Binder's field private and clean up its usage · 98546f8b
      Tyler Mandry 提交于
      98546f8b
    • B
      Auto merge of #49986 - zofrex:better-derived-argument-names, r=Manishearth · 0c5740fe
      bors 提交于
      Provide better names for builtin deriving-generated attributes
      
      First attempt at fixing #49967
      
      Not in love with any choices here, don't be shy if you aren't happy with anything :)
      
      I've tested that this produces nicer names in documentation, and that it no longer has issues conflicting with constants with the same name. (I guess we _could_ make a test for that... unsure if that would be valuable)
      
      In all cases I took the names from the methods as declared in the relevant trait.
      
      In some cases I had to prepend the names with _ otherwise there were errors about un-used variables. I'm uneasy with the inconsistency... do they all need to be like that? Is there a way to generate an alternate impl or use a different name (`_`?) in the cases where the arguments are not used?
      
      Lastly the gensym addition to Ident I implemented largely as suggested, but I want to point out it's a little circuitous (at least, as far as I understand it). `cx.ident_of(name)` is just `Ident::from_str`, so we create an Ident then another Ident from it. `Ident::with_empty_ctxt(Symbol::gensym(string))` may or may not be equivalent, I don't know if it's important to intern it _then_ gensym it. It seems like either we could use that, or if we do want a new method to make this convenient, it could be on Ident instead (`from_str_gensymed`?)
      0c5740fe
    • J
      Test format hygiene · d6feab6f
      James Sanderson 提交于
      d6feab6f
    • B
      Auto merge of #50096 - alexcrichton:less-simd-warnings, r=michaelwoerister · 190a6c41
      bors 提交于
      Tweak some warnings around #[target_feature]
      
      This commit fixes up some issues discovered when getting the `stdsimd` crate's CI compiling again.
      190a6c41
    • J
      Gensym arguments for format macro · 27b0f1e1
      James Sanderson 提交于
      27b0f1e1
    • J
      Test deriving hygiene · d80797b8
      James Sanderson 提交于
      d80797b8
    • B
      Auto merge of #49933 - oli-obk:miri_rustup, r=eddyb · f5203d10
      bors 提交于
      Fix the miri tool
      
      r? @EddyB
      
      cc @bjorn3
      
      fixes #49777
      f5203d10
  3. 24 4月, 2018 14 次提交
    • B
      Auto merge of #50079 - NickAtAccuPS:android_abstract_socket, r=sfackler · 38e251ba
      bors 提交于
      Android abstract unix domain sockets AddressKind correction
      
      The prior check causes abstract unix domain sockets to return AddressKind::Unnamed instead of AddressKind::Abstract on Android.
      
      Other than the immediately proceeding comment "macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses" the check as-implemented does not seem to have alternative explanation. I couldn't find an alternative explanation while stepping though git blame. I suspect the AddressKind::Unnamed nonzero check should instead be if macos, length 16, and zeroed array. @sfackler could you comment on this, the code as-is is the same from your initial addition of abstract uds support.
      38e251ba
    • O
      Warn on all erroneous constants · cd6c186e
      Oliver Schneider 提交于
      cd6c186e
    • B
      Auto merge of #49911 - rcoh:master, r=nikomatsakis · 2a6200a5
      bors 提交于
      Don't allow #[should_panic] with non-() tests
      
      Adds (removes) support for `#[should_panic]` when the test is non-`()`
      2a6200a5
    • B
      Auto merge of #49837 - nikomatsakis:chalkify-engine, r=scalexm · 898c9f7d
      bors 提交于
      work towards chalkify-ing the engine
      
      This work towards creating a "all program clauses needed for this goal" query
      
      r? @scalexm
      898c9f7d
    • B
      Auto merge of #50191 - kennytm:rollup, r=kennytm · 52ed3d87
      bors 提交于
      Rollup of 11 pull requests
      
      Successful merges:
      
       - #49461 (std: Child::kill() returns error if process has already exited)
       - #49727 (Add Cell::update)
       - #49812 (Fix revision support for UI tests.)
       - #49829 (Add doc links to `std::os` extension traits)
       - #49906 (Stabilize `std::hint::unreachable_unchecked`.)
       - #49970 (Deprecate Read::chars and char::decode_utf8)
       - #49985 (don't see issue #0)
       - #50118 (fix search bar bug)
       - #50139 (encourage descriptive issue titles)
       - #50174 (Use FxHashMap in syntax_pos::symbol::Interner::intern.)
       - #50185 (core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN`)
      
      Failed merges:
      52ed3d87
    • K
      Rollup merge of #50185 - dmizuk:mod_euc-fix-overflow, r=kennytm · 893774e1
      kennytm 提交于
      core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN`
      
      This commit removes usage of `abs`, which overflows when `self == MIN`.
      893774e1
    • K
      Rollup merge of #50174 - nnethercote:FxHashMap-Interner, r=michaelwoerister · 8d0c5da7
      kennytm 提交于
      Use FxHashMap in syntax_pos::symbol::Interner::intern.
      
      Because it's faster than HashMap.
      
      This change reduces the time taken for a few of the rustc-perf
      benchmarks, mostly the small ones, by up to 5%.
      ```
      coercions
              avg: -1.3%      min: -5.5%      max: -0.0%
      helloworld-check
              avg: -2.3%      min: -3.5%      max: -1.8%
      deeply-nested-check
              avg: -1.4%      min: -3.2%      max: -0.5%
      tuple-stress-opt
              avg: -0.7%      min: -2.0%      max: -0.1%
      unify-linearly-check
              avg: -1.2%      min: -1.9%      max: -0.6%
      coercions-check
              avg: -0.8%      min: -1.3%      max: -0.4%
      unused-warnings-check
              avg: -1.0%      min: -1.3%      max: -0.8%
      deeply-nested-opt
              avg: -0.5%      min: -1.2%      max: -0.2%
      deeply-nested
              avg: -0.7%      min: -1.2%      max: -0.4%
      helloworld
              avg: -0.8%      min: -1.1%      max: -0.7%
      tuple-stress-check
              avg: -0.5%      min: -1.0%      max: -0.1%
      unused-warnings
              avg: -0.8%      min: -1.0%      max: -0.7%
      unused-warnings-opt
              avg: -0.8%      min: -1.0%      max: -0.7%
      coercions-opt
              avg: -0.5%      min: -1.0%      max: -0.1%
      helloworld-opt
              avg: -0.7%      min: -1.0%      max: -0.6%
      ```
      8d0c5da7
    • K
      Rollup merge of #50139 - nivkner:docs, r=steveklabnik · 8545ecdb
      kennytm 提交于
      encourage descriptive issue titles
      
      There are two sides to avoiding duplicate issues, searching for existing ones, and making sure existing ones can be searched for. This addresses the later.
      
      r? @steveklabnik
      8545ecdb
    • K
      Rollup merge of #50118 - GuillaumeGomez:search-bar-bug, r=QuietMisdreavus · 05ef5bcb
      kennytm 提交于
      fix search bar bug
      
      Fixes #50064.
      
      r? @QuietMisdreavus
      05ef5bcb
    • K
      Rollup merge of #49985 - zackmdavis:0, r=estebank · 7c552a29
      kennytm 提交于
      don't see issue #0
      
      The unstable-feature attribute requires an issue (neglecting it is
      E0547), which gets used in the error messages. Unfortunately, there are
      some cases where "0" is apparently used a placeholder where no issue
      exists, directing the user to see the (nonexistent) issue #0. (It would
      have been better to either let `issue` be optional—compare to how issue
      is an `Option<u32>` in the feature-gate declarations in
      libsyntax/feature-gate.rs—or actually require that an issue be created.)
      Rather than endeavoring to change how `#[unstable]` works at this time
      (given competing contributor and reviewer priorities), this simple patch
      proposes the less-ambitious solution of just not adding the "(see
      issue)" note when the number is zero.
      
      Resolves #49983.
      7c552a29
    • K
    • K
      Rollup merge of #49906 - kennytm:stable-unreachable, r=sfackler · f28f5aa0
      kennytm 提交于
      Stabilize `std::hint::unreachable_unchecked`.
      
      Closes #43751.
      f28f5aa0
    • K
      Rollup merge of #49829 - ecstatic-morse:os-docs, r=steveklabnik · 2701c175
      kennytm 提交于
      Add doc links to `std::os` extension traits
      
      Addresses a small subset of #29367.
      
      This adds documentation links to the original type for various OS-specific extension traits, and uses a common sentence for introducing such traits (which now consistently ends in a period).
      2701c175
    • K
      Rollup merge of #49812 - ehuss:ui-test-revisions, r=nikomatsakis · b9dbf8e2
      kennytm 提交于
      Fix revision support for UI tests.
      
      Fixes #48878
      b9dbf8e2