New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to use embed_migrations without macro_use does not compile on Rust 1.30 #1894

Closed
vmalloc opened this Issue Oct 25, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@vmalloc
Contributor

vmalloc commented Oct 25, 2018

In Rust 1.30 (pre-release build), #[macro_use] is no longer required when importing macros by name. However, it is unclear how to make this work with embed_migrations!, since the following doesn't compile:

use diesel_migrations::embed_migrations;
...
embed_migrations!();
...

The above fails to compile with:

error: cannot find derive macro `EmbedMigrations` in this scope

It is possible that I'm missing something - if so I would love to learn how to do this correctly.

Thanks in advance!

Versions

  • Rust: 1.30
  • Diesel: 1.3.3

@vmalloc vmalloc changed the title from Attempting to use embed_migrations fails on Rust 1.30 to Attempting to use embed_migrations without macro_use fails on Rust 1.30 Oct 25, 2018

@vmalloc vmalloc changed the title from Attempting to use embed_migrations without macro_use fails on Rust 1.30 to Attempting to use embed_migrations without macro_use does not compile on Rust 1.30 Oct 25, 2018

@sgrif

This comment has been minimized.

Member

sgrif commented Oct 25, 2018

You will need to continue to use #[macro_use] for the time being.

@sgrif sgrif closed this Oct 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment