summary refs log tree commit diff
path: root/src/librustc_metadata
AgeCommit message (Collapse)AuthorLines
2019-05-20Rollup merge of #60942 - bjorn3:metadata_loader_refactor, r=michaelwoeristerMazdak Farrokhzad-6/+5
Misc changes to rustc_metadata
2019-05-18Misc changes to rustc_metadatabjorn3-6/+5
2019-05-18Declare DefIndex with the newtype_index macroFabian Drinck-4/+4
2019-05-13Return a `Symbol` from `name_or_empty` functions.Nicholas Nethercote-2/+1
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-8/+8
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-26/+27
2019-05-09cleanup: Remove `DefIndexAddressSpace`Vadim Petrochenkov-29/+13
2019-05-08Auto merge of #60378 - froydnj:apple-target-modifications, r=michaelwoeristerbors-2/+2
conditionally modify darwin targets to macosx targets with versions We need this behavior so that Rust LLVM IR objects match the target triple for Clang LLVM IR objects. This matching then convinces the linker that yes, you really can do cross-language LTO with objects from different compilers. The newly-added tests seem to pass locally on x86_64-unknown-linux-gnu. I haven't done a full test run or tried the new compiler in an cross-language LTO setup yet.
2019-05-07choose a more specific LLVM target on OS X when necessaryNathan Froyd-2/+2
This behavior matches clang's behavior, and makes cross-language LTO possible. Fixes #60235.
2019-05-06Auto merge of #60337 - fabric-and-ink:hiridification, r=Zoxcbors-2/+2
A bit of HirIdification A small contribution to #50928.
2019-05-04Replace `NodeId` variant of `read`Fabian Drinck-2/+2
2019-05-04rustc: rename DefPathData::{MacroDef,LifetimeParam} to {Macro,Lifetime}Ns.Eduard-Mihai Burtescu-1/+1
2019-05-04rustc: collapse relevant DefPathData variants into TypeNs.Eduard-Mihai Burtescu-1/+6
2019-05-03rustc: rename hir::def::Def to Res (short for "resolution").Eduard-Mihai Burtescu-14/+14
2019-05-03rustc: use DefKind instead of Def, where possible.Eduard-Mihai Burtescu-37/+36
2019-05-03rustc: factor most DefId-containing variants out of Def and into DefKind.Eduard-Mihai Burtescu-29/+35
2019-05-01Rollup merge of #60287 - Zoxc:the-arena-variances_of, r=eddybMazdak Farrokhzad-1/+1
Use references for variances_of Based on https://github.com/rust-lang/rust/pull/60280. cc @varkor r? @eddyb
2019-04-28Fix lint findings in librustc_metadataflip1995-5/+5
2019-04-27Auto merge of #59887 - eddyb:safer-metadata, r=Zoxcbors-45/+80
rustc_metadata: more safely read/write the index positions. This is a small part of a larger refactor, that I want to benchmark independently. The final code would be even cleaner than this, so this is sort of an "worst case" test.
2019-04-25Update variances_ofJohn Kåre Alsaker-1/+1
2019-04-25Update mir_const_qualifJohn Kåre Alsaker-1/+1
2019-04-21AST/HIR: Use `Mutability` instead of bool in foreign staticsVadim Petrochenkov-2/+2
2019-04-21Remove mutability from `Def::Static`Vadim Petrochenkov-2/+2
2019-04-21Introduce query `static_mutability`Vadim Petrochenkov-0/+11
2019-04-18Auto merge of #60025 - JohnTitor:rename-files, r=petrochenkovbors-1/+1
Rename files about error codes fixes #60017 This PR will be failed in tidy. <details> <summary>The log is here:</summary> ``` tidy check tidy error: duplicate error code: 411 tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:83: __diagnostic_used!(E0411); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:84: err.code(DiagnosticId::Error("E0411".to_owned())); tidy error: duplicate error code: 424 tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:90: debug!("smart_resolve_path_fragment: E0424, source={:?}", source); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:92: __diagnostic_used!(E0424); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:93: err.code(DiagnosticId::Error("E0424".to_owned())); some tidy checks failed ``` </details> I'd like to fix this but I don't know what to do. I will work on later. Please let me know if you have any solutions. r? @petrochenkov
2019-04-17Rename modulesYuki OKUSHI-1/+1
2019-04-17Rename diagnostics to error_codesYuki OKUSHI-0/+0
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-16rustc_metadata: more safely read/write the index positions.Eduard-Mihai Burtescu-45/+80
2019-04-14Auto merge of #59335 - Aaron1011:fix/extern-priv-final, r=Aaron1011bors-10/+28
Properly parse '--extern-private' with name and path It turns out that https://github.com/rust-lang/rust/pull/57586 didn't properly parse `--extern-private name=path`. This PR properly implements the `--extern-private` option. I've added a new `extern-private` option to `compiletest`, which causes an `--extern-private` option to be passed to the compiler with the proper path. Part of https://github.com/rust-lang/rust/issues/44663
2019-04-14Refactor structure of ExternEntryAaron Hill-18/+8
2019-04-14Improve formattingAaron Hill-1/+0
2019-04-14Rollup merge of #59936 - petrochenkov:confict, r=davidtwcoMazdak Farrokhzad-1/+12
Fix cross-crate visibility of fictive variant constructors After merging https://github.com/rust-lang/rust/pull/59376 I realized that the code in the decoder wasn't entirely correct - we "decoded" fictive variant constructors with their variant's visibility, which could be public, rather than demoted to `pub(crate)`. Fictive constructors are not directly usable in expression/patterns, but the effect still can be observed with imports. r? @davidtwco
2019-04-14Address review commentsVadim Petrochenkov-8/+10
2019-04-14Fix cross-crate visibility of fictive variant constructorsVadim Petrochenkov-1/+10
2019-04-14HirIdify hir::Defljedrz-4/+9
2019-04-14Combine 'Extern' and 'ExternPrivate'Aaron Hill-7/+8
2019-04-14Properly parse '--extern-private' with name and pathAaron Hill-5/+33
2019-04-11Clean up handling of -Zpgo-gen commandline option.Michael Woerister-1/+1
2019-04-03Deny internal lints on non conflicting cratesflip1995-0/+1
- libarena - librustc_allocator - librustc_borrowck - librustc_codegen_ssa - librustc_codegen_utils - librustc_driver - librustc_errors - librustc_incremental - librustc_metadata - librustc_passes - librustc_privacy - librustc_resolve - librustc_save_analysis - librustc_target - librustc_traits - libsyntax - libsyntax_ext - libsyntax_pos
2019-03-30Rollup merge of #59376 - davidtwco:finally-rfc-2008-variants, ↵Mazdak Farrokhzad-2/+7
r=petrochenkov,QuietMisdreavus RFC 2008: Enum Variants Part of #44109. See [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rfc-2008/near/132663140) for previous discussion. r? @petrochenkov cc @nikomatsakis
2019-03-28Implement `#[non_exhaustive]` on variants.David Wood-2/+7
This commit removes the check that disallows the `#[non_exhaustive]` attribute from being placed on enum variants and removes the associated tests. Further, this commit lowers the visibility of enum variant constructors when the variant is marked as non-exhaustive.
2019-03-28Rollup merge of #59413 - Zoxc:hirid, r=oli-obkMazdak Farrokhzad-1/+1
HirIdify hir::ItemId Version of https://github.com/rust-lang/rust/pull/59092. r? @oli-obk
2019-03-28Rollup merge of #58581 - varkor:const-generics-encoder-refactor, r=eddybMazdak Farrokhzad-42/+39
Refactor generic parameter encoder functions Addresses https://github.com/rust-lang/rust/pull/58503#discussion_r257488950. r? @eddyb
2019-03-25hir: replace NodeId with HirId in ItemIdljedrz-1/+1
2019-03-24Re-order fields in `Def::Ctor`.David Wood-3/+2
This commit moves the `DefId` field of `Def::Ctor` to be the first field.
2019-03-24Move `CtorOf` into `hir::def`.David Wood-3/+3
This commit moves the definition of `CtorOf` from `rustc::hir` to `rustc::hir::def` and adds imports wherever it is used.
2019-03-24Revert changes to creation of fictive constructors for struct variantsVadim Petrochenkov-8/+10
2019-03-24Merge `DefPathData::VariantCtor` and `DefPathData::StructCtor`Vadim Petrochenkov-2/+2
2019-03-24Remove `VariantDef::parent_did`Vadim Petrochenkov-12/+9