1. 06 1月, 2015 1 次提交
  2. 20 7月, 2014 1 次提交
    • P
      librustc: Implement lifetime elision. · 6f99a278
      Patrick Walton 提交于
      This implements RFC 39. Omitted lifetimes in return values will now be
      inferred to more useful defaults, and an error is reported if a lifetime
      in a return type is omitted and one of the two lifetime elision rules
      does not specify what it should be.
      
      This primarily breaks two uncommon code patterns. The first is this:
      
          unsafe fn get_foo_out_of_thin_air() -> &Foo {
              ...
          }
      
      This should be changed to:
      
          unsafe fn get_foo_out_of_thin_air() -> &'static Foo {
              ...
          }
      
      The second pattern that needs to be changed is this:
      
          enum MaybeBorrowed<'a> {
              Borrowed(&'a str),
              Owned(String),
          }
      
          fn foo() -> MaybeBorrowed {
              Owned(format!("hello world"))
          }
      
      Change code like this to:
      
          enum MaybeBorrowed<'a> {
              Borrowed(&'a str),
              Owned(String),
          }
      
          fn foo() -> MaybeBorrowed<'static> {
              Owned(format!("hello world"))
          }
      
      Closes #15552.
      
      [breaking-change]
      6f99a278
  3. 07 4月, 2014 1 次提交
  4. 12 2月, 2014 1 次提交
  5. 27 11月, 2013 1 次提交
  6. 19 5月, 2013 1 次提交
  7. 30 3月, 2013 1 次提交
  8. 27 3月, 2013 1 次提交
  9. 19 3月, 2013 2 次提交
  10. 12 3月, 2013 1 次提交
  11. 08 3月, 2013 1 次提交
  12. 23 2月, 2013 1 次提交
  13. 02 2月, 2013 1 次提交
  14. 11 12月, 2012 1 次提交
  15. 20 9月, 2012 1 次提交
  16. 19 9月, 2012 1 次提交
  17. 22 8月, 2012 1 次提交
  18. 19 7月, 2012 1 次提交
  19. 01 7月, 2012 1 次提交
  20. 06 4月, 2012 1 次提交
  21. 05 4月, 2012 1 次提交
    • N
      wip: refactor repr of regions · c0d61795
      Niko Matsakis 提交于
      - we now distinguish bound/free parameters (see region-param
        test case for why this is necessary)
      - we also track bounds on region variables
      - also, restructure fold_ty() to have multiple variants without
        duplication instead of one overloaded folder.  This also allows
        for using block functions.
      c0d61795