1. 03 3月, 2015 1 次提交
  2. 24 2月, 2015 1 次提交
  3. 22 2月, 2015 1 次提交
  4. 21 2月, 2015 1 次提交
  5. 19 2月, 2015 2 次提交
  6. 14 2月, 2015 1 次提交
  7. 12 2月, 2015 1 次提交
    • K
      librustc: Forbid partial reinitialization of uninitialized structures or · 32d0dbd4
      Kevin Butler 提交于
      enumerations that implement the `Drop` trait.
      
      This breaks code like:
      
          struct Struct {
              f: String,
              g: String,
          }
      
          impl Drop for Struct { ... }
      
          fn main() {
              let x = Struct { ... };
              drop(x);
              x.f = ...;
          }
      
      Change this code to not create partially-initialized structures. For
      example:
      
          struct Struct {
              f: String,
              g: String,
          }
      
          impl Drop for Struct { ... }
      
          fn main() {
              let x = Struct { ... };
              drop(x);
              x = Struct {
                  f: ...,
                  g: ...,
              }
          }
      
      Closes #18571.
      
      [breaking-change]
      
      ----
      
      (Joint authorship by pcwalton and Ryman; thanks all!)
      32d0dbd4
  8. 11 2月, 2015 1 次提交
    • S
      Move rustc docs to the book · 005a2506
      Steve Klabnik 提交于
      This is super black magic internals at the moment, but having it
      somewhere semi-public seems good. The current versions weren't being
      rendered, and they'll be useful for some people.
      
      Fixes #21281
      005a2506
  9. 07 2月, 2015 1 次提交
    • F
      Restrictions on moves out-from and into fixed-length arrays. · cc8f35f8
      Felix S. Klock II 提交于
      No longer legal: `fn foo(a: [D; 5]) { drop(a); a[2] = D::new(); }`;
      one must first initialize the entirety of `a` before assigning to its
      individual elements.
      
      No longer legal: `fn foo(arr: [D; 5]) -> D { arr[2] }`, unless `D`
      implements `Copy`. This "move out-from" restriction only affects
      `expr[i]`, and not destructuring (e.g. `f([a, b, c]: Array) { ... }`).
      
      uses mem_categorization to distinguish destructuring-bind from array
      indexing.
      
      See discussion on RFC PR 533.
      
      [breaking-change]
      cc8f35f8
  10. 06 2月, 2015 3 次提交
  11. 05 2月, 2015 1 次提交
  12. 04 2月, 2015 2 次提交
    • S
      Switch missing_copy_implementations to default-allow · 85a85c20
      Steven Fackler 提交于
      This was particularly helpful in the time just after OIBIT's
      implementation to make sure things that were supposed to be Copy
      continued to be, but it's now creates a lot of noise for types that
      intentionally don't want to be Copy.
      85a85c20
    • N
      Remove the explicit closure kind syntax from the parser and AST; · 04311341
      Niko Matsakis 提交于
      upgrade the inference based on expected type so that it is able to
      infer the fn kind in isolation even if the full signature is not
      available (and we could perhaps do better still in some cases, such as
      extracting just the types of the arguments but not the return value).
      04311341
  13. 29 1月, 2015 1 次提交
  14. 27 1月, 2015 1 次提交
  15. 26 1月, 2015 1 次提交
  16. 08 1月, 2015 2 次提交
  17. 07 1月, 2015 3 次提交
    • N
      fallout · 0c7f7a5f
      Nick Cameron 提交于
      0c7f7a5f
    • S
      core: split into fmt::Show and fmt::String · 44440e5c
      Sean McArthur 提交于
      fmt::Show is for debugging, and can and should be implemented for
      all public types. This trait is used with `{:?}` syntax. There still
      exists #[derive(Show)].
      
      fmt::String is for types that faithfully be represented as a String.
      Because of this, there is no way to derive fmt::String, all
      implementations must be purposeful. It is used by the default format
      syntax, `{}`.
      
      This will break most instances of `{}`, since that now requires the type
      to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the
      correct fix. Types that were being printed specifically for users should
      receive a fmt::String implementation to fix this.
      
      Part of #20013
      
      [breaking-change]
      44440e5c
    • N
      Replace full slice notation with index calls · f7ff37e4
      Nick Cameron 提交于
      f7ff37e4
  18. 06 1月, 2015 2 次提交
  19. 04 1月, 2015 2 次提交
  20. 03 1月, 2015 1 次提交
  21. 01 1月, 2015 1 次提交
  22. 25 12月, 2014 1 次提交
  23. 22 12月, 2014 1 次提交
  24. 19 12月, 2014 2 次提交
    • J
      librustc_borrowck: use `#[deriving(Copy)]` · 392ea799
      Jorge Aparicio 提交于
      392ea799
    • P
      librustc: Always parse `macro!()`/`macro![]` as expressions if not · ddb2466f
      Patrick Walton 提交于
      followed by a semicolon.
      
      This allows code like `vec![1i, 2, 3].len();` to work.
      
      This breaks code that uses macros as statements without putting
      semicolons after them, such as:
      
          fn main() {
              ...
              assert!(a == b)
              assert!(c == d)
              println(...);
          }
      
      It also breaks code that uses macros as items without semicolons:
      
          local_data_key!(foo)
      
          fn main() {
              println("hello world")
          }
      
      Add semicolons to fix this code. Those two examples can be fixed as
      follows:
      
          fn main() {
              ...
              assert!(a == b);
              assert!(c == d);
              println(...);
          }
      
          local_data_key!(foo);
      
          fn main() {
              println("hello world")
          }
      
      RFC #378.
      
      Closes #18635.
      
      [breaking-change]
      ddb2466f
  25. 14 12月, 2014 1 次提交
  26. 13 12月, 2014 1 次提交
  27. 09 12月, 2014 1 次提交
    • N
      librustc: Make `Copy` opt-in. · 096a2860
      Niko Matsakis 提交于
      This change makes the compiler no longer infer whether types (structures
      and enumerations) implement the `Copy` trait (and thus are implicitly
      copyable). Rather, you must implement `Copy` yourself via `impl Copy for
      MyType {}`.
      
      A new warning has been added, `missing_copy_implementations`, to warn
      you if a non-generic public type has been added that could have
      implemented `Copy` but didn't.
      
      For convenience, you may *temporarily* opt out of this behavior by using
      `#![feature(opt_out_copy)]`. Note though that this feature gate will never be
      accepted and will be removed by the time that 1.0 is released, so you should
      transition your code away from using it.
      
      This breaks code like:
      
          #[deriving(Show)]
          struct Point2D {
              x: int,
              y: int,
          }
      
          fn main() {
              let mypoint = Point2D {
                  x: 1,
                  y: 1,
              };
              let otherpoint = mypoint;
              println!("{}{}", mypoint, otherpoint);
          }
      
      Change this code to:
      
          #[deriving(Show)]
          struct Point2D {
              x: int,
              y: int,
          }
      
          impl Copy for Point2D {}
      
          fn main() {
              let mypoint = Point2D {
                  x: 1,
                  y: 1,
              };
              let otherpoint = mypoint;
              println!("{}{}", mypoint, otherpoint);
          }
      
      This is the backwards-incompatible part of #13231.
      
      Part of RFC #3.
      
      [breaking-change]
      096a2860
  28. 27 11月, 2014 1 次提交
  29. 25 11月, 2014 2 次提交