about summary refs log tree commit diff
path: root/src/librustc_metadata
AgeCommit message (Collapse)AuthorLines
2019-11-08hir::ItemKind::Fn: use hir::MethodSigMazdak Farrokhzad-5/+5
2019-11-07rustc_metadata: Rename `schema` to `rmeta`Vadim Petrochenkov-14/+14
And change `rmeta.rs` to `rmeta/mod.rs`
2019-11-07rustc_metadata: Privatize more entitiesVadim Petrochenkov-15/+14
2019-11-07rustc_metadata: Privatize everything in decoderVadim Petrochenkov-54/+54
2019-11-07rustc_metadata: Move cstore_impl into mod decoderVadim Petrochenkov-2/+6
2019-11-07rustc_metadata: Privatize everything in schema and schema/tableVadim Petrochenkov-82/+80
2019-11-07rustc_metadata: Move decoder/encoder/table into mod schemaVadim Petrochenkov-11/+12
2019-11-07Rollup merge of #59789 - eddyb:typeck-reverts, r=nikomatsakisMazdak Farrokhzad-41/+48
Revert two unapproved changes to rustc_typeck. There was a breakdown in process (https://github.com/rust-lang/rust/pull/59004#issuecomment-477600735, https://github.com/rust-lang/rust/pull/58894#discussion_r272795560) and two changes were made to `rustc_typeck`'s "collect" queries, for rustdoc, that were neither needed *nor* correct. I'm reverting them here, and will fix up rustdoc *somehow*, if necessary. cc @rust-lang/compiler How do we ensure this doesn't happen again? r? @nikomatsakis or @oli-obk
2019-11-06Make doc comments cheaper with `AttrKind`.Nicholas Nethercote-1/+1
`AttrKind` is a new type with two variants, `Normal` and `DocComment`. It's a big performance win (over 10% in some cases) because `DocComment` lets doc comments (which are common) be represented very cheaply. `Attribute` gets some new helper methods to ease the transition: - `has_name()`: check if the attribute name matches a single `Symbol`; for `DocComment` variants it succeeds if the symbol is `sym::doc`. - `is_doc_comment()`: check if it has a `DocComment` kind. - `{get,unwrap}_normal_item()`: extract the item from a `Normal` variant; panic otherwise. Fixes #60935.
2019-11-06Remove unnecessary `Deref` impl for `Attribute`.Nicholas Nethercote-1/+1
This kind of thing just makes the code harder to read.
2019-11-06Rollup merge of #66086 - RalfJung:smallvec, r=nagisaMazdak Farrokhzad-1/+1
bump smallvec to 1.0 This includes https://github.com/servo/rust-smallvec/pull/162, fixing an unsoundness in smallvec. See https://github.com/servo/rust-smallvec/pull/175 for the 1.0 release announcement. Cc @mbrubeck @emilio
2019-11-06Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-more, ↵Mazdak Farrokhzad-2/+2
r=estebank Rename `LocalInternedString` and more This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses. r? @estebank
2019-11-06Rollup merge of #66027 - Mark-Simulacrum:panic-handler-query, r=alexcrichtonMazdak Farrokhzad-2/+1
Move has_panic_handler to query Moves us off of a global Once instead re-querying the lang item each time. The conditions on when we set it to true change a little (previously we'd make sure a few more lang items were `Some`) but I think they in practice don't matter, we won't compile later on if we don't have them.
2019-11-04bump smallvec to 1.0Ralf Jung-1/+1
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-03rustc_metadata: don't encode an empty slice for inferred_outlives.Eduard-Mihai Burtescu-3/+8
2019-11-03rustc_metadata: replace predicates_defined_on with explicit_predicates_of ↵Eduard-Mihai Burtescu-19/+50
and inferred_outlives_of.
2019-11-03rustc_metadata: remove predicates_of and rely on predicates_defined_on alone.Eduard-Mihai Burtescu-38/+9
2019-11-01Move has_panic_handler to queryMark Rousskov-2/+1
2019-11-02Simplify various `Symbol` use points.Nicholas Nethercote-2/+2
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch of unnecessary sigils.
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