- 20 8月, 2018 5 次提交
-
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
- 19 8月, 2018 21 次提交
-
-
由 bors 提交于
Implement Unsized Rvalues This PR is the first step to implement RFC1909: unsized rvalues (#48055). ## Implemented - `Sized` is removed for arguments and local bindings. (under `#![feature(unsized_locals)]`) - Unsized locations are allowed in MIR - Unsized places and operands are correctly translated at codegen ## Not implemented in this PR - Additional `Sized` checks: - tuple struct constructor (accidentally compiles now) - closure arguments at closure generation (accidentally compiles now) - upvars (ICEs now) - Generating vtable for `fn method(self)` (ICEs now) - VLAs: `[e; n]` where `n` isn't const - Reduce unnecessary allocations ## Current status - [x] Fix `__rust_probestack` (rust-lang-nursery/compiler-builtins#244) - [x] Get the fix merged - [x] `#![feature(unsized_locals)]` - [x] Give it a tracking issue number - [x] Lift sized checks in typeck and MIR-borrowck - [ ] <del>Forbid `A(unsized-expr)`</del> will be another PR - [x] Minimum working codegen - [x] Add more examples and fill in unimplemented codegen paths - [ ] <del>Loosen object-safety rules (will be another PR)</del> - [ ] <del>Implement `Box<FnOnce>` (will be another PR)</del> - [ ] <del>Reduce temporaries (will be another PR)</del>
-
由 bors 提交于
debug_assert to ensure that from_raw_parts is only used properly aligned This does not help nearly as much as I would hope because everybody uses the distributed libstd which is compiled without debug assertions. For this reason, I am not sure if this is even worth it. OTOH, this would have caught the misalignment fixed by https://github.com/rust-lang/rust/issues/42789 *if* there had been any tests actually using ZSTs with alignment >1 (we have a CI runner which has debug assertions in libstd enabled), and it seems to currently [fail in the rg testsuite](https://ci.appveyor.com/project/rust-lang/rust/build/1.0.8403/job/v7dfdcgn8ay5j6sb). So maybe it is worth it, after all. I have seen the attribute `#[rustc_inherit_overflow_checks]` in some places, does that make it so that the *caller's* debug status is relevant? Is there a similar attribute for `debug_assert!`? That could even subsume `rustc_inherit_overflow_checks`: Something like `rustc_inherit_debug_flag` could affect *all* places that change the generated code depending on whether we are in debug or release mode. In fact, given that we have to keep around the MIR for generic functions anyway, is there ever a reason *not* to handle the debug flag that way? I guess currently we apply debug flags like `cfg` so this is dropped early during the MIR pipeline? EDIT: I learned from @EddyB that because of how `debug_assert!` works, this is not realistic. Well, we could still have it for the rustc CI runs and then maybe, eventually, when libstd gets compiled client-side and there is both a debug and a release build... then this will also benefit users.^^
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
The paragraph described a case where we can't optimize away repetitive dynamic stack allocation. However, as arielb1 pointed out, it can actually optimizable by dynamically delaying the stack unwinding.
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 Masaki Hara 提交于
-
由 bors 提交于
Use the new Entry::or_default method where possible.
-
由 bors 提交于
`Self` in type definitions (self_in_typedefs) This implements the [`self_in_typedefs` feature](https://github.com/rust-lang/rfcs/blob/master/text/2300-self-in-typedefs.md) ([tracking issue 49303](https://github.com/rust-lang/rust/issues/49303)). r? @EddyB CC @Centril
-
由 Alexander Regueiro 提交于
-
由 Alexander Regueiro 提交于
-
由 Alexander Regueiro 提交于
-
由 Alexander Regueiro 提交于
-
由 Alexander Regueiro 提交于
Currently type definitions include `struct`, `enum`, `union`, `existential type`.
-
由 Eduard-Mihai Burtescu 提交于
-
由 bors 提交于
std: stop backtracing when the frames are full This is a defensive measure to mitigate the infinite unwind loop seen in #53372. That case will still repeatedly unwind `__rust_try`, but now it will at least stop when `cx.frames` is full. r? @alexcrichton
-
- 18 8月, 2018 8 次提交
-
-
由 bors 提交于
[NLL] Returns are interesting for free regions Based on #53088 - creating now to get feedback. Closes #51175 * Make assigning to the return type interesting. * Use "returning this value" instead of "return" in error messages. * Prefer one of the explanations that we have a name for to a generic interesting cause in some cases. * Treat causes that involve the destination of a call like assignments.
-
由 bors 提交于
Non-naive implementation of `VecDeque.append` Replaces the old, simple implementation with a more manual (and **unsafe**
😱 ) one. I've added 1 more test and verified that it covers all 6 code paths in the function. This new implementation was about 60% faster than the old naive one when I tried benchmarking it. -
由 bors 提交于
Set more llvm function attributes for __rust_try This shim is generated elsewhere in the compiler so this commit adds support to ensure it goes through similar paths as the rest of the compiler to set llvm function attributes like target features. cc #53372
-
由 bors 提交于
Auto merge of #53369 - pnkfelix:partial-53351-make-some-ported-compile-fail-tests-more-robust-wrt-nll, r=davidtwco Make some ported cfail tests robust w.r.t. NLL Updated the most glaring instances of weak tests w.r.t. NLL that came from #53196. See also the bulletpoint list on #53351.
-
由 bors 提交于
Preliminary work for incremental ThinLTO (CGU name edition) Bring back the first half of #52266 but hopefully without the performance regression.
-
由 bors 提交于
Stabilize `use_extern_macros` Closes https://github.com/rust-lang/rust/issues/35896
-
由 bors 提交于
Rollup of 11 pull requests Successful merges: - #52858 (Implement Iterator::size_hint for Elaborator.) - #53321 (Fix usage of `wasm_target_feature`) - #53326 ([nll] add regression test for issue #27868) - #53347 (rustc_resolve: don't allow paths starting with `::crate`.) - #53349 ([nll] add tests for #48697 and #30104) - #53357 (Pretty print btreemap for GDB) - #53358 (`{to,from}_{ne,le,be}_bytes` for unsigned integer types) - #53406 (Do not suggest conversion method that is already there) - #53407 (make more ported compile fail tests more robust w.r.t. NLL) - #53413 (Warn that `#![feature(rust_2018_preview)]` is implied when the edition is set to Rust 2018.) - #53434 (wasm: Remove --strip-debug argument to LLD) Failed merges: r? @ghost
- 17 8月, 2018 6 次提交
-
-
由 Corey Farwell 提交于
wasm: Remove --strip-debug argument to LLD Originally added in #52887 this commit disables passing `--strip-debug` to LLD when optimized. This bring back the original bug of emitting broken debuginfo but currently it *also* strips the `name` section which makes it very difficult to inspect the final binary. A real fix is happening at https://reviews.llvm.org/D50729 and we can reevaluate once we've updated LLD to have that commit.
-
由 Corey Farwell 提交于
Warn that `#![feature(rust_2018_preview)]` is implied when the edition is set to Rust 2018. cc @varkor @petrochenkov @joshtriplett
-
由 Corey Farwell 提交于
Rollup merge of #53407 - pnkfelix:partial-53351-make-more-ported-compile-fail-tests-more-robust-wrt-nll, r=nikomatsakis make more ported compile fail tests more robust w.r.t. NLL This is similar to PR #53369, except it covers a disjoint (and much smaller) set of tests that I needed to look at more carefully before being 100% certain they were the same kind of issue.
-
由 Corey Farwell 提交于
Do not suggest conversion method that is already there Fix #53348.
-
由 Corey Farwell 提交于
`{to,from}_{ne,le,be}_bytes` for unsigned integer types Same as https://github.com/rust-lang/rust/pull/51919 did for signed integers. Tracking issue: https://github.com/rust-lang/rust/issues/52963
-
由 Corey Farwell 提交于
Pretty print btreemap for GDB Merge #53112 first, please.
-