summary refs log tree commit diff
path: root/src/librustc_metadata
AgeCommit message (Collapse)AuthorLines
2018-10-07Revert "Auto merge of #53793 - toidiu:ak-stabalize, r=nikomatsakis"Ariel Ben-Yehuda-0/+1
This reverts commit 6810f5286b6b91daab06fc3dccb27d8c46f14349, reversing changes made to 8586ec6980462c99a8926646201b2444d8938d29.
2018-10-02Use full name to identify a macro in a `FileName`.Diogo Sousa-6/+12
Before this two macros with same name would be indistinguishable inside a `FileName`. This caused a bug in incremental compilation (see #53097) since two different macros would map out to the same `StableFilemapId`. Fixes #53097.
2018-09-22avoid leaking host details in proc macro metadata decodingAriel Ben-Yehuda-24/+53
proc macro crates are essentially implemented as dynamic libraries using a dlopen-based ABI. They are also Rust crates, so they have 2 worlds - the "host" world in which they are defined, and the "target" world in which they are used. For all the "target" world knows, the proc macro crate might not even be implemented in Rust, so leaks of details from the host to the target must be avoided for correctness. Because the "host" DefId space is different from the "target" DefId space, any leak involving a DefId will have a nonsensical or out-of-bounds DefKey, and will cause all sorts of crashes. This PR fixes all leaks I have found in `decoder`. In particular, #54059 was caused by host native libraries leaking into the target, which feels like it might even be a correctness issue if it doesn't cause an ICE. Fixes #54059
2018-09-15rustc_resolve: always include core, std and meta in the extern prelude.Eduard-Mihai Burtescu-20/+61
2018-09-15rustc: add unstable support for --extern crate_name without a path.Eduard-Mihai Burtescu-2/+8
2018-09-14Rollup merge of #54095 - kenta7777:kenta7777#53719, r=davidtwcokennytm-1/+1
Rename all mentions of `nil` to `unit` Fixes #53719. Renamed keywords nil to unit.
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-11renamed emit_nil to emit_unitkenta7777-1/+1
2018-09-11Revert "renamed emit_nil to emit_unit"kenta7777-1/+1
This reverts commit d02a5ffaed9c395ae62ee12d0f4e04946c62edb1.
2018-09-10renamed emit_nil to emit_unitkenta7777-1/+1
2018-09-06crates that provide a `panic_handler` are exempt from `unused_extern_crates`Jorge Aparicio-0/+4
fixes the *first* false positive reported in #53964
2018-09-06Auto merge of #53721 - arielb1:exhaustively-unpun, r=nikomatsakisbors-11/+21
fix `is_non_exhaustive` confusion between structs and enums Structs and enums can both be non-exhaustive, with a very different meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1 for structs, and another for enums, and fixes the places that got the usage confused. Fixes #53549. r? @eddyb
2018-09-01move the is_field_list_non_exhaustive flag to VariantDefAriel Ben-Yehuda-11/+21
This completely splits the IS_NON_EXHAUSTIVE flag. No functional changes intended.
2018-08-30Rollup merge of #53472 - eddyb:fx-pls, r=pnkfelixPietro Albini-3/+3
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc. Most of the compiler uses the `Fx` hasher but some places ended up with the default one.
2018-08-29Auto merge of #53711 - arielb1:macro-table, r=michaelwoeristerbors-26/+57
create a valid DefIdTable for proc macro crates At least the incremental compilation code, and a few other places in the compiler, require the CrateMetadata for a loaded target crate to contain a valid DefIdTable for the DefIds in the target. Previously, the CrateMetadata for a proc macro contained the crate's "host" DefIdTable, which is of course incompatible with the "target" DefIdTable, causing ICEs. This creates a DefIdTable that properly refers to the "proc macro" DefIds. Fixes #49482. r? @michaelwoerister Should we beta-nominate this?
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-3/+3
2018-08-27Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakisbors-0/+1
fix for late-bound regions Fix for https://github.com/rust-lang/rust/issues/53419 r? @nikomatsakis
2018-08-26create a valid DefIdTable for proc macro cratesAriel Ben-Yehuda-26/+57
At least the incremental compilation code, and a few other places in the compiler, require the CrateMetadata for a loaded target crate to contain a valid DefIdTable for the DefIds in the target. Previously, the CrateMetadata for a proc macro contained the crate's "host" DefIdTable, which is of course incompatible with the "target" DefIdTable, causing ICEs. This creates a DefIdTable that properly refers to the "proc macro" DefIds. Fixes #49482.
2018-08-26fix `is_non_exhaustive` confusion between structs and enumsAriel Ben-Yehuda-1/+1
Structs and enums can both be non-exhaustive, with a very different meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1 for structs, and another for enums, and fixes the places that got the usage confused. Fixes #53549.
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-24Rollup merge of #53636 - frewsxcv:frewsxcv-nth, r=rkruppekennytm-1/+1
Prefer `.nth(n)` over `.skip(n).next()`. Found by clippy.
2018-08-23Prefer `.nth(n)` over `.skip(n).next()`.Corey Farwell-1/+1
Found by clippy.
2018-08-23Auto merge of #53520 - nnethercote:merge-IdxSet-IdxSetBuf, r=nikomatsakisbors-2/+2
Merge `IdxSet` and `IdxSetBuf` Because it simplifies things. @r? nikomatsakis
2018-08-22Replace TyForeign with ForeignTyvarkor-1/+1
2018-08-22Rename Def::{Param, Foreign} to Def::{TyParam, TyForeign}varkor-1/+1
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-1/+1
2018-08-22Remove Ty prefix from ↵varkor-3/+3
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-21Auto merge of #53530 - kennytm:rollup, r=kennytmbors-12/+6
Rollup of 17 pull requests Successful merges: - #53030 (Updated RELEASES.md for 1.29.0) - #53104 (expand the documentation on the `Unpin` trait) - #53213 (Stabilize IP associated constants) - #53296 (When closure with no arguments was expected, suggest wrapping) - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.) - #53363 (add individual docs to `core::num::NonZero*`) - #53370 (Stabilize macro_vis_matcher) - #53393 (Mark libserialize functions as inline) - #53405 (restore the page title after escaping out of a search) - #53452 (Change target triple used to check for lldb in build-manifest) - #53462 (Document Box::into_raw returns non-null ptr) - #53465 (Remove LinkMeta struct) - #53492 (update lld submodule to include RISCV patch) - #53496 (Fix typos found by codespell.) - #53521 (syntax: Optimize some literal parsing) - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/) - #53551 (Avoid some Place clones.) Failed merges: r? @ghost
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-1/+1
Fix typos found by codespell.
2018-08-21Rollup merge of #53465 - bjorn3:remove_link_meta_struct, r=varkorkennytm-11/+5
Remove LinkMeta struct Fixes #53291
2018-08-20Auto merge of #51880 - varkor:generics-hir-generalisation-followup, r=eddybbors-13/+12
The Great Generics Generalisation: HIR Followup Addresses the final comments in #48149. r? @eddyb, but there are a few things I have yet to clean up. Making the PR now to more easily see when things break. cc @yodaldevoid
2018-08-20Remove IdxSet typedef and Rename {,Hybrid}IdxSetBuf as {,Hybrid}IdxSet.Nicholas Nethercote-2/+2
Now that the `Buf` vs. non-`Buf` distinction has been removed, it makes sense to drop the `Buf` suffix and use the shorter names everywhere.
2018-08-19fix tidy errorsDonato Sciarra-2/+4
2018-08-19mv codemap source_mapDonato Sciarra-35/+35
2018-08-19mv codemap() source_map()Donato Sciarra-7/+7
2018-08-19mv (mod) codemap source_mapDonato Sciarra-6/+6
2018-08-19mv filemap source_fileDonato Sciarra-55/+55
2018-08-19mv FileMap SourceFileDonato Sciarra-24/+24
2018-08-19mv CodeMap SourceMapDonato Sciarra-2/+2
2018-08-19Replace generics_require_inlining with generics.requires_monomorphizationvarkor-5/+2
2018-08-19Replace for_each with forvarkor-8/+10
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-18Use the new Entry::or_default method where possible.Eduard-Mihai Burtescu-4/+6
2018-08-18Remove LinkMeta structbjorn3-11/+5
2018-08-14rustc_resolve: fix special-case for one-segment import paths.Eduard-Mihai Burtescu-28/+0
2018-08-10Auto merge of #53073 - Mark-Simulacrum:data-structures, r=pnkfelixbors-7/+9
Cleanup to librustc::session and related code No functional changes, just some cleanup. This also creates the `rustc_fs_util` crate, but I can remove that change if desired. It felt a little odd to force crates to depend on librustc for some fs utilities; and also seemed good to generally keep the size of librustc lower (for compile times); fs_util will compile in parallel with essentially the first crate since it has no dependencies beyond std.
2018-08-09Move Fingerprint to data structuresMark Rousskov-2/+2
2018-08-09Move SVH structure to data structuresMark Rousskov-5/+7
2018-08-09librustc_metadata: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-07Rollup merge of #52886 - petrochenkov:noga, r=alexcrichtonkennytm-1/+1
cleanup: Remove `Def::GlobalAsm` Global asm is not something that needs to have a `Def` or `DefId`.