1. 19 12月, 2014 6 次提交
    • J
      Tell expr_use_visitor that user unops are by value · b98c3bd4
      Jorge Aparicio 提交于
      b98c3bd4
    • J
      Tell trans that user unops are by value · 9a962a7b
      Jorge Aparicio 提交于
      9a962a7b
    • J
      Tell typeck that user unops are by value · c5b6d941
      Jorge Aparicio 提交于
      c5b6d941
    • J
      syntax/ast_util: add `is_by_value_unop()` · 7efaf3fa
      Jorge Aparicio 提交于
      7efaf3fa
    • B
      auto merge of #19984 : japaric/rust/macro-expressions, r=alexcrichton · f9a48492
      bors 提交于
      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]
      
      ---
      
      Rebased version of #18958
      r? @alexcrichton 
      cc @pcwalton 
      f9a48492
    • 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
  2. 18 12月, 2014 34 次提交