about summary refs log tree commit diff
path: root/src/librustc_middle/middle
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-1678/+0
2020-08-27Abort when catch_unwind catches a foreign exceptionAmanieu d'Antras-1/+3
2020-08-24hir: consistent use and naming of lang itemsDavid Wood-1/+1
This commit adjusts the naming of various lang items so that they are consistent and don't include prefixes containing the target or "LangItem". In addition, lang item variants are no longer exported from the `lang_items` module. Signed-off-by: David Wood <david@davidtw.co>
2020-08-22Lazy decoding of DefPathTable from crate metadata (non-incremental case)Aaron Hill-2/+3
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-3/+3
2020-08-14Fix tests and address review commentsMatthew Jasper-3/+3
2020-08-14Rework `rustc_serialize`Matthew Jasper-18/+18
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-1/+1
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-08-03Rollup merge of #75054 - cjgillot:rename-depkind, r=petrochenkovYuki Okushi-4/+4
Rename rustc_middle::cstore::DepKind to CrateDepKind It is ambiguous with DepGraph's own DepKind.
2020-08-02Rename rustc_middle::cstore::DepKind to DependencyKind.Camille GILLOT-4/+4
2020-07-26report kind of deprecated item in messageAndy Russell-7/+13
This is important for fields, which are incorrectly referred to as "items".
2020-07-20Migrate rustc_depr uses to use deprecation attributeMark Rousskov-30/+41
This should not be a change in behavior.
2020-07-15Change `SymbolName::name` to a `&str`.Nicholas Nethercote-2/+2
This eliminates a bunch of `Symbol::intern()` and `Symbol::as_str()` calls, which is good, because they require locking the interner. Note that the unsafety in `from_cycle_error()` is identical to the unsafety on other adjacent impls.
2020-07-10Avoid "whitelist"Tamir Duberstein-7/+6
Other terms are more inclusive and precise.
2020-06-14Diagnose use of incompatible sanitizersTomasz Miąsko-10/+7
Emit an error when incompatible sanitizer are configured through command line options. Previously the last one configured prevailed and others were silently ignored. Additionally use a set to represent configured sanitizers, making it possible to enable multiple sanitizers at once. At least in principle, since currently all of them are considered to be incompatible with others.
2020-05-28standardize limit comparisons with `Limit` typeDavid Wood-4/+4
This commit introduces a `Limit` type which is used to ensure that all comparisons against limits within the compiler are consistent (which can result in ICEs if they aren't). Signed-off-by: David Wood <david@davidtw.co>
2020-05-24Auto merge of #72362 - matthewjasper:remove-rescope, r=nikomatsakisbors-158/+2
Remove ReScope `ReScope` is unnecessary now that AST borrowck is gone and we're erasing the results of region inference in function bodies. This removes about as much of the old regionck code as possible without having to enable NLL fully. cc #68261 r? @nikomatsakis
2020-05-22Use `OnceCell` instead of `Once`Dylan MacKenzie-4/+4
2020-05-22Remove dead ScopeTree codeMatthew Jasper-158/+2
2020-05-22Rollup merge of #72309 - petrochenkov:linkunspec, r=matthewjasperRalf Jung-5/+3
Some renaming and minor refactoring for `NativeLibraryKind`
2020-05-20Rename some types describing native librariesVadim Petrochenkov-5/+3
NativeLibrary(Kind) -> NativeLib(Kind) NativeStatic -> StaticBundle NativeStaticNobundle -> StaticNoBundle NativeFramework -> Framework NativeRawDylib -> RawDylib NativeUnknown -> Unspecified
2020-05-20Implement `#[ffi_const]` and `#[ffi_pure]` function attributesMatthias Schiffer-0/+6
Introduce function attribute corresponding to the `const`/`pure` attributes supported by GCC, clang and other compilers. Based on the work of gnzlbg <gonzalobg88@gmail.com>.
2020-05-14Minor fixes to commentsJOE1994-2/+2
* In 'src/librustc_ast_passes/node_count.rs' * typo fix ('rought' -> 'rough') * In 'src/librustc_middle/middle/region.rs', * fixed broken link to 'rustc-dev-guide' * typo fix ('aluded' -> 'alluded') Thank you for reviewing this PR :)
2020-05-02cleanup: `config::CrateType` -> `CrateType`Vadim Petrochenkov-2/+2
2020-04-30Rollup merge of #71449 - ecstatic-morse:free-region-cleanup, r=Mark-SimulacrumDylan DPC-45/+0
Move `{Free,}RegionRelations` and `FreeRegionMap` to `rustc_infer` ...and out of `rustc_middle`. This is to further #65031, albeit in a very minor way r? @Mark-Simulacrum
2020-04-24Remove `Option` from the return type of `def_kind`.Eduard-Mihai Burtescu-1/+1
2020-04-23Modify `as_local_hir_id` to return a bare `HirId`marmeladema-2/+2
2020-04-23Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId`marmeladema-2/+2
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-1/+1
2020-04-22Move `{Free,}RegionRelations` and `FreeRegionMap` out of `rustc_middle`Dylan MacKenzie-45/+0
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-1/+1
2020-04-14Remove `DUMMY_HIR_ID`marmeladema-14/+2
2020-04-12Remove usage of `DUMMY_HIR_ID` in `Scope::hir_id`marmeladema-9/+8
2020-04-02direct imports for langitem stuffMazdak Farrokhzad-5/+1
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-2/+2
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-0/+1876