1. 15 8月, 2014 2 次提交
    • P
      librustc: Implement simple `where` clauses. · 604af3f6
      Patrick Walton 提交于
      These `where` clauses are accepted everywhere generics are currently
      accepted and desugar during type collection to the type parameter bounds
      we have today.
      
      A new keyword, `where`, has been added. Therefore, this is a breaking
      change. Change uses of `where` to other identifiers.
      
      [breaking-change]
      604af3f6
    • P
      librustc: Stop assuming that implementations and traits only contain · 9907fa4a
      Patrick Walton 提交于
      methods.
      
      This paves the way to associated items by introducing an extra level of
      abstraction ("impl-or-trait item") between traits/implementations and
      methods. This new abstraction is encoded in the metadata and used
      throughout the compiler where appropriate.
      
      There are no functional changes; this is purely a refactoring.
      9907fa4a
  2. 07 8月, 2014 1 次提交
  3. 06 8月, 2014 2 次提交
  4. 26 7月, 2014 1 次提交
  5. 19 7月, 2014 2 次提交
  6. 18 7月, 2014 1 次提交
    • P
      librustc: Remove cross-borrowing of `Box<T>` to `&T` from the language, · de70d763
      Patrick Walton 提交于
      except where trait objects are involved.
      
      Part of issue #15349, though I'm leaving it open for trait objects.
      Cross borrowing for trait objects remains because it is needed until we
      have DST.
      
      This will break code like:
      
          fn foo(x: &int) { ... }
      
          let a = box 3i;
          foo(a);
      
      Change this code to:
      
          fn foo(x: &int) { ... }
      
          let a = box 3i;
          foo(&*a);
      
      [breaking-change]
      de70d763
  7. 17 7月, 2014 1 次提交
    • P
      librustc: Implement the fully-expanded, UFCS form of explicit self. · 357d5cd9
      Patrick Walton 提交于
      This makes two changes to region inference: (1) it allows region
      inference to relate early-bound regions; and (2) it allows regions to be
      related before variance runs. The former is needed because there is no
      relation between the two regions before region substitution happens,
      while the latter is needed because type collection has to run before
      variance. We assume that, before variance is inferred, that lifetimes
      are invariant. This is a conservative overapproximation.
      
      This relates to #13885. This does not remove `~self` from the language
      yet, however.
      
      [breaking-change]
      357d5cd9
  8. 16 7月, 2014 2 次提交
  9. 14 7月, 2014 1 次提交
    • J
      refactor Method definition to make space for macros · b0b4b312
      John Clements 提交于
      This change propagates to many locations, but because of the
      Macro Exterminator (or, more properly, the invariant that it
      protects), macro invocations can't occur downstream of expansion.
      This means that in librustc and librustdoc, extracting the
      desired field can simply assume that it can't be a macro
      invocation. Functions in ast_util abstract over this check.
      b0b4b312
  10. 09 7月, 2014 1 次提交
  11. 08 7月, 2014 1 次提交
    • N
      Change DST syntax: type -> Sized? · a0cfda53
      Nick Cameron 提交于
      closes #13367
      
      [breaking-change] Use `Sized?` to indicate a dynamically sized type parameter or trait (used to be `type`). E.g.,
      
      ```
      trait Tr for Sized? {}
      
      fn foo<Sized? X: Share>(x: X) {}
      ```
      a0cfda53
  12. 22 6月, 2014 1 次提交
  13. 14 6月, 2014 1 次提交
    • N
      Introduce VecPerParamSpace and use it to represent sets of types and · 9153d8ad
      Niko Matsakis 提交于
      parameters
      
      This involves numerous substeps:
      
      1. Treat Self same as any other parameter.
      2. No longer compute offsets for method parameters.
      3. Store all generic types (both trait/impl and method) with a method,
         eliminating odd discrepancies.
      4. Stop doing unspeakable things to static methods and instead just use
         the natural types, now that we can easily add the type parameters from
         trait into the method's polytype.
      5. No doubt some more. It was hard to separate these into distinct commits.
      
      Fixes #13564
      9153d8ad
  14. 12 6月, 2014 1 次提交
  15. 10 6月, 2014 1 次提交
  16. 07 6月, 2014 2 次提交
  17. 06 6月, 2014 1 次提交
  18. 31 5月, 2014 1 次提交
    • K
      librustc: Fix snake case errors. · 09fc3406
      Kevin Butler 提交于
      A number of functions/methods have been moved or renamed to align
      better with rust standard conventions.
      
      rustc::back::link::WriteOutputFile => write_output_file
      rustc::middle::ty::EmptyBuiltinBounds => empty_builtin_bounds
      rustc::middle::ty::AllBuiltinBounds => all_builtin_bounds
      rustc::middle::liveness::IrMaps => IrMaps::new
      rustc::middle::liveness::Liveness => Liveness::new
      rustc::middle::resolve::NameBindings => NameBindings::new
      rustc::middle::resolve::PrimitiveTypeTable => PrimitiveTypeTable::new
      rustc::middle::resolve::Resolver => Resolver::new
      rustc::middle::trans::datum::Datum => Datum::new
      rustc::middle::trans::datum::DatumBlock => DatumBlock::new
      rustc::middle::trans::datum::Rvalue => Rvalue::new
      rustc::middle::typeck::infer::new_ValsAndBindings => ::infer::unify::ValsAndBindings::new
      rustc::middle::typeck::infer::region_inference::RegionVarBindings => RegionVarBindings::new
      
      [breaking-change]
      09fc3406
  19. 23 5月, 2014 1 次提交
  20. 13 5月, 2014 1 次提交
  21. 04 5月, 2014 1 次提交
  22. 01 5月, 2014 1 次提交
  23. 23 4月, 2014 4 次提交
  24. 20 4月, 2014 1 次提交
  25. 18 4月, 2014 1 次提交
  26. 11 4月, 2014 1 次提交
  27. 04 4月, 2014 1 次提交
    • A
      syntax: Remove AbiSet, use one Abi · 57e0908a
      Alex Crichton 提交于
      This change removes the AbiSet from the AST, converting all usage to have just
      one Abi value. The current scheme selects a relevant ABI given a list of ABIs
      based on the target architecture and how relevant each ABI is to that
      architecture.
      
      Instead of this mildly complicated scheme, only one ABI will be allowed in abi
      strings, and pseudo-abis will be created for special cases as necessary. For
      example the "system" abi exists for stdcall on win32 and C on win64.
      
      Closes #10049
      57e0908a
  28. 31 3月, 2014 1 次提交
  29. 30 3月, 2014 1 次提交
  30. 27 3月, 2014 1 次提交
    • A
      syntax: Permit visibility on tuple fields · 7de48419
      Alex Crichton 提交于
      This change is in preparation for #8122. Nothing is currently done with these
      visibility qualifiers, they are just parsed and accepted by the compiler.
      
      RFC: 0004-private-fields
      7de48419
  31. 22 3月, 2014 2 次提交