]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #80850 - m-ou-se:rustc-builtin-macro-name, r=petrochenkov
authorYuki Okushi <huyuumi.dev@gmail.com>
Sun, 10 Jan 2021 07:56:05 +0000 (16:56 +0900)
committerGitHub <noreply@github.com>
Sun, 10 Jan 2021 07:56:05 +0000 (16:56 +0900)
commit3e735c6e933d82c52ab7202617fc8d009e696956
tree8a3f99624f734d16b2405f640b0ba183236f8c7d
parent5acac4c9797b701285a827bb734416dc3a31d78d
parentb293bbaba007659495025b7db945684bb1fa5b71
Rollup merge of #80850 - m-ou-se:rustc-builtin-macro-name, r=petrochenkov

Allow #[rustc_builtin_macro = "name"]

This adds the option of specifying the name of a builtin macro in the `#[rustc_builtin_macro]` attribute: `#[rustc_builtin_macro = "name"]`.

This makes it possible to have both `std::panic!` and `core::panic!` as a builtin macro, by using different builtin macro names for each. This is needed to implement the edition-specific behaviour of the panic macros of RFC 3007.

Also removes `SyntaxExtension::is_derive_copy`, as the macro name (e.g. `sym::Copy`) is now tracked and provides that information directly.

r? ``@petrochenkov``
compiler/rustc_resolve/src/lib.rs