- 26 10月, 2019 14 次提交
-
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 bors 提交于
rustc_mir: double-check const-promotion candidates for sanity. Previously, const promotion involved tracking information about the value in a MIR local (or any part of the computation leading up to that value), aka "qualifs", in a quite stateful manner, which is hard to extend to arbitrary CFGs without a dataflow pass. However, the nature of the promotion we do is that it's effectively an SSA-like "tree" (or DAG, really), of assigned-once locals - which is how we can take them from the original MIR in the first place. This structure means that the subset of the MIR responsible for computing any given part of a const-promoted value is readily analyzable by walking that tree/DAG. This PR implements such an analysis in `promote_consts`, reusing the `HasMutInterior` / `NeedsDrop` computation from `qualify_consts`, but reimplementing the equivalent of `IsNotPromotable` / `IsNotImplicitlyPromotable`. Eventually we should be able to remove `IsNotPromotable` / `IsNotImplicitlyPromotable` from `qualify_consts`, which will simplify @ecstatic-morse's dataflow-based const-checking efforts. But currently this is mainly for a crater check-only run - it will compare the results from the old promotion collection and the new promotion validation and ICE if they don't match. r? @oli-obk
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #65705 (Add {String,Vec}::into_raw_parts) - #65749 (Insurance policy in case `iter.size_hint()` lies.) - #65799 (Fill tracking issue number for `array_value_iter`) - #65800 (self-profiling: Update measureme to 0.4.0 and remove non-RAII methods from profiler.) - #65806 (Add [T]::as_ptr_range() and [T]::as_mut_ptr_range().) - #65810 (SGX: Clear additional flag on enclave entry) Failed merges: r? @ghost
-
由 Yuki Okushi 提交于
SGX: Clear additional flag on enclave entry An attacker could set both the AC flag in CR0 as in rflags. This causes the enclave to perform an AEX upon a misaligned memory access, and an attacker learns some information about the internal enclave state. The AC flag in rflags is copied from userspace upon an enclave entry. Upon AEX it is copied and later restored. This patch forces the rflag.AC bit to be reset right after an enter.
-
由 Yuki Okushi 提交于
Add [T]::as_ptr_range() and [T]::as_mut_ptr_range(). Implementation of https://github.com/rust-lang/rfcs/pull/2791
-
由 Yuki Okushi 提交于
self-profiling: Update measureme to 0.4.0 and remove non-RAII methods from profiler. This PR removes all non-RAII based profiling methods from `SelfProfilerRef`
🎉 It also delegates the `TimingGuard` implementation to `measureme`, now that that is available there. r? @wesleywiser -
由 Yuki Okushi 提交于
Fill tracking issue number for `array_value_iter` Thanks for [noticing](https://github.com/rust-lang/rust/pull/62959#discussion_r338930448)! r? @Centril
-
由 Yuki Okushi 提交于
Insurance policy in case `iter.size_hint()` lies. Follow up to https://github.com/rust-lang/rust/pull/64949/files#r334235076. (If the perf impact is bad we can use `debug_assert!` instead.) The good news is that the UI tests pass locally so `iter.size_hint()` seems to be honest *thus far*. On the other hand, with the status quo we do not have an insurance policy should that change in some case. This is problematic because a) this could possibly make some program be accepted which shouldn't, b) the compiler itself could have memory unsafety if the correctness of the iterator is assumed in `unsafe { ... }` code (even though the blame lies with the `unsafe { ... }` block in question.) r? @RalfJung cc @nnethercote
-
由 Yuki Okushi 提交于
Add {String,Vec}::into_raw_parts Aspects to address: - [x] Create a tracking issue - #65816
-
由 Mara Bos 提交于
-
- 25 10月, 2019 26 次提交
-
-
由 Mazdak Farrokhzad 提交于
lies, underreporting the number of elements.
-
由 Jake Goulding 提交于
-
由 Jake Goulding 提交于
-
由 Jake Goulding 提交于
-
由 Raoul Strackx 提交于
-
由 Mara Bos 提交于
-
由 Raoul Strackx 提交于
-
由 Raoul Strackx 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
See https://github.com/rust-lang/rfcs/pull/2791 for motivation.
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #64639 (Stabilize `#[non_exhaustive]` (RFC 2008)) - #65074 (Fix the start/end byte positions in the compiler JSON output) - #65315 (Intern place projection) - #65685 (Fix check of `statx` and handle EPERM) - #65731 (Prevent unnecessary allocation in PathBuf::set_extension.) - #65740 (Fix default "disable-shortcuts" feature value) - #65787 (move panictry! to where it is used.) - #65789 (move Attribute::with_desugared_doc to librustdoc) - #65790 (move report_invalid_macro_expansion_item to item.rs) Failed merges: r? @ghost
-
由 Mazdak Farrokhzad 提交于
move report_invalid_macro_expansion_item to item.rs From https://github.com/rust-lang/rust/pull/65324. r? @Mark-Simulacrum
-
由 Mazdak Farrokhzad 提交于
move Attribute::with_desugared_doc to librustdoc From https://github.com/rust-lang/rust/pull/65324. r? @varkor
-
由 Mazdak Farrokhzad 提交于
move panictry! to where it is used. From https://github.com/rust-lang/rust/pull/65324 r? @davidtwco
-
由 Mazdak Farrokhzad 提交于
Fix default "disable-shortcuts" feature value Follow-up of https://github.com/rust-lang/rust/pull/65656 It fixes the bad handling of the default value of the feature (which would disable shortcut by default, which is bad!). r? @Dylan-DPC cc @kinnison
-
由 Mazdak Farrokhzad 提交于
Prevent unnecessary allocation in PathBuf::set_extension. It was allocating a new `OsString` that was immediately dropped after using it with `set_file_name`. Now it directly changes the extension in the original buffer, without touching the rest of the file name or allocating a temporary string.
-
由 Mazdak Farrokhzad 提交于
Fix check of `statx` and handle EPERM Should fix #65662 https://github.com/rust-lang/rust/issues/65662#issuecomment-544593939 > I think a reasonable solution might be to do something like try to stat AT_CWD initially and if that fails with EPERM or ENOSYS we disable the syscall entirely, otherwise it's cached as always good to use. r? @alexcrichton
-
由 Mazdak Farrokhzad 提交于
Intern place projection This should sit on top of https://github.com/rust-lang/rust/pull/65197. After that one merged, I'm gonna rebase on top of it. The important commits are the last three and there's a bunch of code repetition that I'm going to remove but for that I need to refactor some things that probably need to be added before this PR. Anyway this work helps as is because we can run perf tests :). r? @oli-obk /cc @nikomatsakis
-
由 Mazdak Farrokhzad 提交于
Fix the start/end byte positions in the compiler JSON output Track the changes made during normalization in the `SourceFile` and use this information to correct the `start_byte` and `end_byte` fields in the JSON output. This should ensure the start/end byte fields can be used to index the original file, even if Rust normalized the source code for parsing purposes. Both CRLF to LF and BOM removal are handled with this one. The rough plan was discussed with @matklad in rust-lang-nursery/rustfix#176 - although I ended up going with `u32` offset tracking so I wouldn't need to deal with `u32 + i32` arithmetics when applying the offset to the span byte positions. Fixes #65029
-
由 Mazdak Farrokhzad 提交于
Stabilize `#[non_exhaustive]` (RFC 2008) Fixes #44109. This pull request stabilizes the `#[non_exhaustive]` attribute, which is used to indicate that a type will have more fields / variants added in the future. It can be applied to `struct`s, `enum`s and `enum` variants. See https://github.com/rust-lang/rust/issues/44109#issuecomment-533356866 for the stabilization report. r? @Centril
-
由 Lukas Kalbertodt 提交于
-
由 Michael Woerister 提交于
-
由 Mazdak Farrokhzad 提交于
Co-Authored-By: NDavid Wood <Q0KPU0H1YOEPHRY1R2SN5B5RL@david.davidtw.co>
-
由 David Wood 提交于
This commit stabilizes RFC 2008 (#44109) by removing the feature gate. Signed-off-by: NDavid Wood <david@davidtw.co>
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #62959 (Add by-value iterator for arrays ) - #65390 (Add long error explanation for E0576) - #65408 (reorder config.toml.example options and add one missing option) - #65414 (ignore uninhabited non-exhaustive variant fields) - #65666 (Deprecated proc_macro doesn't trigger warning on build library) - #65742 (Pre-expansion gate most of the things) - #65747 (Adjust the tracking issue for `untagged_unions`.) - #65763 (Changed APIT with explicit generic args span to specific arg spans) - #65775 (Fix more `ReEmpty` ICEs) Failed merges: - #65519 (trait-based structural match implementation) r? @ghost
-