1. 16 3月, 2015 1 次提交
  2. 15 3月, 2015 21 次提交
  3. 14 3月, 2015 16 次提交
    • B
      check_match: Dereference `ref x` before comparing it and some other type · edbc0e50
      Barosl Lee 提交于
      The arity of `ref x` is always 1, so it needs to be dereferenced before
      being compared with some other type whose arity is not 1.
      
      Fixes #23009.
      edbc0e50
    • B
      9eed8ea6
    • B
      Always evaluate the expression in [expr; n] · 3a8f989d
      Björn Steinbrink 提交于
      In case that there is a destination for the array, like in
      "let x = [expr; n]", we currently don't evaluate the given expression if
      n is zero. That's inconsistent with all other cases, including "[expr;
      0]" without a destination.
      
      Fixes #23354
      3a8f989d
    • R
      Fix a typo in the documentation. · cb02f366
      Ricardo Martins 提交于
      cb02f366
    • B
      Drop support for LLVM < 3.5 and fix compile errors with 3.5 · bb18a3cf
      Björn Steinbrink 提交于
      LLVM older that 3.6 has a bug that cause assertions when compiling certain
      constructs. For 3.5 there's still a chance that the bug might get fixed
      in 3.5.2, so let's keep allowing to compile with it for it for now.
      bb18a3cf
    • S
      Split rustdoc summary lines in a smarter way · b09e5daa
      Simonas Kazlauskas 提交于
      Previously it would fail on a trivial case like
      
          /// Summary line
          /// <trailing space>
          /// Regular content
      
      Compliant markdown preprocessor would render that as two separate paragraphs, but our summary line
      extractor would interpret both lines as the same paragraph and include both into the short summary.
      b09e5daa
    • B
      Auto merge of #23333 - oli-obk:slice_from_raw_parts, r=alexcrichton · 766a4e1a
      bors 提交于
      at least that's what the docs say: http://doc.rust-lang.org/std/slice/fn.from_raw_parts.html
      
      A few situations got prettier. In some situations the mutability of the resulting and source pointers differed (and was cast away by transmute), the mutability matches now.
      766a4e1a
    • R
      Reject `-L ""`, `-L native=`, and other empty search paths. · 85b084f4
      Ryan Prichard 提交于
      It wasn't clear to me that early_error was correct here, but it seems to
      work. This code is reachable from `rustdoc`, which is problematic, because
      early_error panics. rustc handles the panics gracefully (without ICEing or
      crashing), but rustdoc does not. It's not the first such rustdoc problem,
      though:
      
          $ rustdoc hello.rs --extern std=bad-std
          error: extern location for std does not exist: bad-std
          hello.rs:1:1: 1:1 error: can't find crate for `std`
          hello.rs:1
                 ^
          error: aborting due to 2 previous errors
          thread '<unnamed>' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:151
          thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "rustc failed"', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:744
          thread '<main>' panicked at 'child thread None panicked', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thread.rs:661
      85b084f4
    • M
      Revert "Extend dead code lint to detect more unused enum variants" · c908d1c1
      Manish Goregaokar 提交于
      This reverts commit b042ffc4.
      
      Conflicts:
      	src/librustc/middle/pat_util.rs
      c908d1c1
    • M
      Revert "Remove dead code flagged by lint" · 82bcc552
      Manish Goregaokar 提交于
      This reverts commit bce7a6f4.
      82bcc552
    • Y
      Improve camelcase suggestion · 60aa7516
      York Xiang 提交于
      60aa7516
    • B
      Auto merge of #22948 - rprichard:simple-panic-opt, r=alexcrichton · f7453f94
      bors 提交于
      Reduce code size overhead from core::panicking::panic
      
      core::panicking::panic currently creates an Arguments structure using
      format_args!("{}", expr), which formats the expr str using the Display::fmt.
      Display::fmt pulls in Formatter::pad, which then also pulls in string-related
      code for truncation and padding.
      
      If core::panicking::panic instead creates an Arguments structure with a string
      piece, it is possible that the Display::fmt function for str can be optimized
      out of the program.
      
      In my testing with a 32-bit x86 bare metal program, the change tended to save
      between ~100 bytes and ~5500 bytes, depending on what other panic* functions
      the program invokes and whether the panic_fmt lang item uses the Arguments
      value.
      f7453f94
    • R
      Avoid passing -L "" during cross-compilation. · 00211ecf
      Ryan Prichard 提交于
      LLVM_LIBDIR_<triple> is only defined for host triples, not target triples.
      
      FWIW, the same is true for LLVM_STDCPP_RUSTFLAGS_<triple>, where we
      explicitly define it as empty when --enable-llvm-static-stdcpp is not
      specified, but it's still undefined for cross-compiled triples.
      00211ecf
    • B
      Auto merge of #23292 - alexcrichton:stabilize-io, r=aturon · 3e4be02b
      bors 提交于
      The new `std::io` module has had some time to bake now, and this commit
      stabilizes its functionality. There are still portions of the module which
      remain unstable, and below contains a summart of the actions taken.
      
      This commit also deprecates the entire contents of the `old_io` module in a
      blanket fashion. All APIs should now have a reasonable replacement in the
      new I/O modules.
      
      Stable APIs:
      
      * `std::io` (the name)
      * `std::io::prelude` (the name)
      * `Read`
      * `Read::read`
      * `Read::{read_to_end, read_to_string}` after being modified to return a `usize`
        for the number of bytes read.
      * `ReadExt`
      * `Write`
      * `Write::write`
      * `Write::{write_all, write_fmt}`
      * `WriteExt`
      * `BufRead`
      * `BufRead::{fill_buf, consume}`
      * `BufRead::{read_line, read_until}` after being modified to return a `usize`
        for the number of bytes read.
      * `BufReadExt`
      * `BufReader`
      * `BufReader::{new, with_capacity}`
      * `BufReader::{get_ref, get_mut, into_inner}`
      * `{Read,BufRead} for BufReader`
      * `BufWriter`
      * `BufWriter::{new, with_capacity}`
      * `BufWriter::{get_ref, get_mut, into_inner}`
      * `Write for BufWriter`
      * `IntoInnerError`
      * `IntoInnerError::{error, into_inner}`
      * `{Error,Display} for IntoInnerError`
      * `LineWriter`
      * `LineWriter::{new, with_capacity}` - `with_capacity` was added
      * `LineWriter::{get_ref, get_mut, into_inner}` - `get_mut` was added)
      * `Write for LineWriter`
      * `BufStream`
      * `BufStream::{new, with_capacities}`
      * `BufStream::{get_ref, get_mut, into_inner}`
      * `{BufRead,Read,Write} for BufStream`
      * `stdin`
      * `Stdin`
      * `Stdin::lock`
      * `Stdin::read_line` - added method
      * `StdinLock`
      * `Read for Stdin`
      * `{Read,BufRead} for StdinLock`
      * `stdout`
      * `Stdout`
      * `Stdout::lock`
      * `StdoutLock`
      * `Write for Stdout`
      * `Write for StdoutLock`
      * `stderr`
      * `Stderr`
      * `Stderr::lock`
      * `StderrLock`
      * `Write for Stderr`
      * `Write for StderrLock`
      * `io::Result`
      * `io::Error`
      * `io::Error::last_os_error`
      * `{Display, Error} for Error`
      
      Unstable APIs:
      
      (reasons can be found in the commit itself)
      
      * `Write::flush`
      * `Seek`
      * `ErrorKind`
      * `Error::new`
      * `Error::from_os_error`
      * `Error::kind`
      
      Deprecated APIs
      
      * `Error::description` - available via the `Error` trait
      * `Error::detail` - available via the `Display` implementation
      * `thread::Builder::{stdout, stderr}`
      
      Changes in functionality:
      
      * `old_io::stdio::set_stderr` is now a noop as the infrastructure for printing
        backtraces has migrated to `std::io`.
      
      [breaking-change]
      3e4be02b
    • B
      Auto merge of #23337 - Manishearth:rollup, r=Manishearth · 9eb69aba
      bors 提交于
      r? @Manishearth
      9eb69aba
    • A
      Fallout of std::old_io deprecation · 981bf5f6
      Alex Crichton 提交于
      981bf5f6
  4. 13 3月, 2015 2 次提交