1. 21 9月, 2018 1 次提交
  2. 01 11月, 2016 1 次提交
    • I
      Changed most vec! invocations to use square braces · e593c3b8
      iirelu 提交于
      Most of the Rust community agrees that the vec! macro is clearer when
      called using square brackets [] instead of regular brackets (). Most of
      these ocurrences are from before macros allowed using different types of
      brackets.
      
      There is one left unchanged in a pretty-print test, as the pretty
      printer still wants it to have regular brackets.
      e593c3b8
  3. 13 6月, 2015 1 次提交
  4. 07 1月, 2015 1 次提交
  5. 06 1月, 2015 2 次提交
    • K
      Un-gate macro_rules · c2e26972
      Keegan McAllister 提交于
      c2e26972
    • K
      Modernize macro_rules! invocations · 416137eb
      Keegan McAllister 提交于
      macro_rules! is like an item that defines a macro.  Other items don't have a
      trailing semicolon, or use a paren-delimited body.
      
      If there's an argument for matching the invocation syntax, e.g. parentheses for
      an expr macro, then I think that applies more strongly to the *inner*
      delimiters on the LHS, wrapping the individual argument patterns.
      416137eb
  6. 19 12月, 2014 1 次提交
    • 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
  7. 17 11月, 2014 1 次提交
    • S
      Switch to purely namespaced enums · 3dcd2157
      Steven Fackler 提交于
      This breaks code that referred to variant names in the same namespace as
      their enum. Reexport the variants in the old location or alter code to
      refer to the new locations:
      
      ```
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = A;
      }
      ```
      =>
      ```
      pub use self::Foo::{A, B};
      
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = A;
      }
      ```
      or
      ```
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = Foo::A;
      }
      ```
      
      [breaking-change]
      3dcd2157
  8. 28 5月, 2014 1 次提交
  9. 25 5月, 2014 1 次提交
  10. 15 5月, 2014 1 次提交
  11. 19 4月, 2014 1 次提交
  12. 14 4月, 2014 1 次提交
  13. 21 3月, 2014 3 次提交
  14. 07 10月, 2013 1 次提交
  15. 17 8月, 2013 1 次提交
  16. 02 2月, 2013 1 次提交
  17. 19 12月, 2012 1 次提交
  18. 11 12月, 2012 1 次提交
  19. 31 10月, 2012 1 次提交
  20. 24 8月, 2012 3 次提交
  21. 11 8月, 2012 2 次提交