Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/derives/deriving-meta-unknown-trait.rs

7 lines
157 B
Rust
Raw Normal View History

Make #[derive(Anything)] into sugar for #[derive_Anything] This is a hack, but I don't think we can do much better as long as `derive` is running at the syntax expansion phase. If the custom_derive feature gate is enabled, this works with user-defined traits and syntax extensions. Without the gate, you can't use e.g. #[derive_Clone] directly, so this does not change the stable language. This commit also cleans up the deriving code somewhat, and forbids some previously-meaningless attribute syntax. For this reason it's technically a [breaking-change]
2015-03-06 13:15:54 -08:00
#[derive(Eqr)]
Move derive macro expansion into the MacroExpander This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver.
2017-02-01 21:03:09 +10:30
//~^ ERROR cannot find derive macro `Eqr` in this scope
Update tests
2020-01-08 20:02:10 +03:00
//~| ERROR cannot find derive macro `Eqr` in this scope
syntax: implement #[deriving] meta-attribute
2013-03-11 16:47:23 -04:00
struct Foo;
pub fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3671ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API