- 12 12月, 2014 4 次提交
-
-
由 Kang Seonghoon 提交于
Fixes #19719.
-
由 bors 提交于
These snapshots were generated on the 10.7 bot which should be the first step in fixing #19643
-
由 Alex Crichton 提交于
-
由 bors 提交于
-
- 11 12月, 2014 4 次提交
-
-
由 bors 提交于
This detects (a subset of) the cases when `transmute::<T, U>(x)` can be lowered to a direct `bitcast T x to U` in LLVM. This assists with efficiently handling a SIMD vector as multiple different types, e.g. swapping bytes/words/double words around inside some larger vector type. C compilers like GCC and Clang handle integer vector types as `__m128i` for all widths, and implicitly insert bitcasts as required. This patch allows Rust to express this, even if it takes a bit of `unsafe`, whereas previously it was impossible to do at all without inline assembly. Example: pub fn reverse_u32s(u: u64x2) -> u64x2 { unsafe { let tmp = mem::transmute::<_, u32x4>(u); let swapped = u32x4(tmp.3, tmp.2, tmp.1, tmp.0); mem::transmute::<_, u64x2>(swapped) } } Compiling with `--opt-level=3` gives: Before define <2 x i64> @_ZN12reverse_u32s20hbdb206aba18a03d8tbaE(<2 x i64>) unnamed_addr #0 { entry-block: %1 = bitcast <2 x i64> %0 to i128 %u.0.extract.trunc = trunc i128 %1 to i32 %u.4.extract.shift = lshr i128 %1, 32 %u.4.extract.trunc = trunc i128 %u.4.extract.shift to i32 %u.8.extract.shift = lshr i128 %1, 64 %u.8.extract.trunc = trunc i128 %u.8.extract.shift to i32 %u.12.extract.shift = lshr i128 %1, 96 %u.12.extract.trunc = trunc i128 %u.12.extract.shift to i32 %2 = insertelement <4 x i32> undef, i32 %u.12.extract.trunc, i64 0 %3 = insertelement <4 x i32> %2, i32 %u.8.extract.trunc, i64 1 %4 = insertelement <4 x i32> %3, i32 %u.4.extract.trunc, i64 2 %5 = insertelement <4 x i32> %4, i32 %u.0.extract.trunc, i64 3 %6 = bitcast <4 x i32> %5 to <2 x i64> ret <2 x i64> %6 } _ZN12reverse_u32s20hbdb206aba18a03d8tbaE: .cfi_startproc movd %xmm0, %rax punpckhqdq %xmm0, %xmm0 movd %xmm0, %rcx movq %rcx, %rdx shrq $32, %rdx movq %rax, %rsi shrq $32, %rsi movd %eax, %xmm0 movd %ecx, %xmm1 punpckldq %xmm0, %xmm1 movd %esi, %xmm2 movd %edx, %xmm0 punpckldq %xmm2, %xmm0 punpckldq %xmm1, %xmm0 retq After define <2 x i64> @_ZN12reverse_u32s20hbdb206aba18a03d8tbaE(<2 x i64>) unnamed_addr #0 { entry-block: %1 = bitcast <2 x i64> %0 to <4 x i32> %2 = shufflevector <4 x i32> %1, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0> %3 = bitcast <4 x i32> %2 to <2 x i64> ret <2 x i64> %3 } _ZN12reverse_u32s20hbdb206aba18a03d8tbaE: .cfi_startproc pshufd $27, %xmm0, %xmm0 retq
-
由 bors 提交于
-
由 Brian Anderson 提交于
-
由 Alex Crichton 提交于
Move a few docblocks from 'ignore' to something that's not rust (e.g. 'text'). Closes #19678
-
- 10 12月, 2014 32 次提交
-
-
由 bors 提交于
- Introduce a named type for the return type of `VecMap::move_iter` - Rename all type parameters to `V` for "Value". - Remove unnecessary call to an `Option::unwrap`, use pattern matching instead. - Remove incorrect `Hash` implementation which took the `VecMap`'s capacity into account. This is a [breaking-change], however whoever used the `Hash` implementation relied on an incorrect implementation.
-
由 bors 提交于
@steveklabnik I got a start on this.
-
由 bors 提交于
When a type error occurs, `check_method_argument_types()` tries to provide arguments filled with `ty::mk_err()`. However, if a function takes the parameters as a tuple, the arguments should be converted to a tuple before passing it to `check_argument_types()`. Fixes #19521.
-
由 bors 提交于
-
由 bors 提交于
-
由 Barosl Lee 提交于
When a type error occurs, check_method_argument_types() tries to provide arguments filled with ty::mk_err(). However, if a function takes the parameters as a tuple, the arguments should be converted to a tuple before being passed to check_argument_types(). Fixes #19521.
-
由 bors 提交于
- Remove the `for Sized?` bound on `core::ops::FnOnce`, as it takes `self` by value and can never be implemented by an unsized type. - Add a missing `Sized?` bound to the blanket `core::ops::FnMut` impl, as both `Fn` and `FnMut` are `for Sized?`.
-
由 bors 提交于
One of the causes of #19501 was that the metadata on OSX was getting corrupted. For any one particular invocation of the compiler the metadata file inside of an rlib archive would have extra bytes appended to the end of it. These extra bytes end up confusing rbml and have it run off the end of the array (resulting in the out of bounds detected). This commit prepends the length of metadata to the start of the metadata to ensure that we always slice the precise amount that we want, and it also un-ignores the test from #19502. Closes #19501
-
由 bors 提交于
-
由 Tobias Bucher 提交于
Also re-add the previously deleted test with an additional test that would have failed before, when the hash function depended on the capacity.
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
Brief note: This does *not* affect anything in the prelude Part of #19253 All this does is remove the reexporting of Result and Option from their respective modules. More core reexports might be removed, but these ones are the safest to remove since these enums (and their variants) are included in the prelude. Depends on https://github.com/rust-lang/rust/pull/19407 which is merged, but might need a new snapshot [breaking-change]
-
由 Alex Crichton 提交于
This was discussed in [#rust-internals]( https://botbot.me/mozilla/rust-internals/2014-12-08/?msg=27077624&page=5). It's a small change.
-
由 Alex Crichton 提交于
Strings iterate to both char and &str, so it is natural it can also be extended or collected from an iterator of &str. Apart from the trait implementations, `Extend<char>` is updated to use the iterator size hint, and the test added tests both the char and the &str versions of Extend and FromIterator.
-
由 Alex Crichton 提交于
Docs said from_utf8 accepts a vector when it actually accepts an array of bytes.
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
Closes #19556.
-
由 Alex Crichton 提交于
Fixes #19595.
-
由 Alex Crichton 提交于
Fixes #19599
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
- Support gcc-less installation on Windows. To do so in unattended mode run:`<intaller>.exe /TYPE=compact /SILENT`. - Do not require admin privileges to install. cc #19519
-
由 Alex Crichton 提交于
cc #18755 r? @alexcrichton cc @bjz
-
由 Alex Crichton 提交于
It is useful to have configurable newlines in base64 as the standard leaves that for the implementation to decide. GNU `base64` apparently uses LF, which meant in `uutils` we had to manually convert the CRLF to LF. This made the program very slow for large inputs. [breaking-change]
-
由 Alex Crichton 提交于
I'm interested in including doctests for `BTreeMap`'s `iter_mut` and `into_iter` methods in this PR as well, but I am not sure of the best way to demonstrate/test what they do for the doctests.
-
由 Alex Crichton 提交于
This means that `Fn(&A) -> (&B, &C)` is equivalent to `for<'a> Fn(&'a A) -> (&'a B, &'a C)` similar to the lifetime elision of lower-case `fn` in types and declarations. Closes #18992.
-
由 Alex Crichton 提交于
Reported as a part of rust-lang/rust#19120 The logic of rust-lang/rust@74fb798a200dc82cf5b4a18065e3ea565229adc3 was flawed because when a CI tool run the test parallely with other tasks, they all belong to a single session family and the test may pick up irrelevant zombie processes before they are reaped by the CI tool depending on timing.
-
由 Alex Crichton 提交于
detect UFCS drop and allow UFCS methods to have explicit type parameters. Work towards #18875. Since code could previously call the methods & implement the traits manually, this is a [breaking-change] Closes #19586. Closes #19375.
-
由 Alex Crichton 提交于
@steveklabnik r?
-
由 Alex Crichton 提交于
Substitutes 'lifetime' for 'liftime' in a few places. Apologies if this has already been noticed/PRQed! I did try to do due diligence, though
😀 -
由 Alex Crichton 提交于
Fixes #19575.
-
由 Alex Crichton 提交于
pthread_key_create can be 0. addresses issue #19567.
-