1. 28 1月, 2017 9 次提交
  2. 27 1月, 2017 11 次提交
    • B
      Auto merge of #39282 - petrochenkov:selfstab, r=nikomatsakis · 463affee
      bors 提交于
      Stabilize Self and associated types in struct expressions and patterns
      
      Rebase of https://github.com/rust-lang/rust/pull/37734
      Closes https://github.com/rust-lang/rust/issues/37544
      r? @nikomatsakis
      463affee
    • B
      Auto merge of #39252 - alexcrichton:less-exports, r=nrc · 8367fb7b
      bors 提交于
      Hide a few more standard library symbols
      
      These commits touch up some of the symbol visibility rules for some crates related to the standard library, notably:
      
      * Symbols that are `pub extern` and `#[no_mangle]` which are internal-to-rust ABI things are no longer at the `C` export level, but the `Rust` export level. This includes allocators, panic runtimes, and compiler builtins.
      * The libbacktrace library is now compiled with `-fvisibility=hidden` to ensure that we don't export those symbols.
      8367fb7b
    • A
      std: Compile libbacktrace with -fvisibility=hidden · 3d6f263b
      Alex Crichton 提交于
      We don't want these symbols exported from the standard library, this is
      just an internal implementation detail of the standard library
      currently.
      
      Closes #34984
      3d6f263b
    • A
      rustc: Don't export builtins/panic/alloc syms · a5561ce2
      Alex Crichton 提交于
      This hides symbols from various unstable and implementation-detail
      crates of the standard library. Although typically transitive exported
      `pub extern` functions are exported from cdylibs, these crates aren't
      necessary as they're all implementation details.
      
      Closes #34493
      a5561ce2
    • B
      Auto merge of #39281 - michaelwoerister:make-cc-incr-comp-opt-in, r=nikomatsakis · fece9c73
      bors 提交于
      incr.comp.: Make cross-crate tracking for incr. comp. opt-in.
      
      The current implementation of cross-crate dependency tracking can cause quite long compile times and high memory usage for some crates (see #39208 for example). This PR therefore makes that part of dependency tracking optional. Incremental compilation still works, it will only have very coarse dep-tracking for upstream crates.
      
      r? @nikomatsakis
      fece9c73
    • B
      Auto merge of #39139 - estebank:issue-38147, r=nikomatsakis · 025fb7de
      bors 提交于
      Point to immutable arg/fields when trying to use as &mut
      
      Present the following output when trying to access an immutable borrow's
      field as mutable:
      
      ```
      error[E0389]: cannot borrow data mutably in a `&` reference
        --> $DIR/issue-38147-1.rs:27:9
         |
      26 | fn f(&self) {
         |      -----  use `&mut self` here to make mutable
      27 |     f.s.push('x');
         |     ^^^ assignment into an immutable reference
      ```
      
      And the following when trying to access an immutable struct field as mutable:
      
      ```
      error: cannot borrow immutable borrowed content `*self.s` as mutable
        --> $DIR/issue-38147-3.rs:17:9
         |
      12 |     s: &'a String
         |     ------------- use `&'a mut String` here to make mutable
      ...|
      16 |     fn f(&self) {
         |          -----  use `&mut self` here to make mutable
      17 |         self.s.push('x');
         |         ^^^^^^ cannot borrow as mutable
      ```
      
      Fixes #38147.
      025fb7de
    • B
      Auto merge of #39158 - petrochenkov:bounds, r=nikomatsakis · 23a94697
      bors 提交于
      Bounds parsing refactoring 2
      
      See https://github.com/rust-lang/rust/pull/37511 for previous discussion.
      cc @matklad
      
      Relaxed parsing rules:
       - zero bounds after `:` are allowed in all contexts.
       - zero predicates are allowed after `where`.
      - trailing separator `,` is allowed after predicates in `where` clauses not followed by `{`.
      
      Other parsing rules:
       - trailing separator `+` is still allowed in all bound lists.
      
      Code is also cleaned up and tests added.
      
      I haven't touched parsing of trait object types yet, I'll do it later.
      23a94697
    • B
      rustc: Remove all "consider using an explicit lifetime parameter" suggestions · a2735c02
      Brian Anderson 提交于
      These give so many incorrect suggestions that having them is
      detrimental to the user experience. The compiler should not be
      suggesting changes to the code that are wrong - it is infuriating: not
      only is the compiler telling you that _you don't understand_ borrowing,
      _the compiler itself_ appears to not understand borrowing. It does not
      inspire confidence.
      a2735c02
    • E
      Point to immutable arg/fields when trying to use as &mut · e1280d81
      Esteban Küber 提交于
      Point to immutable borrow arguments and fields when trying to use them as
      mutable borrows. Add label to primary span on "cannot borrow as mutable"
      errors.
      
      Present the following output when trying to access an immutable borrow's
      field as mutable:
      
      ```
      error[E0389]: cannot borrow data mutably in a `&` reference
        --> $DIR/issue-38147-1.rs:27:9
         |
      26 | fn f(&self) {
         |      -----  use `&mut self` here to make mutable
      27 |     f.s.push('x');
         |     ^^^ assignment into an immutable reference
      ```
      
      And the following when trying to access an immutable struct field as mutable:
      
      ```
      error: cannot borrow immutable borrowed content `*self.s` as mutable
        --> $DIR/issue-38147-3.rs:17:9
         |
      12 |     s: &'a String
         |     ------------- use `&'a mut String` here to make mutable
      ...|
      16 |     fn f(&self) {
         |          -----  use `&mut self` here to make mutable
      17 |         self.s.push('x');
         |         ^^^^^^ cannot borrow as mutable
      ```
      e1280d81
    • B
      Auto merge of #39066 - arielb1:lifetime-extension-test, r=nikomatsakis · 8430042a
      bors 提交于
      End temporary lifetimes being extended by `let X: &_` hints
      
      cc #39283
      
      r? @nikomatsakis
      8430042a
    • A
      travis: Turn off core dumps on OSX · 7095a48b
      Alex Crichton 提交于
      I've seen these take up quite a bit of log space and I have the sneaking
      suspicion that they're just making our test suite take longer (sometimes timing
      out on 32-bit OSX now). In any case the backtraces haven't proven too useful,
      unfortunately.
      7095a48b
  3. 26 1月, 2017 20 次提交