- 16 7月, 2018 2 次提交
- 28 6月, 2018 1 次提交
-
-
由 Vadim Petrochenkov 提交于
Namely: labels, type parameters, bindings in patterns, parameter names in functions without body. All of these do not need hygiene after lowering to HIR, only span locations.
-
- 23 6月, 2018 1 次提交
-
-
由 varkor 提交于
-
- 29 5月, 2018 1 次提交
-
-
由 Zack M. Davis 提交于
Changing the `each_binding` utility method to take the `HirId` of a binding pattern rather than its `NodeId` seems like a modest first step in support of the `HirId`ification initiative #50928. (The inspiration for choosing this in particular came from the present author's previous work on diagnostics issued during liveness analysis, which is the most greatly affected module in this change.)
-
- 23 5月, 2018 1 次提交
-
-
由 Nicholas Nethercote 提交于
`Liveness::users` is a vector that is occasionally enormous. For example, doing a "clean incremental" check build of `inflate`, there is one instance that represents 5,499 live nodes and 1087 vars, which requires 5,977,413 entries. At 24 bytes per entry, that is 143MB. This patch changes LiveNode from a usize to a u32. On 64-bit machines that halves the size of these entries, significantly reducing peak memory usage and memory traffic, and speeding up "clean incremental" builds of `inflate` by about 10%.
-
- 21 5月, 2018 1 次提交
-
-
由 Zack M. Davis 提交于
Consider this a down payment on #50723. To recap, an `Applicability` enum was recently (#50204) added, to convey to Rustfix and other tools whether we think it's OK for them to blindly apply the suggestion, or whether to prompt a human for guidance (because the suggestion might contain placeholders that we can't infer, or because we think it has a sufficiently high probability of being wrong even though it's— presumably—right often enough to be worth emitting in the first place). When a suggestion is marked as `MaybeIncorrect`, we try to use comments to indicate precisely why (although there are a few places where we just say `// speculative` because the present author's subjective judgement balked at the idea that the suggestion has no false positives). The `run-rustfix` directive is opporunistically set on some relevant UI tests (and a couple tests that were in the `test/ui/suggestions` directory, even if the suggestions didn't originate in librustc or libsyntax). This is less trivial than it sounds, because a surprising number of test files aren't equipped to be tested as fixed even when they contain successfully fixable errors, because, e.g., there are more, not-directly-related errors after fixing. Some test files need an attribute or underscore to avoid unused warnings tripping up the "fixed code is still producing diagnostics" check despite the fixes being correct; this is an interesting contrast-to/inconsistency-with the behavior of UI tests (which secretly pass `-A unused`), a behavior which we probably ought to resolve one way or the other (filed issue #50926). A few suggestion labels are reworded (e.g., to avoid phrasing it as a question, which which is discouraged by the style guidelines listed in `.span_suggestion`'s doc-comment).
-
- 18 5月, 2018 1 次提交
-
-
由 Zack M. Davis 提交于
In e4b1a797 (#47922), we corrected erroneous suggestions for unused shorthand field pattern bindings, suggesting `field: _` where the previous suggestion of `_field` wouldn't even have compiled (#47390). Soon, it was revealed that this was insufficient (#50303), and the fix was extended to references, slices, &c. (#50327) But even this proved inadequate, as the erroneous suggestions were still being issued for patterns in local (`let`) bindings (#50804). Here, we yank the shorthand-detection and variable/node registration code into a new common function that can be called while visiting both match arms and `let` bindings. Resolves #50804.
-
- 16 5月, 2018 1 次提交
-
-
由 est31 提交于
-
- 15 5月, 2018 2 次提交
-
-
由 est31 提交于
It's redundant as Result already implements Encodable as well as Decodable.
-
由 est31 提交于
When we want to implement label-break-value, we can't really decide whether to emit ScopeTarget::Loop or ScopeTarget::Block in the code that is supposed to create it. So we get rid of it and reconstruct the information when needed.
-
- 13 5月, 2018 3 次提交
- 30 4月, 2018 3 次提交
- 17 4月, 2018 1 次提交
-
-
由 Manish Goregaokar 提交于
-
- 13 4月, 2018 1 次提交
-
-
由 Vadim Petrochenkov 提交于
-
- 17 3月, 2018 1 次提交
-
-
由 Mark Mansi 提交于
-
- 03 3月, 2018 1 次提交
-
-
由 Manish Goregaokar 提交于
-
- 01 2月, 2018 1 次提交
-
-
由 Zack M. Davis 提交于
Previously, unused variables would get a note that the warning could be silenced by prefixing the variable with an underscore, but that doesn't work for field shorthand patterns, which the liveness analysis didn't know about. The "to avoid this warning" verbiage seemed unnecessary. Resolves #47390.
-
- 29 1月, 2018 1 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
- 14 9月, 2017 1 次提交
-
-
由 est31 提交于
-
- 09 9月, 2017 1 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
- 16 8月, 2017 1 次提交
-
-
由 Guillaume Gomez 提交于
-
- 10 8月, 2017 1 次提交
-
-
由 Alex Crichton 提交于
In preparation for incremental compilation this commit refactors the lint handling infrastructure in the compiler to be more "eager" and overall more incremental-friendly. Many passes of the compiler can emit lints at various points but before this commit all lints were buffered in a table to be emitted at the very end of compilation. This commit changes these lints to be emitted immediately during compilation using pre-calculated lint level-related data structures. Linting today is split into two phases, one set of "early" lints run on the `syntax::ast` and a "late" set of lints run on the HIR. This commit moves the "early" lints to running as late as possible in compilation, just before HIR lowering. This notably means that we're catching resolve-related lints just before HIR lowering. The early linting remains a pass very similar to how it was before, maintaining context of the current lint level as it walks the tree. Post-HIR, however, linting is structured as a method on the `TyCtxt` which transitively executes a query to calculate lint levels. Each request to lint on a `TyCtxt` will query the entire crate's 'lint level data structure' and then go from there about whether the lint should be emitted or not. The query depends on the entire HIR crate but should be very quick to calculate (just a quick walk of the HIR) and the red-green system should notice that the lint level data structure rarely changes, and should hopefully preserve incrementality. Overall this resulted in a pretty big change to the test suite now that lints are emitted much earlier in compilation (on-demand vs only at the end). This in turn necessitated the addition of many `#![allow(warnings)]` directives throughout the compile-fail test suite and a number of updates to the UI test suite.
-
- 28 7月, 2017 3 次提交
-
-
由 Alex Crichton 提交于
-
由 John Kåre Alsaker 提交于
-
由 John Kåre Alsaker 提交于
-
- 06 7月, 2017 1 次提交
-
-
由 Zack M. Davis 提交于
The field init shorthand syntax was stabilized in 1.17.0 (aebd94fd); we are now free to use it in the compiler.
-
- 01 6月, 2017 4 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
- 13 5月, 2017 3 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
- 01 5月, 2017 2 次提交
-
-
由 Niko Matsakis 提交于
Make a `CodeExtent<'tcx>` be something allocated in an arena instead of an index into the `RegionMaps`.
-
由 Niko Matsakis 提交于
Instead, thread around `Option<CodeExtent>` where applicable.
-