1. 05 3月, 2015 4 次提交
    • H
      Add more debugging to syntax::feature_gate. · 10426f69
      Huon Wilson 提交于
      10426f69
    • H
      Use `#[allow_internal_unstable]` for `thread_local!` · ab7ef740
      Huon Wilson 提交于
      This destabilises all the implementation details of `thread_local!`,
      since they do not *need* to be stable with the new attribute.
      ab7ef740
    • H
      Add #[allow_internal_unstable] to track stability for macros better. · 84b060ce
      Huon Wilson 提交于
      Unstable items used in a macro expansion will now always trigger
      stability warnings, *unless* the unstable items are directly inside a
      macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns
      unless the span of the unstable item is a subspan of the definition of a
      macro marked with that attribute.
      
      E.g.
      
          #[allow_internal_unstable]
          macro_rules! foo {
              ($e: expr) => {{
                  $e;
                  unstable(); // no warning
                  only_called_by_foo!();
              }}
          }
      
          macro_rules! only_called_by_foo {
              () => { unstable() } // warning
          }
      
          foo!(unstable()) // warning
      
      The unstable inside `foo` is fine, due to the attribute. But the
      `unstable` inside `only_called_by_foo` is not, since that macro doesn't
      have the attribute, and the `unstable` passed into `foo` is also not
      fine since it isn't contained in the macro itself (that is, even though
      it is only used directly in the macro).
      
      In the process this makes the stability tracking much more precise,
      e.g. previously `println!("{}", unstable())` got no warning, but now it
      does. As such, this is a bug fix that may cause [breaking-change]s.
      
      The attribute is definitely feature gated, since it explicitly allows
      side-stepping the feature gating system.
      84b060ce
    • A
      std: Deprecate std::old_io::fs · 95d90462
      Alex Crichton 提交于
      This commit deprecates the majority of std::old_io::fs in favor of std::fs and
      its new functionality. Some functions remain non-deprecated but are now behind a
      feature gate called `old_fs`. These functions will be deprecated once
      suitable replacements have been implemented.
      
      The compiler has been migrated to new `std::fs` and `std::path` APIs where
      appropriate as part of this change.
      95d90462
  2. 04 3月, 2015 6 次提交
    • P
      Add quasiquote for matchers and attributes · 3541abed
      Piotr Czarnecki 提交于
      3541abed
    • 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
    • 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
  3. 03 3月, 2015 30 次提交