1. 15 12月, 2017 32 次提交
  2. 14 12月, 2017 8 次提交
    • B
      Auto merge of #45002 - oli-obk:miri, r=eddyb · 29741042
      bors 提交于
      Validate miri against the HIR const evaluator
      
      r? @EddyB
      
      cc @alexcrichton @arielb1 @RalfJung
      
      The interesting parts are the last few functions in `librustc_const_eval/eval.rs`
      
      * We warn if miri produces an error while HIR const eval does not.
      * We warn if miri produces a value that does not match the value produced by HIR const eval
      * if miri succeeds and HIR const eval fails, nothing is emitted, but we still return the HIR error
      * if both error, nothing is emitted and the HIR const eval error is returned
      
      So there are no actual changes, except that miri is forced to produce the same values as the old const eval.
      
      * This does **not** touch the const evaluator in trans at all. That will come in a future PR.
      * This does **not** cause any code to compile that didn't compile before. That will also come in the future
      
      It would be great if someone could start a crater run if travis passes
      29741042
    • F
      Address review note: `AccessErrorsReported` meant to track whether error... · b75248ef
      Felix S. Klock II 提交于
      Address review note: `AccessErrorsReported` meant to track whether error reported at *any* point in past.
      b75248ef
    • O
      Do not produce debuginfo for tools · 7a2bff7f
      Oliver Schneider 提交于
      7a2bff7f
    • B
      Auto merge of #46335 - oli-obk:cleanups, r=jseyfried · 8624ea51
      bors 提交于
      Use PathBuf instead of String where applicable
      
      r? @jseyfried
      8624ea51
    • O
      Move mir validation out of tree · 1ba46dc3
      Oliver Schneider 提交于
      1ba46dc3
    • O
      Use PathBuf instead of String where applicable · d732da81
      Oliver Schneider 提交于
      d732da81
    • B
      Auto merge of #46633 - estebank:arg-mismatch, r=arielb1 · 75a02a91
      bors 提交于
      Point at whole method call instead of args
      
      To avoid confusion in cases where the code is
      
      ```rust
      fn foo() {}
      / foo(
      |     bar()
      |     ^^^ current diagnostics point here for arg count mismatch
      | );
      |_^ new diagnostic span points here
      ```
      
      as this leads to confusion making people think that the diagnostic is
      talking about `bar`'s arg count, not `foo`'s.
      
      Point at `fn`s definition on arg mismatch, just like we do for closures.
      
      Re #42855, Fix #45633.
      75a02a91
    • B
      Auto merge of #46605 - estebank:macro-backtrace-spans, r=pnkfelix · 8954b16b
      bors 提交于
      Use spans for -Z external-macro-backtrace
      
      ```
      % rustc ui/type-check/cannot_infer_local_or_vec.rs -Z external-macro-backtrace
      error[E0282]: type annotations needed
        --> <vec macros>:3:1
         |
      1  | / ( $ elem : expr ; $ n : expr ) => (
      2  | | $ crate :: vec :: from_elem ( $ elem , $ n ) ) ; ( $ ( $ x : expr ) , * ) => (
      3  | | < [ _ ] > :: into_vec ( box [ $ ( $ x ) , * ] ) ) ; ( $ ( $ x : expr , ) * )
         | | ^^^^^^^^^^^^^^^^^^^^^
         | | |
         | | cannot infer type for `T`
      4  | | => ( vec ! [ $ ( $ x ) , * ] )
         | |______________________________- in this expansion of `vec!`
         |
        ::: ui/type-check/cannot_infer_local_or_vec.rs
         |
      12 |       let x = vec![];
         |           -   ------ in this macro invocation
         |           |
         |           consider giving `x` a type
      
      error: aborting due to previous error
      ```
      8954b16b