Commit Graph

34 Commits

Author SHA1 Message Date
Mazdak Farrokhzad f1701ddef1 rustc: remove rustc_hir_pretty dependency. 2020-03-24 08:44:55 +01:00
Alex Tokarev b35c30251f Reword unused variable warning 2020-03-23 12:14:45 +03:00
Matthias Krüger ad00e91887 remove redundant returns (clippy::needless_return) 2020-03-20 20:23:03 +01:00
Eduard-Mihai Burtescu f3ec069886 rustc: use LocalDefId instead of DefIndex in HirId. 2020-03-19 11:16:08 +02:00
Mazdak Farrokhzad 292c538265
Rollup merge of #69920 - Centril:hir-cleanup, r=Zoxc
Remove some imports to the rustc crate

- When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code).

- Use `rustc_session::` imports instead of `rustc::{session, lint}`.

r? @Zoxc
2020-03-18 18:03:44 +01:00
Oliver Scherer 7894509b00 Fiddle `ParamEnv` through to a place that used to use `ParamEnv::empty` in a buggy manner 2020-03-16 18:51:55 +01:00
Mazdak Farrokhzad 4392a8b73c use direct imports for `rustc::{lint, session}`. 2020-03-16 02:52:06 +01:00
Mazdak Farrokhzad 73a625b5fb remove unnecessary hir::map imports 2020-03-16 02:49:19 +01:00
John Kåre Alsaker 8b16b023b1 Index HIR after creating TyCtxt 2020-03-14 22:52:30 +01:00
bors 360e42de82 Auto merge of #69380 - Zoxc:parent-module, r=michaelwoerister
Use a query to get parent modules

Split out from https://github.com/rust-lang/rust/pull/69015 / https://github.com/rust-lang/rust/pull/68944.

r? @michaelwoerister
2020-03-01 14:21:03 +00:00
Vadim Petrochenkov e08c279eac Rename `syntax` to `rustc_ast` in source code 2020-02-29 21:59:09 +03:00
John Kåre Alsaker 542d813475 Add a `parent_module_from_def_id` query 2020-02-29 05:59:38 +01:00
Maxim Zholobak 20c9a40fec Rename CodeMap to SourceMap follow up 2020-02-22 16:17:31 +02:00
jumbatm d246385122 Run RustFmt 2020-02-11 19:49:01 +10:00
jumbatm 7c58ffe874 Invert control in struct_lint_level.
Caller now passes in a `decorate` function, which is only run if the
lint is allowed.
2020-02-11 19:47:40 +10:00
Nicholas Nethercote d62b6f2047 Pull out a special case in `merge_from_succ`.
This is a small perf win.
2020-02-03 13:34:51 +11:00
Nicholas Nethercote 0eb297d3e0 Fix up `merge_from_succ`.
This function has a variable `changed` that is erroneously used for two
related-but-different purpose:
- to detect if the current element has changed;
- to detect if any elements have changed.

As a result, its use for the first purpose is broken, because if any
prior element changed then the code always thinks the current element
has changed. This is only a performance bug, not a correctness bug,
because we frequently end up calling `assign_unpacked` unnecessarily to
overwrite the element with itself.

This commit adds `any_changed` to correctly distinguish between the two
purposes. This is a small perf win for some benchmarks.
2020-02-03 13:33:45 +11:00
Mazdak Farrokhzad c151782d76 reduce diversity in linting methods 2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad 8bd3d240e3 nix syntax::errors & prefer rustc_errors over errors 2020-01-10 07:41:30 +01:00
Mazdak Farrokhzad 0997388b87 normalize rustc::hir::intravisit imports 2020-01-08 22:09:42 +01:00
Mazdak Farrokhzad 8351667091 intravisit: abstract over HIR Map 2020-01-08 22:01:07 +01:00
Mazdak Farrokhzad ebfd8673a7 Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad 2f64ab6633 {HirId,ItemLocal}{Map,Set} -> rustc::hir & nix rustc::nodemap 2020-01-04 19:01:42 +01:00
Mazdak Farrokhzad 4ff12ce4c1 Normalize `syntax::symbol` imports. 2020-01-02 13:57:04 +01:00
Vadim Petrochenkov 70f1d57048 Rename `syntax_pos` to `rustc_span` in source code 2020-01-01 09:15:18 +03:00
Camille GILLOT 36f95ab3fa Fallout in other crates. 2019-12-27 19:20:28 +01:00
Camille GILLOT 8284035372 Fallout in other crates. 2019-12-26 23:38:46 +01:00
varkor 35979a92bf Add span information to `ExprKind::Assign` 2019-12-23 11:20:13 +00:00
Mark Rousskov a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Camille GILLOT 9694ab9e18 Use Arena inside hir::Body. 2019-12-21 23:39:19 +01:00
Matthew Jasper a8efd31f2b Add raw address of expressions to the AST and HIR 2019-11-24 18:06:13 +00:00
Mazdak Farrokhzad 44cebe5970 reduce size of hir::ExprKind 2019-11-21 01:23:29 +01:00
Esteban Küber 31620fbdea Avoid ICE when `break`ing to an unreachable label 2019-11-18 18:33:57 -08:00
Mark Rousskov 91a096a9b8 move middle::liveness to rustc_passes 2019-10-04 11:11:33 -04:00