-
Notifications
You must be signed in to change notification settings - Fork 13k
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
cargo fix --edition failure (probably macros related) #59065
Comments
discussed in T-compiler meeting. P-high. still needs assignment of someone to investigate though. |
@dignifiedquire do you have any idea if this is a regression -- i.e., did it work with some older nightly builds? Is your crate nightly only? |
If it is, it'd be great to try and bisect it. |
here is a reduced test case, built by just taking the
|
(I also don't know how we should actually fix this. I assume the problem is arising because |
(And in cases its not obvious, you can use any trait, e.g. |
one other note: if the macro is unused in the crate (or if for some reason changing This may be even worse than the error given above. (But again, I am not sure how best to address this. Hypothetically there could be macros out there that do use |
I suppose the most direct thing to do is to try to fix this (play): #![warn(keyword_idents)]
pub trait Trait { }
impl Trait for &'static str { }
macro_rules! m { () => { dyn Trait } }
fn foo() -> Box<m!()> { Box::new("from foo") }
fn bar() -> Box<dyn Trait> { Box::new("from bar") }
fn main() { let _ = (foo(), bar()); } which when compiled under 2015 edition currently emits this diagnostic:
cc #49716 |
(Hmm that lint points to #49716 but I think that tracking issue is solely about linting the |
Ah this issue was known about back in November, see #56327 ! |
Tried converting my project using
cargo fix --edition
, but go the following output.rustc 1.34.0-nightly (aadbc459b 2019-02-23)
Full log: https://gist.github.com/dignifiedquire/d75bb480b0f51645dcb74b95bb88c10d
The text was updated successfully, but these errors were encountered: