about summary refs log tree commit diff
path: root/src/librustc/hir/map
AgeCommit message (Collapse)AuthorLines
2019-12-21Use Arena inside hir::ForeignItem.Camille GILLOT-3/+3
2019-12-21Handle Attributes in arena.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::Item.Camille GILLOT-6/+6
2019-12-21Use Arena inside hir::Crate.Camille GILLOT-11/+11
2019-12-14Do not ICE on unnamed futureEsteban Küber-3/+10
2019-12-06Rename to `then_some` and `then`varkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-7/+1
2019-11-26Make the HIR map own the Definitions.Camille GILLOT-5/+5
2019-11-23Move def collector from `rustc` to `rustc_resolve`Vadim Petrochenkov-353/+10
2019-11-19More HashStable.Camille GILLOT-3/+1
2019-11-14TAIT: use hack in ->HIR to avoid more changesMazdak Farrokhzad-3/+2
2019-11-13Get `FnSig` by `HirId`Dylan MacKenzie-0/+35
2019-11-08ast::ItemKind::Fn: use ast::FnSigMazdak Farrokhzad-9/+4
2019-11-08ast::MethodSig -> ast::FnSigMazdak Farrokhzad-1/+1
2019-11-08hir::MethodSig -> hir::FnSigMazdak Farrokhzad-6/+6
2019-11-08hir::ItemKind::Fn: use hir::MethodSigMazdak Farrokhzad-10/+10
2019-11-07syntax::parser::token -> syntax::tokenMazdak Farrokhzad-1/+1
2019-11-05rustc: remove "GlobalMetaData" dead code from hir::map::definitions.Eduard-Mihai Burtescu-87/+3
2019-10-28rustc: use IndexVec<DefIndex, T> instead of Vec<T>.Eduard-Mihai Burtescu-23/+17
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-4/+4
This is done by moving some data definitions to syntax::expand.
2019-10-25rustc: replace a few `.cloned()` with `.copied()`.Eduard-Mihai Burtescu-3/+3
2019-10-25rustc: make DefPathData (and friends) Copy (now that it uses Symbol).Eduard-Mihai Burtescu-5/+5
2019-10-23Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddybMazdak Farrokhzad-40/+37
Remove `InternedString` This PR removes `InternedString` by converting all occurrences to `Symbol`. There are a handful of places that need to use the symbol chars instead of the symbol index, e.g. for stable sorting; local conversions `LocalInternedString` is used in those places. r? @eddyb
2019-10-21Remove many unnecessary trait derivations.Nicholas Nethercote-1/+0
2019-10-21Remove `InternedString`.Nicholas Nethercote-2/+2
By using `LocalInternedString` instead for the few remaining uses.
2019-10-21Convert fields within `DefPathData` from `InternedString` to `Symbol`.Nicholas Nethercote-38/+35
It's a full conversion, except in `DefKey::compute_stable_hash()` where a `Symbol` now is converted to an `InternedString` before being hashed. This was necessary to avoid test failures.
2019-10-19Rollup merge of #65545 - nnethercote:more-symbol-cleanups, r=petrochenkovMazdak Farrokhzad-3/+3
More symbol cleanups Some minor improvements, mostly aimed at reducing unimportant differences between `Symbol` and `InternedString`. Helps a little with #60869. r? @petrochenkov
2019-10-19expand: Simplify expansion of derivesVadim Petrochenkov-1/+1
And make it more uniform with other macros. By merging placeholders for future derives' outputs into the derive container's output fragment early.
2019-10-18Remove `Hash` impls for `DefPath`, `DisambiguatedDefPathData`, and `DefKey`.Nicholas Nethercote-3/+3
They aren't used.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-3/+3
2019-10-09self-profiling: Add events for everything except trait selection.Michael Woerister-0/+2
2019-09-30Auto merge of #64778 - csmoe:index, r=eddybbors-3/+3
Introduce librustc_index crate Closes #50592
2019-09-29Rollup merge of #64825 - estebank:match-unit, r=CentrilMazdak Farrokhzad-0/+26
Point at enclosing match when expecting `()` in arm When encountering code like the following: ```rust fn main() { match 3 { 4 => 1, 3 => { println!("Yep it maches."); 2 } _ => 2 } println!("Bye!") } ``` point at the enclosing `match` expression and suggest ignoring the returned value: ``` error[E0308]: mismatched types --> $DIR/match-needing-semi.rs:8:13 | LL | / match 3 { LL | | 4 => 1, LL | | 3 => { LL | | 2 | | ^ expected (), found integer LL | | } LL | | _ => 2 LL | | } | | -- help: consider using a semicolon here | |_____| | expected this to be `()` | = note: expected type `()` found type `{integer} ``` Fix #40799.
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-3/+3
2019-09-28clean upEsteban Küber-2/+2
2019-09-28review commentsEsteban Küber-0/+5
2019-09-28Point at enclosing match when expecting `()` in armEsteban Küber-0/+21
When encountering code like the following: ```rust fn main() { match 3 { 4 => 1, 3 => { println!("Yep it maches."); 2 } _ => 2 } println!("Bye!") } ``` point at the enclosing `match` expression and suggest ignoring the returned value: ``` error[E0308]: mismatched types --> $DIR/match-needing-semi.rs:8:13 | LL | / match 3 { LL | | 4 => 1, LL | | 3 => { LL | | 2 | | ^ expected (), found integer LL | | } LL | | _ => 2 LL | | } | | -- help: consider using a semicolon here | |_____| | expected this to be `()` | = note: expected type `()` found type `{integer} ``` Fix #40799.
2019-09-28Switch over all StableHash impls to new formatMark Rousskov-4/+2
2019-09-28Rollup merge of #64859 - Centril:const-def-here-new-var, r=estebankMazdak Farrokhzad-0/+8
check_match: improve diagnostics for `let A = 2;` with `const A: i32 = 3` For example: ``` error[E0005]: refutable pattern in local binding: `std::i32::MIN..=1i32` and `3i32..=std::i32::MAX` not covered --> $DIR/const-pat-non-exaustive-let-new-var.rs:2:9 | LL | let A = 3; | ^ | | | interpreted as a constant pattern, not a new variable | help: introduce a variable instead: `a_var` ... LL | const A: i32 = 2; | ----------------- constant defined here ``` r? @estebank cc @matthiaskrgr @rpjohnst
2019-09-28Improve diagnostic for `let A = 0;`Mazdak Farrokhzad-0/+8
where `A` is a constant, not a new variable.
2019-09-27fix rebaseEsteban Küber-1/+1
2019-09-27review commentsEsteban Küber-3/+3
2019-09-27Account for tail expressions when pointing at return typeEsteban Küber-1/+24
When there's a type mismatch we make an effort to check if it was caused by a function's return type. This logic now makes sure to only point at the return type if the error happens in a tail expression.
2019-09-27Turn `walk_parent_nodes` method into an iteratorEsteban Küber-105/+101
2019-09-26Rename `ForeignItem.node` to `ForeignItem.kind`varkor-3/+3
2019-09-26Rename `Item.node` to `Item.kind`varkor-28/+31
2019-09-26Rename `Stmt.node` to `Stmt.kind`varkor-2/+2
2019-09-26Rename `Ty.node` to `Ty.kind`varkor-1/+1
2019-09-26Rename `TraitItem.node` to `TraitItem.kind`varkor-11/+11
2019-09-26Rename `ImplItem.node` to `ImplItem.kind`varkor-11/+14