- 22 10月, 2019 5 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
This prepares the code base for when projection is interned. Place's projection field is going to be `&List<PlaceElem<'tcx>>` so we won't be able to pattern match against it.
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
- 21 10月, 2019 34 次提交
-
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #65544 (Added doc on keyword break) - #65620 (Correctly note code as Ok not error for E0573) - #65624 ([mir-opt] Improve SimplifyLocals pass so it can remove unused consts) - #65650 (use unwrap_or in lint code) - #65652 (Fix `canonicalize_const_var` leaking inference variables) Failed merges: r? @ghost
-
由 Yuki Okushi 提交于
Fix `canonicalize_const_var` leaking inference variables Fixes #61338 Fixes #61516 Fixes #62536 Fixes #64087 Fixes #64863 Fixes #65623 I added regression tests for all these issues apart from #64863, which is very similar to #61338. r? @varkor
-
由 Yuki Okushi 提交于
use unwrap_or in lint code
-
由 Yuki Okushi 提交于
[mir-opt] Improve SimplifyLocals pass so it can remove unused consts The `ConstProp` can cause many locals to be initialized to a constant value and then never read from. `ConstProp` can also evaluate ZSTs into constant values. Previously, many of these would be removed by other parts of the MIR optimization pipeline. However, evaluating ZSTs (especially `()`) into constant values defeated those parts of the optimizer and so in a2e3ed5c, I added a hack to `ConstProp` that skips evaluating ZSTs to avoid that regression. This commit changes `SimplifyLocals` so that it doesn't consider writes of const values to a local to be a use of that local. In doing so, `SimplifyLocals` is able to remove otherwise unused locals left behind by other optimization passes (`ConstProp` in particular). r? @oli-obk
-
由 Yuki Okushi 提交于
Correctly note code as Ok not error for E0573 Hi, this is my first pull request to the Rust project. The fix is very small one just to fix an oversight in a comment. Namely, [this documentation PR](https://github.com/rust-lang/rust/pull/65234) added a longer explanation for E0573. It illustrated the error using erroneous/corrected contrasting examples. But it accidentally forgot to remove `// error` from the corrected example. Sadly, I found the error after the PR got merged. [As suggested by the original author](https://github.com/rust-lang/rust/pull/65234/files#r336518549) of the PR, I created an PR to fix this. Part of #61137.
-
由 Yuki Okushi 提交于
Added doc on keyword break RE: #34601
-
由 bors 提交于
bump miri Fixes https://github.com/rust-lang/rust/issues/65529
-
由 ben 提交于
it's type.
-
由 Guanqun Lu 提交于
-
由 bors 提交于
Check all files in `src/test` for `borrowck_graphviz_postflow` This attribute causes DOT files to be generated in the top-level directory. It is intended to be used only temporarily and should never appear on master. This also tells git to ignore DOT files in the root or the `mir_dump` directory, which `-Z dump-mir` uses by default. This will prevent #65071 from occurring again. It needs to be merged after #65629, otherwise `tidy` will start failing. r? @Mark-Simulacrum
-
由 Wesley Wiser 提交于
The `ConstProp` can cause many locals to be initialized to a constant value and then never read from. `ConstProp` can also evaluate ZSTs into constant values. Previously, many of these would be removed by other parts of the MIR optimization pipeline. However, evaluating ZSTs (especially `()`) into constant values defeated those parts of the optimizer and so in a2e3ed5c, I added a hack to `ConstProp` that skips evaluating ZSTs to avoid that regression. This commit changes `SimplifyLocals` so that it doesn't consider writes of const values to a local to be a use of that local. In doing so, `SimplifyLocals` is able to remove otherwise unused locals left behind by other optimization passes (`ConstProp` in particular).
-
由 Wesley Wiser 提交于
-
由 Ryo Onodera 提交于
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #65314 (rustdoc: forward -Z options to rustc) - #65592 (clarify const_prop ICE protection comment) - #65603 (Avoid ICE when include! is used by stdin crate) - #65614 (Improve error message for APIT with explicit generic arguments) - #65629 (Remove `borrowck_graphviz_postflow` from test) - #65633 (Remove leading :: from paths in doc examples) - #65638 (Rename the default argument 'def' to 'default') - #65639 (Fix parameter name in documentation) Failed merges: r? @ghost
-
由 Mazdak Farrokhzad 提交于
Fix parameter name in documentation
-
由 Mazdak Farrokhzad 提交于
Rename the default argument 'def' to 'default' Fixes: #65492
-
由 Mazdak Farrokhzad 提交于
Remove leading :: from paths in doc examples Noted some pre-2018 path syntax in the doc examples, for example: https://doc.rust-lang.org/std/process/fn.exit.html ```rust fn main() { ::std::process::exit(match run_app() { Ok(_) => 0, ... ``` Couldn't find an existing issue on this (then again, "::" makes for an annoying thing to search for) so if there is already something fixing this and/or there's a reason to not fix it, just close this PR. (Also fixed indentation in the `process::exit()` docs)
-
由 Mazdak Farrokhzad 提交于
Remove `borrowck_graphviz_postflow` from test Resolves #65071 (again). Sorry. I've added a commit hook to prevent this from happening in the future. r? @petrochenkov
-
由 Mazdak Farrokhzad 提交于
Improve error message for APIT with explicit generic arguments This is disallowed with type or const generics. cc https://github.com/rust-lang/rust/issues/61410.
-
由 Mazdak Farrokhzad 提交于
Avoid ICE when include! is used by stdin crate This should hopefully also eliminate the ICE when using `include_bytes!`, `include_str!` and `#[doc(include = "...")]` with a stdio input. I couldn't see a clear way to write a compile-fail test using compiletest with a stdio input, so I haven't written any tests for this change. Fixes #63900
-
由 Mazdak Farrokhzad 提交于
clarify const_prop ICE protection comment This is based on discussion at https://github.com/rust-lang/rust/pull/64890/files#r334555787. That said, why are function arguments the only unsized locals that could remain uninitialized? Couldn't we also fail to initialize some local but still go on with const_prop, and then hit a line that takes a reference to that? Cc @wesleywiser @oli-obk ; I don't know enough about const-prop to understand why this can happen only for function arguments. ~~The PR includes https://github.com/rust-lang/rust/pull/64890; the only new commit is 05e4e6ba0d5.~~
-
由 Mazdak Farrokhzad 提交于
rustdoc: forward -Z options to rustc Currently rustdoc does not forward `-Z` options to rustc when building test executables. This makes impossible to use rustdoc to run test samples when crate under test is instrumented with one of sanitizers `-Zsanitizer=...`, since the final linking step will not include sanitizer runtime library. Forward `-Z` options to rustc to solve the issue. Helps with #43031.
-
由 Adrian Heine né Lang 提交于
-
由 David Sinclair 提交于
Fixes: #65492
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #65460 (Clean up `contains()` `insert()` chains on HashSet) - #65463 (Avoid unnecessary arena allocations in `expand_pattern()`.) - #65579 (Changed `resolve_type_vars_with_obligations` to also resolve const inference variables) - #65605 (Remove unreachable unit tuple compare binop codegen) - #65626 (trivial typo fix) Failed merges: r? @ghost
-
由 Mikko Rantanen 提交于
-
由 Yuki Okushi 提交于
trivial typo fix
-
由 Yuki Okushi 提交于
Remove unreachable unit tuple compare binop codegen Closes #63906 Fixes #63551 This is based on #63906 by @luigishat, who had trouble with rebasing his PR.
-
由 Yuki Okushi 提交于
Changed `resolve_type_vars_with_obligations` to also resolve const inference variables Fixes #65380 r? @varkor
-
由 Yuki Okushi 提交于
Avoid unnecessary arena allocations in `expand_pattern()`. `expand_pattern()` has two callsites. One of them needs arena allocation, but the other does not. This commit moves the arena allocation out of the function. This avoids the allocation of many 4 KiB page arena chunks that only hold a single small allocation. It reduces the number of bytes allocated by up to 2% for various benchmarks, albeit without only a very small improvement in runtime.
-
由 Yuki Okushi 提交于
Clean up `contains()` `insert()` chains on HashSet They can be merged to a single `insert()` call, which may avoid double-hashing/lookup of the value.
-
由 Dylan MacKenzie 提交于
-
由 Dylan MacKenzie 提交于
This attribute causes DOT files to be generated in the top-level directory. It is intended to be used only temporarily and should never appear on master. This will prevent #65071 from occurring again.
-
由 Dylan MacKenzie 提交于
-
- 20 10月, 2019 1 次提交
-
-
由 guanqun 提交于
-