- 04 7月, 2019 13 次提交
-
-
由 Mazdak Farrokhzad 提交于
Fix bucket in CPU usage script r? @alexcrichton
-
由 Mazdak Farrokhzad 提交于
Migrate `compile-pass` annotations to `build-pass` This is a part of #62277. As a first step, the `compile-pass` tests are migrated to `build-pass`. r? @cramertj cc @Centril
-
由 Mazdak Farrokhzad 提交于
When possible without changing semantics, implement Iterator::last in terms of DoubleEndedIterator::next_back for types in liballoc and libcore. Provided that the iterator has finite length and does not trigger user-provided code, this is safe. What follows is a full list of the DoubleEndedIterators in liballoc/libcore and whether this optimization is safe, and if not, why not. src/liballoc/boxed.rs Box: Pass through to avoid defeating optimization of the underlying DoubleIterator implementation. This has no correctness impact. src/liballoc/collections/binary_heap.rs Iter: Pass through to avoid defeating optimizations on slice::Iter IntoIter: Not safe, changes Drop order Drain: Not safe, changes Drop order src/liballoc/collections/btree/map.rs Iter: Safe to call next_back, invokes no user defined code. IterMut: ditto IntoIter: Not safe, changes Drop order Keys: Safe to call next_back, invokes no user defined code. Values: ditto ValuesMut: ditto Range: ditto RangeMut: ditto src/liballoc/collections/btree/set.rs Iter: Safe to call next_back, invokes no user defined code. IntoIter: Not safe, changes Drop order Range: Safe to call next_back, invokes no user defined code. src/liballoc/collections/linked_list.rs Iter: Safe to call next_back, invokes no user defined code. IterMut: ditto IntoIter: Not safe, changes Drop order src/liballoc/collections/vec_deque.rs Iter: Safe to call next_back, invokes no user defined code. IterMut: ditto IntoIter: Not safe, changes Drop order Drain: ditto src/liballoc/string.rs Drain: Safe because return type is a primitive (char) src/liballoc/vec.rs IntoIter: Not safe, changes Drop order Drain: ditto Splice: ditto src/libcore/ascii.rs EscapeDefault: Safe because return type is a primitive (u8) src/libcore/iter/adapters/chain.rs Chain: Not safe, invokes user defined code (Iterator impl) src/libcore/iter/adapters/flatten.rs FlatMap: Not safe, invokes user defined code (Iterator impl) Flatten: ditto FlattenCompat: ditto src/libcore/iter/adapters/mod.rs Rev: Not safe, invokes user defined code (Iterator impl) Copied: ditto Cloned: Not safe, invokes user defined code (Iterator impl and T::clone) Map: Not safe, invokes user defined code (Iterator impl + closure) Filter: ditto FilterMap: ditto Enumerate: Not safe, invokes user defined code (Iterator impl) Skip: ditto Fuse: ditto Inspect: ditto src/libcore/iter/adapters/zip.rs Zip: Not safe, invokes user defined code (Iterator impl) src/libcore/iter/range.rs ops::Range: Not safe, changes Drop order, but ALREADY HAS SPECIALIZATION ops::RangeInclusive: ditto src/libcore/iter/sources.rs Repeat: Not safe, calling last should iloop. Empty: No point, iterator is at most one item long. Once: ditto OnceWith: ditto src/libcore/option.rs Item: No point, iterator is at most one item long. Iter: ditto IterMut: ditto IntoIter: ditto src/libcore/result.rs Iter: No point, iterator is at most one item long IterMut: ditto IntoIter: ditto src/libcore/slice/mod.rs Split: Not safe, invokes user defined closure SplitMut: ditto RSplit: ditto RSplitMut: ditto Windows: Safe, already has specialization Chunks: ditto ChunksMut: ditto ChunksExact: ditto ChunksExactMut: ditto RChunks: ditto RChunksMut: ditto RChunksExact: ditto RChunksExactMut: ditto src/libcore/str/mod.rs Chars: Safe, already has specialization CharIndices: ditto Bytes: ditto Lines: Safe to call next_back, invokes no user defined code. LinesAny: Deprecated Everything that is generic over P: Pattern: Not safe because Pattern invokes user defined code. SplitWhitespace: Safe to call next_back, invokes no user defined code. SplitAsciiWhitespace: ditto This is attempt 2 of #60130. r? @sfackler
-
由 Mazdak Farrokhzad 提交于
refactor check_for_substitution No behavior change, just flatter and simpler code. r? @petrochenkov
-
由 Mazdak Farrokhzad 提交于
miri realloc: do not require giving old size+align
-
由 Mazdak Farrokhzad 提交于
Use link attributes on extern "C" blocks with llvm-libuwind When llvm-libunwind feature is enabled, we need to use link attribute on extern "C" blocks to make sure that symbols provided by LLVM's libunwind that's built as part of Rust's libunwind crate are re-exported. This addresses issue #62088.
-
由 Mazdak Farrokhzad 提交于
Clean up inherent_impls Split out from https://github.com/rust-lang/rust/pull/61923. r? @EddyB
-
由 Mazdak Farrokhzad 提交于
syntax: Unsupport `foo! bar { ... }` macros in the parser Their support in expansion was removed in https://github.com/rust-lang/rust/pull/61606. Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly). cc https://github.com/rust-lang-nursery/wg-grammar/issues/51
-
由 Mazdak Farrokhzad 提交于
Update mem::replace example to not be identical to mem::take This also adds assertions that the operations work as expected.
-
由 Mazdak Farrokhzad 提交于
Use mem::take instead of mem::replace with default
-
由 Mazdak Farrokhzad 提交于
wfcheck: resolve the type-vars in `AdtField` types Normalization can leave some type-vars unresolved in its return type. Make sure to resolve them so we have an infcx-independent type that can be used with `needs_drop`. Fixes #61402. Closes #62212 - this PR fixes the root cause.
-
由 Mazdak Farrokhzad 提交于
rename InterpretCx -> InterpCx That's more consistent with InterpResult and InterpError. r? @oli-obk
-
由 Mazdak Farrokhzad 提交于
Remove needless lifetimes (rustc)
-
- 03 7月, 2019 27 次提交
-
-
由 bors 提交于
Rollup of 15 pull requests Successful merges: - #62021 (MSVC link output improve) - #62064 (nth_back for chunks_exact) - #62128 (Adjust warning of -C extra-filename with -o.) - #62161 (Add missing links for TryFrom docs) - #62183 (std: Move a process test out of libstd) - #62186 (Add missing type urls in Into trait) - #62196 (Add Vec::leak) - #62199 (import gdb for explicit access to gdb.current_objfile()) - #62229 (Enable intptrcast for explicit casts) - #62250 (Improve box clone doctests to ensure the documentation is valid) - #62255 (Switch tracking issue for `#![feature(slice_patterns)]`) - #62285 (Fix michaelwoerister's mailmap) - #62304 (HashMap is UnwindSafe) - #62319 (Fix mismatching Kleene operators) - #62327 (Fixed document bug, those replaced each other) Failed merges: r? @ghost
-
由 Mark Rousskov 提交于
-
由 Mark Rousskov 提交于
Fixed document bug, those replaced each other Originally reported by #57686, introduced by #58005
-
由 Mark Rousskov 提交于
Fix mismatching Kleene operators
-
由 Mark Rousskov 提交于
HashMap is UnwindSafe Fixes https://github.com/rust-lang/rust/issues/62301, a regression in 1.36.0-pre which was caused by hashbrown using `NonZero<T>` where the older hashmap used `Unique<T>`.
-
由 Mark Rousskov 提交于
Fix michaelwoerister's mailmap Noticed while going through some changes to thanks. cc @michaelwoerister r? @Centril
-
由 Mark Rousskov 提交于
Switch tracking issue for `#![feature(slice_patterns)]` Switches the tracking issue for `#![feature(slice_patterns)]` to a fresh one in https://github.com/rust-lang/rust/issues/62254 due to new RFCs. Closes https://github.com/rust-lang/rust/issues/23121. r? @varkor
-
由 Mark Rousskov 提交于
Improve box clone doctests to ensure the documentation is valid
-
由 Mark Rousskov 提交于
Enable intptrcast for explicit casts I checked locally that this does not break miri on master. r? @RalfJung
-
由 Mark Rousskov 提交于
import gdb for explicit access to gdb.current_objfile()
-
由 Mark Rousskov 提交于
Add Vec::leak
-
由 Mark Rousskov 提交于
Add missing type urls in Into trait r? @rust-lang/docs
-
由 Mark Rousskov 提交于
std: Move a process test out of libstd This commit moves a test out of libstd which is causing deadlocks on musl on CI. Looks like the recent update in musl versions brings in some internal updates to musl which makes `setgid` and `setuid` invalid to call after a `fork` in a multithreaded program. The issue seen here is that the child thread was attempting to grab a lock held by a nonexistent thread, meaning that the child process simply deadlocked causing the whole test to deadlock. This commit moves the test to its own file with no threads which should work.
-
由 Mark Rousskov 提交于
Add missing links for TryFrom docs r? @rust-lang/docs
-
由 Mark Rousskov 提交于
Adjust warning of -C extra-filename with -o. If `--emit` includes multiple unnamed outputs, and `-o` was specified, and `-C extra-filename` was specified, the compiler would warn that `-C extra-filename` was ignored, but this is not true. The "adapting" of the filenames includes the extra-filename info. Since this is a little convoluted and hard to follow, here is a little chart to summarize when running with `rustc foo.rs -o xyz -C extra-filename=asdf` `--emit` | Result ---------|-------- `link` | `xyz` (extra-filename ignored) `link,dep-info` | `xyzasdf`, `xyzasdf.d` (this PR removes the incorrect warning) As to whether or not this behavior is the best choice is another question.
-
由 Mark Rousskov 提交于
nth_back for chunks_exact wip nth_back for chunks_exact working nth_back for chunks exact Signed-off-by: NwizAmit <amitforfriends_dns@yahoo.com> r? @timvermeulen r? @scottmcm
-
由 Mark Rousskov 提交于
MSVC link output improve Resolves #35785. However i haven't come up with a idea to add test case for this :( r? @retep998
-
由 bors 提交于
rustc: use a separate copy of P for HIR than for AST. Note: this currently includes/is based on top of #61987. Like #61968, but goes one step further and uses a separate `P<...>` for the HIR, with no `Clone`, or the ability to mutate after allocation. There is still `into_inner`/`into_iter`, but they're only exposed for `hir::lowering`, and they would take more work to untangle. r? @petrochenkov cc @rust-lang/compiler
-
由 Jeremy Stucki 提交于
Moved to its own PR
-
由 Jeremy Stucki 提交于
-
由 Jeremy Stucki 提交于
-
由 Jeremy Stucki 提交于
-
由 Jeremy Stucki 提交于
-
由 Jeremy Stucki 提交于
-
由 Jeremy Stucki 提交于
-
由 Jeremy Stucki 提交于
-
由 Jeremy Stucki 提交于
-