about summary refs log tree commit diff
path: root/library/std/src/prelude/v1.rs
AgeCommit message (Collapse)AuthorLines
2023-04-27correct `std::prelude` commentKaDiWa-4/+4
2023-04-25Revert "Remove #[alloc_error_handler] from the compiler and library"Matthias Krüger-1/+3
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
2023-04-16Remove #[alloc_error_handler] from the compiler and libraryAmanieu d'Antras-3/+1
2022-12-28Update bootstrap cfgPietro Albini-6/+3
2022-12-01Gate macros behind `#[cfg(not(bootstrap))]`nils-0/+1
Co-authored-by: Takayuki Maeda <takoyaki0316@gmail.com>
2022-11-19Add unstable `type_ascribe` macroNilstrieb-0/+8
This macro serves as a placeholder for future type ascription syntax to make sure that the semantic implementation keeps working.
2022-11-12Rollup merge of #102049 - fee1-dead-contrib:derive_const, r=oli-obkDylan DPC-0/+4
Add the `#[derive_const]` attribute Closes #102371. This is a minimal patchset for the attribute to work. There are no restrictions on what traits this attribute applies to. r? `````@oli-obk`````
2022-10-31Rewrite implementation of `#[alloc_error_handler]`Amanieu d'Antras-0/+3
The new implementation doesn't use weak lang items and instead changes `#[alloc_error_handler]` to an attribute macro just like `#[global_allocator]`. The attribute will generate the `__rg_oom` function which is called by the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom` function is defined in any crate then the compiler shim will call `__rdl_oom` in the alloc crate which will simply panic. This also fixes link errors with `-C link-dead-code` with `default_alloc_error_handler`: `__rg_oom` was previously defined in the alloc crate and would attempt to reference the `oom` lang item, even if it didn't exist. This worked as long as `__rg_oom` was excluded from linking since it was not called. This is a prerequisite for the stabilization of `default_alloc_error_handler` (#102318).
2022-09-20Add the `#[derive_const]` attributeDeadbeef-0/+4
2022-05-27Finish bumping stage0Mark Rousskov-4/+0
It looks like the last time had left some remaining cfg's -- which made me think that the stage0 bump was actually successful. This brings us to a released 1.62 beta though.
2022-04-14library: Move `CStr` to libcore, and `CString` to liballocVadim Petrochenkov-0/+4
2022-01-28update cfg(bootstrap)sPietro Albini-1/+0
2022-01-12Remove deprecated LLVM-style inline assemblyTomasz Miąsko-3/+2
2022-01-03Make the documentation of builtin macro attributes accessibleDaniel Henry-Mantilla-11/+8
- Do not `#[doc(hidden)]` the `#[derive]` macro attribute - Add a link to the reference section to `derive`'s inherent docs - Do the same for `#[test]` and `#[global_allocator]` - Fix `GlobalAlloc` link (why is it on `core` and not `alloc`?) - Try `no_inline`-ing the `std` reexports from `core` - Revert "Try `no_inline`-ing the `std` reexports from `core`" - Address PR review - Also document the unstable macros
2021-12-12Stabilize asm! and global_asm!Amanieu d'Antras-16/+0
They are also removed from the prelude as per the decision in https://github.com/rust-lang/rust/issues/87228. stdarch and compiler-builtins are updated to work with the new, stable asm! and global_asm! macros.
2021-12-06Implement concat_bytes!Smitty-0/+9
The tracking issue for this is #87555.
2021-07-18Move asm! and global_asm! to core::archbstrie-4/+20
2021-04-04Bump cfgsMark Rousskov-2/+0
2021-03-15Deprecate RustcEncodable and RustcDecodable.Mara Bos-1/+1
2021-03-10Rollup merge of #82217 - m-ou-se:edition-prelude, r=nikomatsakisDylan DPC-1/+1
Edition-specific preludes This changes `{std,core}::prelude` to export edition-specific preludes under `rust_2015`, `rust_2018` and `rust_2021`. (As suggested in https://github.com/rust-lang/rust/issues/51418#issuecomment-395630382.) For now they all just re-export `v1::*`, but this allows us to add things to the 2021edition prelude soon. This also changes the compiler to make the automatically injected prelude import dependent on the selected edition. cc `@rust-lang/libs` `@djc`
2021-03-06Implement built-in attribute macro `#[cfg_eval]`Vadim Petrochenkov-0/+9
2021-02-25Use intra-doc links.Mara-1/+1
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-02-07expand/resolve: Turn `#[derive]` into a regular macro attributeVadim Petrochenkov-0/+5
2021-01-06Style nit: replace `for_each` & `return` with `for` & `continue`Daniel Henry-Mantilla-4/+4
Co-Authored-By: Joshua Nelson <jyn514@gmail.com>
2020-07-27mv std libs to library/mark-0/+81