about summary refs log tree commit diff
path: root/src/librustc_metadata
AgeCommit message (Collapse)AuthorLines
2019-11-04Auto merge of #65838 - estebank:resilient-recovery, r=Centrilbors-1/+1
Reduce amount of errors given unclosed delimiter When in a file with a non-terminated item, catch the error and consume the block instead of trying to recover it on a more granular way in order to reduce the amount of unrelated errors that would be fixed after adding the missing closing brace. Also point out the possible location of the missing closing brace. Fix #63690.
2019-11-01Rollup merge of #66018 - pnkfelix:issue-64872-revert-64324, r=alexcrichtonTyler Mandry-21/+5
Revert PR 64324: dylibs export generics again (for now) As discussed on PR #65781, this is a targeted attempt to undo the main semantic change from PR #64324, by putting `dylib` back in the set of crate types that export generic symbols. The main reason to do this is that PR #64324 had unanticipated side-effects that caused bugs like #64872, and in the opinion of @alexcrichton and myself, the impact of #64872 is worse than #64319. In other words, it is better for us, in the short term, to reopen #64319 as currently unfixed for now than to introduce new bugs like #64872. Fix #64872 Reopen #64319
2019-11-01targeted revert of PR rust-lang/rust#64324 (just undo change to dylib ↵Felix S. Klock II-21/+5
generics export). Includes the anticipated fallout to run-make-fulldeps test suite from this change. (We need to reopen issue 64319 as part of landing this.)
2019-10-31Implement dual proc macro hashingmsizanoen-7/+24
This changes the mechanism of `-Z dual-proc-macro` to record the host proc macro hash in the transistive dependency information and use it during dependency resolution instead of resolving only by name.
2019-10-30Make init_locking return a reference to the initialized dataSantiago Pastorino-3/+1
2019-10-30Change CrateMetadata's source_map_import_info from RwLock to OnceSantiago Pastorino-83/+66
This field is created lazily on first use and after that is read only. That's exactly what Once is for.
2019-10-30Correctly indent get_predicates functionSantiago Pastorino-1/+1
2019-10-30Do not complain about missing `fn main()` in some casesEsteban Küber-1/+1
2019-10-28Rollup merge of #65792 - Centril:split-syntax-2, r=petrochenkovMazdak Farrokhzad-6/+6
rustc, rustc_passes: reduce deps on rustc_expand Part of #65324. r? @petrochenkov
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-6/+6
This is done by moving some data definitions to syntax::expand.
2019-10-27Auto merge of #65541 - eddyb:spanned-inferred-outlives, r=nikomatsakisbors-0/+8
rustc: add `Span`s to `inferred_outlives_of` predicates. This would simplify #59789, and I suspect it has some potential in diagnostics (although we don't seem to use the predicate `Span`s much atm).
2019-10-25Rollup merge of #65074 - Rantanen:json-byte-pos, r=matkladMazdak Farrokhzad-1/+6
Fix the start/end byte positions in the compiler JSON output Track the changes made during normalization in the `SourceFile` and use this information to correct the `start_byte` and `end_byte` fields in the JSON output. This should ensure the start/end byte fields can be used to index the original file, even if Rust normalized the source code for parsing purposes. Both CRLF to LF and BOM removal are handled with this one. The rough plan was discussed with @matklad in rust-lang-nursery/rustfix#176 - although I ended up going with `u32` offset tracking so I wouldn't need to deal with `u32 + i32` arithmetics when applying the offset to the span byte positions. Fixes #65029
2019-10-24rustc_metadata: Minimize use of `Lrc` in crate storeVadim Petrochenkov-29/+30
Crate metadatas are still stored as `Lrc<CrateMetadata>` in `CStore` because crate store has to be cloneable due to `Resolver::clone_outputs`.
2019-10-24rustc_metadata: Remove `RwLock` from `CStore`Vadim Petrochenkov-25/+26
2019-10-24Turn crate store into a resolver outputVadim Petrochenkov-18/+31
2019-10-24rustc: Add a convenience alias for `dyn MetadataLoader + Sync`Vadim Petrochenkov-3/+3
2019-10-24rustc_metadata: Move some code aroundVadim Petrochenkov-96/+82
Plugin search doesn't need a crate loader, only crate locator
2019-10-24rustc_metadata: Remove unnecessary use of crate store in plugin loaderVadim Petrochenkov-63/+31
2019-10-24rustc_driver: Remove unnecessary use of crate storeVadim Petrochenkov-3/+3
2019-10-24rustc_typeck: compute better spans for inferred_outlives.Eduard-Mihai Burtescu-0/+8
2019-10-23Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddybMazdak Farrokhzad-6/+5
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-22rustc_metadata: use a table for impl_trait_ref.Eduard-Mihai Burtescu-6/+13
2019-10-22rustc_metadata: use a table for fn_sig.Eduard-Mihai Burtescu-60/+38
2019-10-22rustc_metadata: use a table for super_predicates.Eduard-Mihai Burtescu-27/+23
2019-10-21Fix the start/end byte positions in the compiler JSON outputMikko Rantanen-1/+6
2019-10-21Convert fields within `DefPathData` from `InternedString` to `Symbol`.Nicholas Nethercote-6/+5
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-21Rollup merge of #65460 - sinkuu:contains_insert, r=varkorYuki Okushi-3/+1
Clean up `contains()` `insert()` chains on HashSet They can be merged to a single `insert()` call, which may avoid double-hashing/lookup of the value.
2019-10-20Auto merge of #65497 - choller:master, r=tmiaskobors-1/+1
Avoid injecting sanitizer runtimes into staticlibs (#64629). This fixes the remaining issue in `creader.rs` and also fixes the expected test failure. I have explicitly turned the `$(CC)` call into a negative check with the `!` to ensure that this command is really failing (if it is not, then either the runtime is attached to the lib or the lib has not been instrumented and both would be an error). I've also borrowed `program.rs` and the additional `rustc` invocation from @tmiasko 's PR since he pointed out that using `-fsanitize=address` with `$(CC)` for linking could fail if the sanitizer runtimes on the system are incompatible. With this toolchain I was able to compile Firefox locally without any linker errors. I am still seeing races with Rust in TSan but I assume that is because I did not build with `-Z build-std`.
2019-10-18Rollup merge of #65535 - eddyb:sliced-predicates, r=nikomatsakisTyler Mandry-12/+10
rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole struct. While rebasing #59789 I noticed we can do this now. However, it doesn't help much without changing `inferred_outlives_of` to the same type, which I might try next.
2019-10-18rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole ↵Eduard-Mihai Burtescu-12/+10
struct.
2019-10-17Auto merge of #65495 - Centril:rollup-tguwjt5, r=Centrilbors-5/+6
Rollup of 8 pull requests Successful merges: - #65237 (Move debug_map assertions after check for err) - #65316 (make File::try_clone produce non-inheritable handles on Windows) - #65319 (InterpCx: make memory field public) - #65461 (Don't recommend ONCE_INIT in std::sync::Once) - #65465 (Move syntax::ext to a syntax_expand and refactor some attribute logic) - #65475 (add example for type_name) - #65478 (fmt::Write is about string slices, not byte slices) - #65486 (doc: fix typo in OsStrExt and OsStringExt) Failed merges: r? @ghost
2019-10-17Avoid injecting sanitizer runtimes into staticlibs (#64629).Christian Holler (:decoder)-1/+1
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-5/+6
2019-10-16Make use of the return value of `HashSet::insert`Shotaro Yamada-3/+1
2019-10-15rustc_metadata: address some review comments.Eduard-Mihai Burtescu-4/+20
2019-10-15rustc_metadata: don't use more space than needed, for each Table.Eduard-Mihai Burtescu-33/+21
2019-10-15rustc_metadata: replace Entry table with one table for each of its fields ↵Eduard-Mihai Burtescu-597/+469
(AoS -> SoA).
2019-10-15rustc_metadata: use decoder::Metadata instead of &[u8] for Lazy<Table<T>>::get.Eduard-Mihai Burtescu-9/+19
2019-10-15rustc_metadata: generalize Table<T> to hold T, not Lazy<T>, elements.Eduard-Mihai Burtescu-48/+78
2019-10-15rustc_metadata: add a helper macro for recording into PerDefTable's.Eduard-Mihai Burtescu-127/+118
2019-10-15rustc_metadata: split tables into an usize-keyed Table and a DefIndex-keyed ↵Eduard-Mihai Burtescu-37/+75
PerDefTable.
2019-10-15rustc_metadata: replace Lazy<[Table<T>]> with Lazy<Table<T>>.Eduard-Mihai Burtescu-18/+46
2019-10-15rustc_metadata: parametrize Table by element type.Eduard-Mihai Burtescu-38/+43
2019-10-15rustc_metadata: rename index::Index to table::Table.Eduard-Mihai Burtescu-23/+23
2019-10-15rustc_metadata: use 0 in index::Index to indicate missing entries.Eduard-Mihai Burtescu-13/+7
2019-10-15rustc_metadata: use NonZeroUsize for the position of a Lazy.Eduard-Mihai Burtescu-25/+38
2019-10-15rustc_metadata: remove now-redundant length from the start of the encoding.Eduard-Mihai Burtescu-7/+3
2019-10-14Rollup merge of #65365 - skinny121:const-args-metadata, r=varkorTyler Mandry-26/+6
Include const generic arguments in metadata Fixes #64707 Fixes #61624 Fixes #64730 r? @varkor
2019-10-15Include const generic arguments in metadata.ben-26/+6
2019-10-14rustc_metadata: Remove resolutions for extern crate items from `CStore`Vadim Petrochenkov-18/+1
Use a more traditional scheme with providing them as a resolver output