Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upResolution of macro derive behavior has been modified on 1.30 #1829
Comments
dereckson
changed the title from
Resolution of macro derive behavior has been modified on nightly
to
Resolution of macro derive behavior has been modified on 1.30
Aug 28, 2018
This comment has been minimized.
|
This has been fixed by #1787 |
Eijebong
closed this
Aug 28, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dereckson commentedAug 28, 2018
Setup
Versions
Problem Description
In the past, the proc_macro! expansion could refer to items, without importing them explicitly again in the source file using this macro.
This behavior is being phasing out and triggers warnings at build time.
See rust-lang/rust#50504
And more explicitly rust-lang/rust#50504 (comment)
Steps to reproduce
diesel migration run#[derive(Queryable,Debug)].Output
For table!
For the models
Workaround
Invoke cargo or rustc with the
RUSTFLAGS="-Aproc-macro-derive-resolution-fallback"environment variable.For example,
RUSTFLAGS="-Aproc-macro-derive-resolution-fallback" cargo checkYou can also create a
.cargo/configfile at project level with the relevant flag:Checklist
closed if this is not the case)
It can't, as it's an upcoming behavior, but perhaps it's pertinent to track it, as it's mature code ready to land to stable at 1.30 release date (currently Oct 25 2018), and to document a workaround.
If not, we can probably close it and reopen at 1.30 release.