Commit Graph

149 Commits

Author SHA1 Message Date
Mazdak Farrokhzad 2c3e5d3de0 - remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}
- remove syntax::{help!, span_help!, span_note!}
- remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!}
- lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints
- inline syntax::{struct_span_warn!, diagnostic_used!}
- stringify_error_code! -> error_code! & use it more.
- find_plugin_registrar: de-fatalize an error
- de-fatalize metadata errors
- move type_error_struct! to rustc_typeck
- struct_span_err! -> rustc_errors
2020-01-08 04:25:33 +01:00
Mazdak Farrokhzad ebfd8673a7 Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad 62ac10ffde simplify reexports in rustc::hir 2020-01-05 12:47:11 +01:00
Mazdak Farrokhzad 4ff12ce4c1 Normalize `syntax::symbol` imports. 2020-01-02 13:57:04 +01:00
Camille GILLOT 8284035372 Fallout in other crates. 2019-12-26 23:38:46 +01:00
Mark Rousskov a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
varkor 9f1269f23c Rename to `then_some` and `then` 2019-12-06 12:24:54 +00:00
varkor e3a8ea4e18 Use `to_option` in various places 2019-12-06 12:23:23 +00:00
Paul Daniel Faria 05dc5e9f47 Compute predecessors in mir_build query and use existing cache for generating ReadOnlyBodyCache, remove unneeded fns 2019-12-02 08:41:30 -05:00
Paul Daniel Faria b2fe254c98 Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, rename all body_cache back to body 2019-12-02 08:40:56 -05:00
Paul Daniel Faria 595d161d36 Remove BodyCache.body and rely on Deref as much as possible for ReadOnlyBodyCache 2019-12-02 08:38:16 -05:00
Paul Daniel Faria 4de31b26d1 Fix remaining compilation issues 2019-12-02 08:37:04 -05:00
Paul Daniel Faria fc6b58d0a8 Simplify BodyCache impl and fix all remaining type errors in librustc_mir (lifetime errors still exist) 2019-12-02 08:35:08 -05:00
Eduard-Mihai Burtescu a9976d89ed rustc: move mir::SourceScopeLocalData to a field of SourceScopeData. 2019-11-30 01:37:42 +02:00
Eduard-Mihai Burtescu 30a9978c6c rustc: move MIR source_scope_local_data's ClearCrossCrate to be around elements. 2019-11-30 01:36:51 +02:00
Matthew Jasper 9abc34ed9d Track pointers to statics in MIR 2019-11-21 20:55:17 +00:00
Guillaume Gomez 798e389e57 Update to use new librustc_error_codes library 2019-11-14 13:05:42 +01:00
Mazdak Farrokhzad 65c77bc09a
Rollup merge of #66188 - Centril:fnsig, r=davidtwco
`MethodSig` -> `FnSig` & Use it in `ItemKind::Fn`

In both AST & HIR, rename `MethodSig` to `FnSig` and then proceed to use it in `ItemKind::Fn` so that the overall structure is more regular.

r? @davidtwco
2019-11-08 16:50:41 +01:00
Mazdak Farrokhzad 30d7279628 hir::ItemKind::Fn: use hir::MethodSig 2019-11-08 09:32:20 +01:00
Mazdak Farrokhzad 98d2c510dd safe_extern_static -> error 2019-11-06 11:10:36 +01:00
Nicholas Nethercote b9cef6984b Simplify various `Symbol` use points.
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch
of unnecessary sigils.
2019-11-02 09:01:02 +11:00
Mazdak Farrokhzad 8bb039fb83
Rollup merge of #65315 - spastorino:intern-place-projection, r=oli-obk
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
2019-10-25 13:12:46 +02:00
Santiago Pastorino 190802cfca
Pattern match over PlaceRef rather than Place
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.
2019-10-22 10:33:30 -03:00
Nicholas Nethercote c325553a30 Convert `InternedString`s to `Symbols` in `UnsafetyViolation`. 2019-10-21 11:32:55 +11:00
csmoe 64f61c7888 remove indexed_vec re-export from rustc_data_structures 2019-09-29 16:48:31 +00:00
varkor 7bc94cc3c2 Rename `Item.node` to `Item.kind` 2019-09-26 18:21:48 +01:00
varkor e2e0f9af85 Rename `sty` to `kind` 2019-09-25 15:50:04 +01:00
Oliver Scherer 7767e7fb16 Stabilize `str::len`, `[T]::len`, `is_empty` and `str::as_bytes` as const fn 2019-09-24 12:56:44 +02:00
Santiago Pastorino d1f763f60d
Use while let slice_pattern instead of carrying an index around 2019-09-16 15:53:08 -03:00
Santiago Pastorino e9c41148c0
Convert Place's projection to a boxed slice 2019-09-09 18:16:49 -03:00
Wesley Wiser 4d62545687 Move def_id out add substsref 2019-08-22 06:36:30 -04:00
Santiago Pastorino d0accade3e Migrate from Place enum to Place struct 2019-07-20 05:08:38 +02:00
Samy Kacimi 7a2a17af09
normalize use of backticks/lowercase in compiler messages for librustc_mir
https://github.com/rust-lang/rust/issues/60532

r? @alexreg
2019-07-06 20:40:40 +02:00
Jeremy Stucki 0477e07272
Remove needless lifetimes 2019-07-03 10:00:26 +02:00
ljedrz f05cbc98f8 HIR: rename find_by_hir_id to find 2019-06-24 09:58:49 +02:00
ljedrz d08bd72e97 HIR: rename get_parent_node_by_hir_id to get_parent_node 2019-06-24 09:46:38 +02:00
Eduard-Mihai Burtescu b25b466a88 rustc: remove 'x: 'y bounds (except from comments/strings). 2019-06-18 18:10:21 +03:00
ljedrz d996c4d5a3 remove _by_hir_id if there is no NodeId counterpart 2019-06-17 18:57:21 +02:00
Eduard-Mihai Burtescu f3f9d6dfd9 Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
Eduard-Mihai Burtescu fff08cb043 Run `rustfmt --file-lines ...` for changes from previous commits. 2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu 17cdd356da rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu 2441253508 Fix fallout from `deny(unused_lifetimes)`. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu 37799a5552 rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu d110d309b6 rustc_mir: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Jad Ghalayini 80ff07f30d Changed usages of `mir` in librustc::mir and librustc_mir to `body` 2019-06-09 16:05:05 -04:00
Santiago Pastorino 2bdaccbbcf Make UnsafetyChecker visitor iterate instead of recurse 2019-06-06 05:17:19 +02:00
Claude-Alban RANÉLY-VERGÉ-DÉPRÉ 6e5e0daff2 Changes the type `mir::Mir` into `mir::Body`
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.

Revisions asked by eddyb :
- Renamed of all the occurences of {visit/super}_mir
- Renamed test structures `CachedMir` to `Cached`

Fixing the missing import on `AggregateKind`
2019-05-28 19:17:51 +02:00
Nicholas Nethercote 257eaf523f Introduce `InternedString::intern`.
`InternedString::intern(x)` is preferable to
`Symbol::intern(x).as_interned_str()`, because the former involves one
call to `with_interner` while the latter involves two.

The case within InternedString::decode() is particularly hot, and this
change reduces the number of `with_interner` calls by up to 13%.
2019-05-20 09:17:00 +10:00
Nicholas Nethercote fb084a48e2 Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions. 2019-05-13 09:29:22 +10:00
Matthew Jasper 22226fa7fb Remove region from borrow place contexts 2019-04-26 21:35:10 +01:00