about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-27 08:17:51 +0200
committerGitHub <noreply@github.com>2019-08-27 08:17:51 +0200
commit0da7098116256d1e652284db4aa3815ff26105ed (patch)
tree5abcd06ff7be32585dfc8b9d9c183e1bcc4966e9 /src/libstd/sys/unix/stack_overflow.rs
parent68597c764120b31b066f17d4f07de0d0a4384a0b (diff)
parentc476b55e528ce854b6198de5bcfdd20b08440c9d (diff)
downloadrust-0da7098116256d1e652284db4aa3815ff26105ed.tar.gz
rust-0da7098116256d1e652284db4aa3815ff26105ed.zip
Rollup merge of #63761 - petrochenkov:procattrs, r=eddyb
Propagate spans and attributes from proc macro definitions

Thanks to https://github.com/rust-lang/rust/pull/63269 we now have spans and attributes from proc macro definitions available in metadata.

However, that PR didn't actually put them into use! This PR finishes that work.

Attributes `rustc_macro_transparency`, `allow_internal_unstable`, `allow_internal_unsafe`, `local_inner_macros`, `rustc_builtin_macro`, `stable`, `unstable`, `rustc_deprecated`, `deprecated` now have effect when applied to proc macro definition functions.
From those attributes only `deprecated` is both stable and supposed to be used in new code.
(`#![staged_api]` still cannot be used in proc macro crates for unrelated reasons though.)

`Span::def_site` from the proc macro API now returns the correct location of the proc macro definition.

Also, I made a mistake in https://github.com/rust-lang/rust/pull/63269#discussion_r312702919, loaded proc macros didn't actually use the resolver cache.
This PR fixes the caching issue, now proc macros go through the `Resolver::macro_map` cache as well.

(Also, the first commit turns `proc_macro::quote` into a regular built-in macro to reduce the number of places where `SyntaxExtension`s need to be manually created.)
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions