1. 05 3月, 2015 4 次提交
  2. 04 3月, 2015 10 次提交
    • B
      Auto merge of #22235 - michaelwoerister:cross-crate-spans, r=michaelwoerister · 3b3bb0e6
      bors 提交于
      This allows to create proper debuginfo line information for items inlined from other crates (e.g. instantiations of generics). Only the codemap's 'metadata' is stored in a crate's metadata. That is, just filename, positions of line-beginnings, etc. but not the actual source code itself.
      
      Crate metadata size is increased by this change because spans in the encoded ASTs take up space now:
      ```
                      BEFORE    AFTER
      libcore         36 MiB    39.6 MiB    +10%
      libsyntax       51.1 MiB  60.5 MiB    +18.4%
      libcollections  11.2 MiB  12.8 MiB    +14.3%
      ```
      This only affects binaries containing metadata (rlibs and dylibs), executables should not be affected in size. 
      
      Fixes #19228 and probably #22226.
      3b3bb0e6
    • B
      bdf6e4fc
    • B
      6e055c3f
    • M
      Encode codemap and span information in crate metadata. · 2f886555
      Michael Woerister 提交于
      This allows to create proper debuginfo line information for items inlined from other crates (e.g. instantiations of generics).
      Only the codemap's 'metadata' is stored in a crate's metadata. That is, just filename, line-beginnings, etc. but not the actual source code itself. We are thus missing the opportunity of making Rust the first "open-source-only" programming language out there. Pity.
      2f886555
    • B
      Auto merge of #23002 - pnkfelix:fsk-box-place-runway, r=nikomatsakis · fed12499
      bors 提交于
      Runway for RFC 809 (overloaded box/placement-in) by adding type annotations or explicit calls to `Box::new` where I found it necessary on PR #22086.
      
      I have broken this up into more than one PR because the entire commit chain (see PR #22086) is long, widespread and unwieldy to rebase frequently.
      
      To my knowledge this is not a breaking change.  Also, there is in principle nothing stopping someone from reverting some/all of these annotations, since without the rest of the commit chain in #22086, the associated code would continue to compile.
      
      All I can do is ask: Try to discourage others from removing seemingly "unnecessary" uses of the `Box` type or the `Box::new()` function, until the rest of RFC 809 lands.
      fed12499
    • F
      Fix doc example to accommodate overloaded-box. · cb1b0dd5
      Felix S. Klock II 提交于
      cb1b0dd5
    • F
      Switched to Box::new in many places. · 0d5bcb14
      Felix S. Klock II 提交于
      Many of the modifications putting in `Box::new` calls also include a
      pointer to Issue 22405, which tracks going back to `box <expr>` if
      possible in the future.
      
      (Still tried to use `Box<_>` where it sufficed; thus some tests still
      have `box_syntax` enabled, as they use a mix of `box` and `Box::new`.)
      
      Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
      0d5bcb14
    • F
      inline `Box::new` always. · b03279aa
      Felix S. Klock II 提交于
      (You shouldn't use it, but it is a semi-reasonable way to annotate
      types when necessary.)
      b03279aa
    • F
      Add `: Box<_>` or `::Box<_>` type annotations to various places. · 270f0eef
      Felix S. Klock II 提交于
      This is the kind of change that one is expected to need to make to
      accommodate overloaded-`box`.
      
      ----
      
      Note that this is not *all* of the changes necessary to accommodate
      Issue 22181.  It is merely the subset of those cases where there was
      already a let-binding in place that made it easy to add the necesasry
      type ascription.
      
      (For unnamed intermediate `Box` values, one must go down a different
      route; `Box::new` is the option that maximizes portability, but has
      potential inefficiency depending on whether the call is inlined.)
      
      ----
      
      There is one place worth note, `run-pass/coerce-match.rs`, where I
      used an ugly form of `Box<_>` type ascription where I would have
      preferred to use `Box::new` to accommodate overloaded-`box`.  I
      deliberately did not use `Box::new` here, because that is already done
      in coerce-match-calls.rs.
      
      ----
      
      Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
      270f0eef
    • B
      Auto merge of #22997 - pnkfelix:make-timestamps-robust-to-concurrent-edits, r=nikomatsakis · 129173f1
      bors 提交于
      Make build timestamp files robust in face of concurrent source modification.
      
      Strategy: If the end goal is to touch e.g. `stamp.std`, then we first touch `stamp.std.start_time` before doing anything else.  Then when the receipe finishes, we touch `stamp.std` using the timestamp from `stamp.std.start_time` as the reference time, and remove `stamp.std.start_time`.
      
      Fix #6518.
      129173f1
  3. 03 3月, 2015 26 次提交