about summary refs log tree commit diff
path: root/src/libcore/macros
AgeCommit message (Collapse)AuthorLines
2020-04-29Update src/libcore/macros/mod.rsDavid Freese-1/+1
Co-Authored-By: kennytm <kennytm@gmail.com>
2020-04-29Add clarification on std::cfg macro docs v. #[cfg] attributeDavid Freese-0/+4
The wording was discussed, to a limited degree in #71679. This tries to address some confusion I as well as someone else had independently when looking at this macro. Fixes #71679
2020-04-27Update link to unstable book for llvm_asm macroZach Reizner-1/+1
2020-04-25Bump rustfmt to most recently shippedMark Rousskov-1/+1
2020-04-25Bump bootstrap compilerMark Rousskov-45/+1
2020-04-15Deprecate the asm! macroAmanieu d'Antras-3/+7
2020-04-15Update stdarch submodule to use llvm_asm! instead of asm!Amanieu d'Antras-0/+4
2020-04-02Expand on platform details of `include_xxx` macrosRoberto Vidal-5/+11
2020-03-26Rename asm! to llvm_asm!Amanieu d'Antras-1/+42
asm! is left as a wrapper around llvm_asm! to maintain compatibility.
2020-03-17Rollup merge of #69870 - petrochenkov:cfgacc, r=matthewjasperMazdak Farrokhzad-0/+12
expand: Implement something similar to `#[cfg(accessible(path))]` cc https://github.com/rust-lang/rust/issues/64797 The feature is implemented as a `#[cfg_accessible(path)]` attribute macro rather than as `#[cfg(accessible(path))]` because it needs to wait until `path` becomes resolvable, and `cfg` cannot wait, but macros can wait. Later we can think about desugaring or not desugaring `#[cfg(accessible(path))]` into `#[cfg_accessible(path)]`. This implementation is also incomplete in the sense that it never returns "false" from `cfg_accessible(path)`, it requires some tweaks to resolve, which is not quite ready to answer queries like this during early resolution. However, the most important part of this PR is not `cfg_accessible` itself, but expansion infrastructure for retrying expansions. Before this PR we could say "we cannot resolve this macro path, let's try it later", with this PR we can say "we cannot expand this macro, let's try it later" as well. This is a pre-requisite for - turning `#[derive(...)]` into a regular attribute macro, - properly supporting eager expansion for macros that cannot yet be resolved like ``` fn main() { println!(not_available_yet!()); } macro_rules! make_available { () => { #[macro_export] macro_rules! not_available_yet { () => { "Hello world!" } }} } make_available!(); ```
2020-03-10also make panic_fmt track_callerRalf Jung-0/+21
2020-03-10builtin_macros: Add attribute macro `#[cfg_accessible(path)]`Vadim Petrochenkov-0/+12
2020-01-06macros: typo fixLucas Pardue-1/+1
spotted while reviewing the todo!macro docs
2020-01-04core and std macros and panic internals use panic::Location::caller.Adam Perry-9/+3
2019-12-27Stabilize the `matches!` macroSimon Sapin-3/+1
Fixes https://github.com/rust-lang/rust/issues/65721 FCP: https://github.com/rust-lang/rust/issues/65721#issuecomment-569118119
2019-12-24Auto merge of #67445 - llogiq:todo, r=dtolnaybors-20/+25
Differentiate todo! and unimplemented! This updates the panic message and docs to make it clear that `todo!` is for unfinished code and `unimplemented!` is for partial trait or enum impls. r? @Centril
2019-12-24Differentiate todo! and unimplemented!Andre Bogus-20/+25
2019-12-23Rollup merge of #67466 - oli-obk:const_intrinsic, r=CentrilMazdak Farrokhzad-0/+1
Require const stability attributes on intrinsics to be able to use them in constant contexts r? @Centril finally fixes #61495 cc @RalfJung
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-1/+1
2019-12-20Require const stability attributes on intrinsics to be able to use them in ↵Oliver Scherer-0/+1
constant contexts
2019-12-19Correct the todo! stabilization versionJakub Kądziołka-1/+1
2019-11-26Format libcore with rustfmtDavid Tolnay-64/+141
This commit applies rustfmt with default settings to files in src/libcore *that are not involved in any currently open PR* to minimize merge conflicts. The list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in `outstanding_files`, the relevant commands were: $ find src/libcore -name '*.rs' | xargs rustfmt --edition=2018 $ rg libcore outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libcore.
2019-11-14Centralize panic macro documentationChris Gregory-0/+1373