1. 29 12月, 2013 1 次提交
  2. 12 12月, 2013 1 次提交
  3. 08 12月, 2013 1 次提交
  4. 29 11月, 2013 1 次提交
  5. 27 11月, 2013 1 次提交
  6. 26 11月, 2013 1 次提交
  7. 20 11月, 2013 1 次提交
  8. 01 11月, 2013 1 次提交
    • A
      Implement a concat!() format extension · a49e65c2
      Alex Crichton 提交于
      This extension can be used to concatenate string literals at compile time. C has
      this useful ability when placing string literals lexically next to one another,
      but this needs to be handled at the syntax extension level to recursively expand
      macros.
      
      The major use case for this is something like:
      
          macro_rules! mylog( ($fmt:expr $($arg:tt)*) => {
              error2!(concat!(file!(), ":", line!(), " - ", $fmt) $($arg)*);
          })
      
      Where the mylog macro will automatically prepend the filename/line number to the
      beginning of every log message.
      a49e65c2
  9. 22 10月, 2013 1 次提交
  10. 19 10月, 2013 1 次提交
    • A
      Remove the fmt! syntax extension · 29c58c47
      Alex Crichton 提交于
      It lived a good life, but its time has come. The groundwork is set for the
      official transition after the next snapshot (removal of XXX2 macros)
      29c58c47
  11. 09 10月, 2013 1 次提交
  12. 08 10月, 2013 2 次提交
    • B
      add new enum ast::StrStyle as field to ast::lit_str · 9d7b1300
      Benjamin Herr 提交于
      For the benefit of the pretty printer we want to keep track of how
      string literals in the ast were originally represented in the source
      code.
      
      This commit changes parser functions so they don't extract strings from
      the token stream without at least also returning what style of string
      literal it was. This is stored in the resulting ast node for string
      literals, obviously, for the package id in `extern mod = r"package id"`
      view items, for the inline asm in `asm!()` invocations.
      
      For `asm!()`'s other arguments or for `extern "Rust" fn()` items, I just
      the style of string, because it seemed disproportionally cumbersome to
      thread that information through the string processing that happens with
      those string literals, given the limited advantage raw string literals
      would provide in these positions.
      
      The other syntax extensions don't seem to store passed string literals
      in the ast, so they also discard the style of strings they parse.
      9d7b1300
    • B
      add token::LIT_STR_RAW(ident, num of # symbols) · 97878725
      Benjamin Herr 提交于
      Treat it as a synonym for LIT_STR for now.
      97878725
  13. 01 10月, 2013 2 次提交
  14. 24 9月, 2013 2 次提交
  15. 15 9月, 2013 1 次提交
  16. 12 9月, 2013 1 次提交
    • A
      Implement a format_args!() macro · 9a5f95a8
      Alex Crichton 提交于
      The purpose of this macro is to further reduce the number of allocations which
      occur when dealing with formatting strings. This macro will perform all of the
      static analysis necessary to validate that a format string is safe, and then it
      will wrap up the "format string" into an opaque struct which can then be passed
      around.
      
      Two safe functions are added (write/format) which take this opaque argument
      structure, unwrap it, and then call the unsafe version of write/format (in an
      unsafe block). Other than these two functions, it is not intended for anyone to
      ever look inside this opaque struct.
      
      The macro looks a bit odd, but mostly because of rvalue lifetimes this is the
      only way for it to be safe that I know of.
      
      Example use-cases of this are:
      
      * third-party libraries can use the default formatting syntax without any
        forced allocations
      * the fail!() macro can avoid allocating the format string
      * the logging macros can avoid allocation any strings
      9a5f95a8
  17. 10 9月, 2013 1 次提交
  18. 07 9月, 2013 6 次提交
  19. 03 9月, 2013 1 次提交
  20. 02 9月, 2013 1 次提交
  21. 01 9月, 2013 1 次提交
  22. 28 8月, 2013 1 次提交
  23. 25 8月, 2013 2 次提交
  24. 09 8月, 2013 1 次提交
    • S
      env! syntax extension changes · c3825c83
      Steven Fackler 提交于
      env! aborts compilation of the specified environment variable is not
      defined and takes an optional second argument containing a custom
      error message. option_env! creates an Option<&'static str> containing
      the value of the environment variable.
      
      There are no run-pass tests that check the behavior when the environment
      variable is defined since the test framework doesn't support setting
      environment variables at compile time as opposed to runtime. However,
      both env! and option_env! are used inside of rustc itself, which should
      act as a sufficient test.
      
      Close #2248
      c3825c83
  25. 08 8月, 2013 1 次提交
  26. 07 8月, 2013 2 次提交
  27. 06 8月, 2013 1 次提交
    • M
      Updated std::Option, std::Either and std::Result · 0ac7a219
      Marvin Löbel 提交于
      - Made naming schemes consistent between Option, Result and Either
      - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None)
      - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
      0ac7a219
  28. 02 8月, 2013 1 次提交
    • B
      Remove the pipes compiler · 4b3e766a
      Brian Anderson 提交于
      The pipes compiler produced data types that encoded efficient and safe
      bounded message passing protocols between two endpoints. It was also
      capable of producing unbounded protocols.
      
      It was useful research but was arguably done before its proper time.
      
      I am removing it for the following reasons:
      
      * In practice we used it only for producing the `oneshot` and `stream`
        unbounded protocols and all communication in Rust use those.
      * The interface between the proto! macro and the standard library
        has a large surface area and was difficult to maintain through
        language and library changes.
      * It is now written in an old dialect of Rust and generates code
        which would likely be considered non-idiomatic.
      * Both the compiler and the runtime are difficult to understand,
        and likewise the relationship between the generated code and
        the library is hard to understand. Debugging is difficult.
      * The new scheduler implements `stream` and `oneshot` by hand
        in a way that will be significantly easier to maintain.
      
      This shouldn't be taken as an indication that 'channel protocols'
      for Rust are not worth pursuing again in the future.
      4b3e766a
  29. 01 8月, 2013 1 次提交
  30. 29 7月, 2013 1 次提交