summary refs log tree commit diff
path: root/src/librustc_metadata
AgeCommit message (Collapse)AuthorLines
2019-03-16Emit missing unclosed delimiter errorsEsteban Küber-2/+2
2019-02-20hir: HirId-ify intravisitljedrz-1/+1
2019-02-19Auto merge of #58503 - varkor:const-generics-hir, r=petrochenkovbors-0/+28
Add const generics to the HIR Split out from https://github.com/rust-lang/rust/pull/53645. cc @yodaldevoid r? @eddyb
2019-02-16Rollup merge of #58074 - scottmcm:stabilize-sort_by_cached_key, r=SimonSapinkennytm-1/+0
Stabilize slice_sort_by_cached_key I was going to ask on the tracking issue (https://github.com/rust-lang/rust/issues/34447), but decided to just send this and hope for an FCP here. The method was added last March by https://github.com/rust-lang/rust/pull/48639. Signature: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_by_cached_key ```rust impl [T] { pub fn sort_by_cached_key<K, F>(&mut self, f: F) where F: FnMut(&T) -> K, K: Ord; } ``` That's an identical signature to the existing `sort_by_key`, so I think the questions are just naming, implementation, and the usual "do we want this?". The implementation seems to have proven its use in rustc at least, which many uses: https://github.com/rust-lang/rust/search?l=Rust&q=sort_by_cached_key (I'm asking because it's exactly what I just needed the other day: ```rust all_positions.sort_by_cached_key(|&n| data::CITIES.iter() .map(|x| *metric_closure.get_edge(n, x.pos).unwrap()) .sum::<usize>() ); ``` since caching that key is a pretty obviously good idea.) Closes #34447
2019-02-15Take Const into account in HIRvarkor-0/+28
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-14Rollup merge of #57856 - lzutao:fix-old-first-edition, r=steveklabnikMazdak Farrokhzad-1/+1
Convert old first edition links to current edition one r? @steveklabnik
2019-02-13Convert old doc links to current editionLzu Tao-1/+1
Use footnote style to bypass the tidy check
2019-02-12Stabilize slice_sort_by_cached_keyScott McMurray-1/+0
2019-02-13Rollup merge of #58137 - ljedrz:cleanup_node_id_to_type, r=estebankMazdak Farrokhzad-1/+1
Cleanup: rename node_id_to_type(_opt) Renames `node_id_to_type(_opt)` to `hir_id_to_type(_opt)`; this makes it clear we are dealing with HIR nodes and their IDs here. In addition, a drive-by commit removing `ty::item_path::hir_path_str` (as requested by @eddyb).
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-13/+13
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-11Use `Rc<[Symbol]>` instead of `Vec<Symbol>` to reduce # of allocsOliver Scherer-3/+3
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-2/+4
2019-02-11Auto merge of #58153 - ljedrz:HirIdify_typeck, r=Zoxcbors-1/+1
Partially Hiridify typeck Another step towards https://github.com/rust-lang/rust/pull/57578.
2019-02-10rustc: doc commentsAlexander Regueiro-13/+13
2019-02-09Auto merge of #57944 - estebank:unclosed-delim-the-quickening, r=oli-obkbors-1/+3
Deduplicate mismatched delimiter errors Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently. Second attempt at #54029, follow up to #53949. Fix #31528.
2019-02-09cleanup: rename node_id_to_type(_opt)ljedrz-1/+1
2019-02-09Rollup merge of #58255 - taiki-e:librustc_metadata-2018, r=CentrilMazdak Farrokhzad-66/+67
librustc_metadata => 2018 Transitions `librustc_metadata` to Rust 2018; cc #58099 r? @Centril
2019-02-08librustc_metadata => 2018Taiki Endo-66/+67
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-07unify error handling to single methodEsteban Küber-6/+2
2019-02-07Deduplicate mismatched delimiter errorsEsteban Küber-1/+7
Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently.
2019-02-05typeck: partially HirIdifyljedrz-1/+1
2019-02-02hir: add HirId to main Hir nodesljedrz-1/+1
2019-01-24Auto merge of #51285 - Mark-Simulacrum:remove-quote_apis, r=Manishearthbors-1/+0
Remove quote_*! macros This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved. Fixes #46849. Fixes #12265. Fixes #12266. Fixes #26994. r? @Manishearth
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-1/+0
2019-01-22Fix some cross crate existential type ICEsOliver Scherer-0/+3
2019-01-19Rollup merge of #57502 - nikomatsakis:fix-trait-alias-1b, r=nikomatsakisMazdak Farrokhzad-20/+56
make trait-aliases work across crates This is rebase of a small part of @alexreg's PR #55994. It focuses just on the changes that integrate trait aliases properly into crate metadata, excluding the stylistic edits and the trait objects. The stylistic edits I also rebased and can open a separate PR. The trait object stuff I found challenging and decided it basically needed to be reimplemented. For now I've excluded it. Since this is really @alexreg's work (I really just rebased) I am going to make it r=me once it is working. Fixes #56488. Fixes #57023.
2019-01-18Rollup merge of #57650 - AB1908:master, r=petrochenkovMazdak Farrokhzad-1/+1
librustc_metadata: Pass a default value when unwrapping a span Fixes #57323. When compiling with `static-nobundle` a-la `rustc -l static-nobundle=nonexistent main.rs` we now get a neat output in the form of: ``` error[E0658]: kind="static-nobundle" is feature gated (see issue #37403) | = help: add #![feature(static_nobundle)] to the crate attributes to enable error: aborting due to previous error For more information about this error, try `rustc --explain E0658`. ``` The build and tests completed successfully on my machine. Should I be adding a new test?
2019-01-15Pass a default value when unwrapping a spanAB1908-1/+1
Fixes #57323
2019-01-13Querify local plugin_registrar_fnIgor Matuszewski-4/+1
2019-01-13Querify local proc_macro_decls_staticIgor Matuszewski-2/+2
2019-01-10integrate trait aliases into def-paths / metadataNiko Matsakis-20/+56
Co-authored-by: Alexander Regueiro <alexreg@me.com>
2018-12-26Store `Ident` rather than just `Name` in HIR types `Item` and `ForeignItem`.Alexander Regueiro-1/+1
2018-12-25Remove licensesMark Rousskov-170/+0
2018-12-12Remove `Session::sysroot()`.Nicholas Nethercote-1/+1
Instead of maybe storing its own sysroot and maybe deferring to the one in `Session::opts`, just clone the latter when necessary so one is always directly available. This removes the need for the getter.
2018-12-08Auto merge of #56616 - estebank:issue-56539, r=davidtwcobors-2/+2
Encode `TraitAlias` as if they were `Trait` Fix #56539.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-4/+4
2018-12-07Encode `TraitAlias` as if they were `Trait`Esteban Küber-2/+2
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-52/+52
2018-12-04cleanup: remove static lifetimes from constsljedrz-1/+1
2018-11-30proc_macro: move to a dependency of libtest.Eduard-Mihai Burtescu-1/+0
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-57/+44
(compiler front-ends).
2018-11-27remove uses of feature gateMark Mansi-1/+0
2018-11-21rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.Eduard-Mihai Burtescu-1/+1
2018-11-15Rollup merge of #55778 - nnethercote:LrcPreds, r=eddybPietro Albini-3/+3
Wrap some query results in `Lrc`. So that the frequent clones in `try_get` are cheaper.
2018-11-14Use `Mmap` to open the rmeta file.Nicholas Nethercote-4/+28
Because those files are quite large, contribute significantly to peak memory usage, but only a small fraction of the data is ever read.
2018-11-14Wrap some query results in `Lrc`.Nicholas Nethercote-3/+3
So that the frequent clones in `try_get` are cheaper. Fixes #54274.
2018-11-12Use type safe `VariantIdx` instead of `usize` everywhereOliver Scherer-5/+6
2018-11-11std: Delete the `alloc_system` crateAlex Crichton-14/+9
This commit deletes the `alloc_system` crate from the standard distribution. This unstable crate is no longer needed in the modern stable global allocator world, but rather its functionality is folded directly into the standard library. The standard library was already the only stable location to access this crate, and as a result this should not affect any stable code.
2018-11-11rustc: Clean up allocator injection logicAlex Crichton-96/+17
This commit cleans up allocator injection logic found in the compiler around selecting the global allocator. It turns out that now that jemalloc is gone the compiler never actually injects anything! This means that basically everything around loading crates here and there can be easily pruned. This also removes the `exe_allocation_crate` option from custom target specs as it's no longer used by the compiler anywhere.