1. 15 5月, 2014 21 次提交
  2. 14 5月, 2014 19 次提交
    • J
      Implement set complement and universe for bitflags · 15958855
      J.C. Moyer 提交于
      15958855
    • A
      core: Allow using failure outside of libcore · 949443ef
      Alex Crichton 提交于
      Due to our excellent macro hygiene, this involves having a global path and a
      hidden module in libcore itself.
      949443ef
    • A
      core: Document should_not_exist's existence · 82a8a5eb
      Alex Crichton 提交于
      Explain why it should not exist, and the plan of attack for removing it.
      82a8a5eb
    • A
      core: Add a crate doc block · 57f3b6ee
      Alex Crichton 提交于
      57f3b6ee
    • A
      core: Inherit the atomics module · 325cc515
      Alex Crichton 提交于
      325cc515
    • M
      fdb30cd2
    • L
    • L
      Get rid of the android-cross-path flag to rustc. · d0d800f1
      Luqman Aden 提交于
      There's no need to include this specific flag just for android. We can
      already deal with what it tries to solve by using -C linker=/path/to/cc
      and -C ar=/path/to/ar. The Makefiles for rustc already set this up when
      we're crosscompiling.
      
      I did add the flag to compiletest though so it can find gdb. Though, I'm
      pretty sure we don't run debuginfo tests on android anyways right now.
      
      [breaking-change]
      d0d800f1
    • K
      io: Add .read_at_least() to Reader · 972f2e58
      Kevin Ballard 提交于
      Reader.read_at_least() ensures that at least a given number of bytes
      have been read. The most common use-case for this is ensuring at least 1
      byte has been read. If the reader returns 0 enough times in a row, a new
      error kind NoProgress will be returned instead of looping infinitely.
      
      This change is necessary in order to properly support Readers that
      repeatedly return 0, either because they're broken, or because they're
      attempting to do a non-blocking read on some resource that never becomes
      available.
      
      Also add .push() and .push_at_least() methods. push() is like read() but
      the results are appended to the passed Vec.
      
      Remove Reader.fill() and Reader.push_exact() as they end up being thin
      wrappers around read_at_least() and push_at_least().
      
      [breaking-change]
      972f2e58
    • A
      io: Implement process wait timeouts · f09592a5
      Alex Crichton 提交于
      This implements set_timeout() for std::io::Process which will affect wait()
      operations on the process. This follows the same pattern as the rest of the
      timeouts emerging in std::io::net.
      
      The implementation was super easy for everything except libnative on unix
      (backwards from usual!), which required a good bit of signal handling. There's a
      doc comment explaining the strategy in libnative. Internally, this also required
      refactoring the "helper thread" implementation used by libnative to allow for an
      extra helper thread (not just the timer).
      
      This is a breaking change in terms of the io::Process API. It is now possible
      for wait() to fail, and subsequently wait_with_output(). These two functions now
      return IoResult<T> due to the fact that they can time out.
      
      Additionally, the wait_with_output() function has moved from taking `&mut self`
      to taking `self`. If a timeout occurs while waiting with output, the semantics
      are undesirable in almost all cases if attempting to re-wait on the process.
      Equivalent functionality can still be achieved by dealing with the output
      handles manually.
      
      [breaking-change]
      
      cc #13523
      f09592a5
    • K
      rustllvm: Add LLVMRustArrayType · 9f7caed2
      klutzy 提交于
      LLVM internally uses `uint64_t` for array size, but the corresponding
      C API (`LLVMArrayType`) uses `unsigned int` so ths value is truncated.
      Therefore rustc generates wrong type for fixed-sized large vector e.g.
      `[0 x i8]` for `[0u8, ..(1 << 32)]`.
      
      This patch adds `LLVMRustArrayType` function for `uint64_t` support.
      9f7caed2
    • A
      syntax: Improve --pretty normal slightly · 6878039c
      Alex Crichton 提交于
      When printing doc comments, always put a newline after them in a macro
      invocation to ensure that a line-doc-comment doesn't consume remaining tokens on
      the line.
      6878039c
    • A
      syntax: Preserve attributes in #[deriving] · 25ac81eb
      Alex Crichton 提交于
      Now that the #[deriving] attribute is removed, the raw_pointers_deriving lint
      was broken. This commit restores the lint by preserving lint attributes
      across #[deriving] to the implementations and using #[automatically_derived] as
      the trigger for activating the lint.
      25ac81eb
    • A
      f912005e
    • A
      syntax: Print suffixed token literals correctly · d92b9ae7
      Alex Crichton 提交于
      Previously, literals "1i" were printed as "1". This fixes the
      numeric-method-autoexport test for pretty printing.
      d92b9ae7
    • A
      test: Ignore a pretty expanded failing test · 1581fb8d
      Alex Crichton 提交于
      When expanding, an extra unsafe block is generated which is currently not
      handled well.
      1581fb8d
    • A
      test: Fix a pretty printing test · 560def15
      Alex Crichton 提交于
      The pretty printer handles inlines comments quite badly
      560def15
    • A
      syntax: Fix parsing << with closure types · ac1a2704
      Alex Crichton 提交于
      This uses the trick of replacing the << token with a < token to parse closure
      types correctly.
      
      Closes #13324
      ac1a2704
    • A
      syntax: Fix printing INT64_MIN · 042c8ae4
      Alex Crichton 提交于
      Integers are always parsed as a u64 in libsyntax, but they're stored as i64. The
      parser and pretty printer both printed an i64 instead of u64, sometimes
      introducing an extra negative sign.
      042c8ae4