about summary refs log tree commit diff
path: root/src/librustc_allocator
AgeCommit message (Collapse)AuthorLines
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-1/+0
2018-07-11Deny bare trait objects in in src/librustc_allocatorljedrz-3/+4
2018-06-27Implement `#[macro_export(local_inner_macros)]`Vadim Petrochenkov-0/+1
2018-06-24used debug, not infomark-3/+3
2018-06-24enable fold_macMark Mansi-1/+6
2018-06-24Prohibit global_allocator in submodules for nowMark Mansi-40/+81
- we need to figure out hygiene first - change the test to check that the prohibition works with a good error msg - leaves some comments and debugging code - leaves some of our supposed fixes
2018-06-24Attempt to fix hygiene for global_allocatorMark Mansi-20/+27
2018-06-23hygiene: Merge `NameAndSpan` into `ExpnInfo`Vadim Petrochenkov-8/+6
2018-06-21Parse async fn header.Without Boats-6/+6
This is gated on edition 2018 & the `async_await` feature gate. The parser will accept `async fn` and `async unsafe fn` as fn items. Along the same lines as `const fn`, only `async unsafe fn` is permitted, not `unsafe async fn`.The parser will not accept `async` functions as trait methods. To do a little code clean up, four fields of the function type struct have been merged into the new `FnHeader` struct: constness, asyncness, unsafety, and ABI. Also, a small bug in HIR printing is fixed: it previously printed `const unsafe fn` as `unsafe const fn`, which is grammatically incorrect.
2018-06-11Remove alloc::Opaque and use *mut u8 as pointer type for GlobalAllocMike Hommey-14/+1
2018-05-17Add edition to expansion infoVadim Petrochenkov-1/+2
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+3
2018-04-22Remove unused AllocatorTy::BangSteven Fackler-4/+1
2018-04-22Replace GlobalAlloc::oom with a lang itemSteven Fackler-5/+0
2018-04-17Run rustfmtMark Mansi-69/+79
2018-04-12Rename alloc::Void to alloc::OpaqueSimon Sapin-6/+6
2018-04-12Restore Global.oom() functionalitySimon Sapin-0/+11
… now that #[global_allocator] does not define a symbol for it
2018-04-12Use the GlobalAlloc trait for #[global_allocator]Simon Sapin-289/+33
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-2/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-03-22Use FunctionRetTy::Default rather than an explicit TyKind::Infer for ↵varkor-1/+1
lambda-building This prevents explicit `-> _` return type annotations for closures generated by `lambda`.
2018-03-17Rename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`Vadim Petrochenkov-1/+1
2018-02-18Fix up tests and typosSeiichi Uchida-1/+5
2018-02-18Replace dummy spans with empty spansSeiichi Uchida-2/+2
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-2/+2
2017-11-04rustc: Handle some libstd symbole exports betterAlex Crichton-0/+4
Right now symbol exports, particularly in a cdylib, are handled by assuming that `pub extern` combined with `#[no_mangle]` means "export this". This isn't actually what we want for some symbols that the standard library uses to implement itself, for example symbols related to allocation. Additionally other special symbols like `rust_eh_personallity` have no need to be exported from cdylib crate types (only needed in dylib crate types). This commit updates how rustc handles these special symbols by adding to the hardcoded logic of symbols like `rust_eh_personallity` but also adding a new attribute, `#[rustc_std_internal_symbol]`, which forces the export level to be considered the same as all other Rust functions instead of looking like a C function. The eventual goal here is to prevent functions like `__rdl_alloc` from showing up as part of a Rust cdylib as it's just an internal implementation detail. This then further allows such symbols to get gc'd by the linker when creating a cdylib.
2017-08-30Make fields of `Span` privateVadim Petrochenkov-4/+1
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-11/+2
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-4/+4
Like #43008 (f668999), but _much more aggressive_.
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-0/+1
2017-08-01Fixed all unnecessary muts in language coreIsaac van Bakel-2/+2
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-0/+614
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389