1. 05 1月, 2015 4 次提交
  2. 04 1月, 2015 4 次提交
  3. 03 1月, 2015 11 次提交
  4. 02 1月, 2015 6 次提交
    • S
      Make type in ast::Local optional · f2a06f76
      Seo Sanghyeon 提交于
      f2a06f76
    • N
      Fix orphan checking (cc #19470). (This is not a complete fix of #19470 because... · c61a0092
      Niko Matsakis 提交于
      Fix orphan checking (cc #19470). (This is not a complete fix of #19470 because of the backwards compatibility feature gate.)
      
      This is a [breaking-change]. The new rules require that, for an impl of a trait defined
      in some other crate, two conditions must hold:
      
      1. Some type must be local.
      2. Every type parameter must appear "under" some local type.
      
      Here are some examples that are legal:
      
      ```rust
      struct MyStruct<T> { ... }
      
      // Here `T` appears "under' `MyStruct`.
      impl<T> Clone for MyStruct<T> { }
      
      // Here `T` appears "under' `MyStruct` as well. Note that it also appears
      // elsewhere.
      impl<T> Iterator<T> for MyStruct<T> { }
      ```
      
      Here is an illegal example:
      
      ```rust
      // Here `U` does not appear "under" `MyStruct` or any other local type.
      // We call `U` "uncovered".
      impl<T,U> Iterator<U> for MyStruct<T> { }
      ```
      
      There are a couple of ways to rewrite this last example so that it is
      legal:
      
      1. In some cases, the uncovered type parameter (here, `U`) should be converted
         into an associated type. This is however a non-local change that requires access
         to the original trait. Also, associated types are not fully baked.
      2. Add `U` as a type parameter of `MyStruct`:
         ```rust
         struct MyStruct<T,U> { ... }
         impl<T,U> Iterator<U> for MyStruct<T,U> { }
         ```
      3. Create a newtype wrapper for `U`
         ```rust
         impl<T,U> Iterator<Wrapper<U>> for MyStruct<T,U> { }
         ```
      
      Because associated types are not fully baked, which in the case of the
      `Hash` trait makes adhering to this rule impossible, you can
      temporarily disable this rule in your crate by using
      `#![feature(old_orphan_check)]`. Note that the `old_orphan_check`
      feature will be removed before 1.0 is released.
      c61a0092
    • A
      std: Second pass stabilization for `boxed` · f2ccdfd8
      Alex Crichton 提交于
      This commit performs a second pass over the `std::boxed` module, taking the
      following actions:
      
      * `boxed` is now stable
      * `Box` is now stable
      * `BoxAny` is removed in favor of a direct `impl Box<Any>`
      * `Box::downcast` remains unstable while the name of the `downcast` family of
        methods is determined.
      
      This is a breaking change due to the removal of the `BoxAny` trait (note that
      the `downcast` method still exists), and existing consumers of `BoxAny` simply
      need to remove the import in their modules.
      
      [breaking-change]
      f2ccdfd8
    • N
      Refactor the Typer interface to separate out UnboxedClosureTyper methods, which are · 78f848cd
      Niko Matsakis 提交于
      the only things that trait selection needs.
      78f848cd
    • C
      Implement numeric fallback · 53ece715
      Corey Richardson 提交于
      Doesn't yet converge on a fixed point, but generally works. A better algorithm
      will come with the implementation of default type parameter fallback.
      
      If inference fails to determine an exact integral or floating point type, it
      will set the type to i32 or f64, respectively.
      
      Closes #16968
      53ece715
    • N
      Fallout - change array syntax to use `;` · 7e2b9ea2
      Nick Cameron 提交于
      7e2b9ea2
  5. 01 1月, 2015 6 次提交
  6. 31 12月, 2014 2 次提交
  7. 30 12月, 2014 7 次提交