| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-08-30 | mv compiler to compiler/ | mark | -161/+0 | |
| 2020-08-22 | Use smaller def span for functions | Aaron Hill | -1/+1 | |
| Currently, the def span of a funtion encompasses the entire function signature and body. However, this is usually unnecessarily verbose - when we are pointing at an entire function in a diagnostic, we almost always want to point at the signature. The actual contents of the body tends to be irrelevant to the diagnostic we are emitting, and just takes up additional screen space. This commit changes the `def_span` of all function items (freestanding functions, `impl`-block methods, and `trait`-block methods) to be the span of the signature. For example, the function ```rust pub fn foo<T>(val: T) -> T { val } ``` now has a `def_span` corresponding to `pub fn foo<T>(val: T) -> T` (everything before the opening curly brace). Trait methods without a body have a `def_span` which includes the trailing semicolon. For example: ```rust trait Foo { fn bar(); }``` the function definition `Foo::bar` has a `def_span` of `fn bar();` This makes our diagnostic output much shorter, and emphasizes information that is relevant to whatever diagnostic we are reporting. We continue to use the full span (including the body) in a few of places: * MIR building uses the full span when building source scopes. * 'Outlives suggestions' use the full span to sort the diagnostics being emitted. * The `#[rustc_on_unimplemented(enclosing_scope="in this scope")]` attribute points the entire scope body. * The 'unconditional recursion' lint uses the full span to show additional context for the recursive call. All of these cases work only with local items, so we don't need to add anything extra to crate metadata. | ||||
| 2020-08-13 | merge `as_local_hir_id` with `local_def_id_to_hir_id` | Bastian Kauschke | -2/+2 | |
| 2020-06-07 | rename FalseEdges -> FalseEdge | Ralf Jung | -2/+2 | |
| 2020-05-18 | Fix handling on InlineAsm for the unconditional recursion lint. | Amanieu d'Antras | -3/+8 | |
| 2020-05-18 | Add asm! to MIR | Amanieu d'Antras | -0/+4 | |
| 2020-04-28 | Move a few queries to using an arena. | Camille GILLOT | -1/+1 | |
| 2020-04-27 | Accept `LocalDefId` as argument for `mir_build::lint::check` | marmeladema | -8/+9 | |
| 2020-04-23 | Modify `as_local_hir_id` to return a bare `HirId` | marmeladema | -2/+2 | |
| 2020-04-23 | Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId` | marmeladema | -2/+2 | |
| 2020-04-18 | Detect mistyped associated consts in `Instance::resolve`. | Eduard-Mihai Burtescu | -1/+1 | |
| 2020-04-09 | Use tri-color search for unconditional recursion lint | Dylan MacKenzie | -133/+109 | |
| 2020-04-07 | Further improve comments | Jonas Schievink | -3/+4 | |
| 2020-04-07 | Add some more comments | Jonas Schievink | -0/+11 | |
| 2020-04-06 | Add some comments and rename variable | Jonas Schievink | -2/+9 | |
| 2020-04-06 | Merge redundant match arms | Jonas Schievink | -11/+8 | |
| 2020-04-06 | Move closure check upwards | Jonas Schievink | -7/+6 | |
| 2020-04-06 | Don't lint for self-recursion when the function can diverge | Jonas Schievink | -90/+112 | |
| 2020-03-30 | rustc -> rustc_middle part 3 (rustfmt) | Mazdak Farrokhzad | -3/+3 | |
| 2020-03-30 | rustc -> rustc_middle part 2 | Mazdak Farrokhzad | -4/+4 | |
| 2020-03-25 | Rename `def_span` to `guess_head_span` | Esteban Küber | -1/+1 | |
| 2020-03-16 | use direct imports for `rustc::{lint, session}`. | Mazdak Farrokhzad | -1/+1 | |
| 2020-02-11 | Run RustFmt | jumbatm | -15/+10 | |
| 2020-02-11 | Invert control in struct_lint_level. | jumbatm | -9/+11 | |
| Caller now passes in a `decorate` function, which is only run if the lint is allowed. | ||||
| 2020-01-12 | Split `rustc_mir::{build, hair, lints}` into their own crate | Matthew Jasper | -0/+141 | |
