- 30 4月, 2015 21 次提交
-
-
由 Alex Crichton 提交于
Since #24783, the style guidelines recommend that unit tests should live in a submodule `tests` rather than `test` to not clash with the possible use of libtest. This is especially important for benchmark tests as they require libtest. Fixes #24923.
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
r? @alexcrichton
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
`call_once` guarantees that there is a happens-before relationship between its closure and code following it via the sequentially consistent atomic store/loads of `self.cnt`.
-
由 Alex Crichton 提交于
This is served by stability markers.
-
由 Alex Crichton 提交于
rename `schedule_drop_{enum,adt}_contents`. addresses review nit from #24765 (it was my mistake for not doing this earlier before it landed).
-
由 Alex Crichton 提交于
This error indicates that a constant references itself. All constants need to resolve to a value in an acyclic manner. For example, neither of the following can be sensibly compiled: ``` const X: u32 = X; ``` ``` const X: u32 = Y; const Y: u32 = X; ```
-
由 Alex Crichton 提交于
These are useful when you want to catch the signals, like when you're making a kernel, or if you just don't want the overhead. (I don't know if there are any of the second kind of people, I don't think it's a good idea, but hey, choice is good).
-
由 Alex Crichton 提交于
Fixes #24872.
-
由 Alex Crichton 提交于
r? @steveklabnik
-
由 Alex Crichton 提交于
Also, remove the other brackets, because they make the whole sentence look awkward.
-
由 Alex Crichton 提交于
The error in the Brief Introduction shows the problematic line as "x.push(4)", while the example code uses a vector of strings.
-
由 Alex Crichton 提交于
Currently, LLVM lowers a cttz8 on x86_64 to these instructions: ```asm movzbl %dil, %eax bsfl %eax, %eax movl $32, %ecx cmovnel %eax, %ecx cmpl $32, %ecx movl $8, %eax cmovnel %ecx, %eax ``` To improve the codegen, we can zero extend the 8 bit integer, then set bit 8 and perform a cttz operation on the extended value. That way there's no conditional operation involved at all. This was discovered by this benchmark: https://github.com/Kimundi/long_strings_without_repeats Timings on my box with the current nightly: ``` running 4 tests test bench_cpp_naive_big ... bench: 5479222 ns/iter (+/- 254222) test bench_noop_big ... bench: 571405 ns/iter (+/- 111950) test bench_rust_naive_big ... bench: 7798102 ns/iter (+/- 148841) test bench_rust_unsafe_big ... bench: 6606488 ns/iter (+/- 67529) ``` Timings with the patch applied: ``` running 4 tests test bench_cpp_naive_big ... bench: 5470944 ns/iter (+/- 7109) test bench_noop_big ... bench: 568944 ns/iter (+/- 6895) test bench_rust_naive_big ... bench: 6795901 ns/iter (+/- 43806) test bench_rust_unsafe_big ... bench: 5584879 ns/iter (+/- 5291) ```
-
由 Alex Crichton 提交于
Closes #24118, implementing RFC 888.
-
由 Alex Crichton 提交于
Closes #20780 r? @michaelwoerister I'm sure this could be done better with deeper knowledge of debuginfo, but this seems like a good start.
-
由 Alex Crichton 提交于
This commit is an implementation of [RFC 1044][rfc] which adds additional surface area to the `std::fs` module. All new APIs are `#[unstable]` behind assorted feature names for each one. [rfc]: https://github.com/rust-lang/rfcs/pull/1044 The new APIs added are: * `fs::canonicalize` - bindings to `realpath` on unix and `GetFinalPathNameByHandle` on windows. * `fs::symlink_metadata` - similar to `lstat` on unix * `fs::FileType` and accessor methods as `is_{file,dir,symlink}` * `fs::Metadata::file_type` - accessor for the raw file type * `fs::DirEntry::metadata` - acquisition of metadata which is free on Windows but requires a syscall on unix. * `fs::DirEntry::file_type` - access the file type which may not require a syscall on most platforms. * `fs::DirEntry::file_name` - access just the file name without leading components. * `fs::PathExt::symlink_metadata` - convenience method for the top-level function. * `fs::PathExt::canonicalize` - convenience method for the top-level function. * `fs::PathExt::read_link` - convenience method for the top-level function. * `fs::PathExt::read_dir` - convenience method for the top-level function. * `std::os::raw` - type definitions for raw OS/C types available on all platforms. * `std::os::$platform` - new modules have been added for all currently supported platforms (e.g. those more specific than just `unix`). * `std::os::$platform::raw` - platform-specific type definitions. These modules are populated with the bare essentials necessary for lowing I/O types into their raw representations, and currently largely consist of the `stat` definition for unix platforms. This commit also deprecates `Metadata::{modified, accessed}` in favor of inspecting the raw representations via the lowering methods of `Metadata`. Closes https://github.com/rust-lang/rust/issues/24796
-
由 Alex Crichton 提交于
-
由 Peter Marheine 提交于
-
- 29 4月, 2015 19 次提交
-
-
由 Björn Steinbrink 提交于
```asm movzbl %dil, %eax bsfl %eax, %eax movl $32, %ecx cmovnel %eax, %ecx cmpl $32, %ecx movl $8, %eax cmovnel %ecx, %eax ``` which has some unnecessary overhead, having two conditional moves. To improve the codegen, we can zero extend the 8 bit integer, then set bit 8 and perform a cttz operation on the extended value. That way there's no conditional operation involved at all.
-
由 bors 提交于
metdata: Fix zero-normalization of the pos of a `MultiByteChar` Fix #24687 The source byte/character mappings for every crate track the collection of multi-characters from its source files specially. When we import the source information for another file into the current compilation unit, we assign its byte-positions unique values by shifting them all by a fixed adjustment, tracked in the `start_pos` field. But when we pull out the source span information for one function from one crate and into our own crate, we need to re-normalize the byte positions: subtracting the old `start_pos` and adding the new `start_pos`. The `new_imported_filemap(..)` method handles adding the new `start_pos`, so all `creader` needs to do is re-normalize each `pos` to zero. It seems like it was indeed trying to do this, but it mistakenly added the old `start_pos` instead of subtracting it.
-
由 Felix S. Klock II 提交于
use visible characters for the multibyte character filler.
-
由 jooert 提交于
Since #24783, the style guidelines recommend that unit tests should live in a submodule `tests` rather than `test` to not clash with the possible use of libtest. This is especially important for benchmark tests as they require libtest. Fixes #24923.
-
由 Felix S. Klock II 提交于
Fix #24687
-
由 bors 提交于
Part of #24407.
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
-