1. 22 8月, 2018 9 次提交
    • B
      Auto merge of #53477 - ftilde:exec-rust-gdb-lldb, r=michaelwoerister · 786ccc33
      bors 提交于
      Exec gdb/lldb in rust-{gdb/lldb} wrapper scripts
      
      This way, the process we get by executing `rust-gdb` or `rust-lldb` (eventually) is an actual `gdb` or `lldb` process and behaves accordingly. Previously (and at least to me unexpectedly) it was just a script waiting for the debugger to exit. Sending a signal (e.g. SIGINT) to the spawned process did therefore not affect the debugger process (which was just a child of the wrapper script).
      
      In order to work around that we `exec` (according to [this](http://pubs.opengroup.org/onlinepubs/009695399/utilities/exec.html) part of the posix shell) and replace the script process with the debugger in the last line of the script. The lldb script had to be modified to not pass the configuration commands via a script file (which in my opinion is cleaner anyway).
      786ccc33
    • B
      Auto merge of #50912 - varkor:exhaustive-integer-matching, r=arielb1 · a79cffb8
      bors 提交于
      Exhaustive integer matching
      
      This adds a new feature flag `exhaustive_integer_patterns` that enables exhaustive matching of integer types by their values. For example, the following is now accepted:
      ```rust
      #![feature(exhaustive_integer_patterns)]
      #![feature(exclusive_range_pattern)]
      
      fn matcher(x: u8) {
        match x { // ok
          0 .. 32 => { /* foo */ }
          32 => { /* bar */ }
          33 ..= 255 => { /* baz */ }
        }
      }
      ```
      This matching is permitted on all integer (signed/unsigned and char) types. Sensible error messages are also provided. For example:
      ```rust
      fn matcher(x: u8) {
        match x { //~ ERROR
          0 .. 32 => { /* foo */ }
        }
      }
      ```
      results in:
      ```
      error[E0004]: non-exhaustive patterns: `32u8...255u8` not covered
       --> matches.rs:3:9
        |
      6 |   match x {
        |         ^ pattern `32u8...255u8` not covered
      ```
      
      This implements https://github.com/rust-lang/rfcs/issues/1550 for https://github.com/rust-lang/rust/issues/50907. While there hasn't been a full RFC for this feature, it was suggested that this might be a feature that obviously complements the existing exhaustiveness checks (e.g. for `bool`) and so a feature gate would be sufficient for now.
      a79cffb8
    • V
      Add some extra edge case tests · 6971c5d5
      varkor 提交于
      6971c5d5
    • B
      Auto merge of #53439 -... · 1cbf3396
      bors 提交于
      Auto merge of #53439 - GuillaumeGomez:generate-blanket-impls-for-reexported-items, r=QuietMisdreavus
      
      Generate blanket implementations for reexported items as well
      
      Fixes #53374.
      
      r? @QuietMisdreavus
      1cbf3396
    • V
    • B
      Auto merge of #53471 - petrochenkov:biattr2, r=oli-obk · d0d81b7f
      bors 提交于
      resolve: Some macro resolution refactoring
      
      Work towards completing https://github.com/rust-lang/rust/pull/50911#issuecomment-411605393
      
      The last commit also fixes https://github.com/rust-lang/rust/issues/53269 by not using `def_id()` on `Def::Err` and also fixes https://github.com/rust-lang/rust/issues/53512.
      d0d81b7f
    • V
      Add a test case for u128::MAX - 1 · 6a957e17
      varkor 提交于
      6a957e17
    • B
      Auto merge of #53444 - varkor:lib_features-conditional, r=michaelwoerister · 2d6d3acf
      bors 提交于
      Only fetch lib_features when there are unknown feature attributes
      
      An attempt to win back some of the performance lost in https://github.com/rust-lang/rust/pull/52644#issuecomment-413761127.
      
      cc @nnethercote
      2d6d3acf
    • B
      Auto merge of #53530 - kennytm:rollup, r=kennytm · 9f9f2c00
      bors 提交于
      Rollup of 17 pull requests
      
      Successful merges:
      
       - #53030 (Updated RELEASES.md for 1.29.0)
       - #53104 (expand the documentation on the `Unpin` trait)
       - #53213 (Stabilize IP associated constants)
       - #53296 (When closure with no arguments was expected, suggest wrapping)
       - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.)
       - #53363 (add individual docs to `core::num::NonZero*`)
       - #53370 (Stabilize macro_vis_matcher)
       - #53393 (Mark libserialize functions as inline)
       - #53405 (restore the page title after escaping out of a search)
       - #53452 (Change target triple used to check for lldb in build-manifest)
       - #53462 (Document Box::into_raw returns non-null ptr)
       - #53465 (Remove LinkMeta struct)
       - #53492 (update lld submodule to include RISCV patch)
       - #53496 (Fix typos found by codespell.)
       - #53521 (syntax: Optimize some literal parsing)
       - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/)
       - #53551 (Avoid some Place clones.)
      
      Failed merges:
      
      r? @ghost
      9f9f2c00
  2. 21 8月, 2018 31 次提交