-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rental future compat warning #84428
Comments
This causes problems on crates that use rental too, which is the case of Firefox (and since things are vendored in Firefox, anyone building Firefox doesn't count towards the rental download counts). |
I've only glossed over the message that rental is no longer maintained:
So I guess instead of attempting to contact the author, we should maybe follow the wishes of the maintainer, create a fork, and put any fixes/changes there. There are also a bunch of rental alternatives: I think even if the intent is to not continue development, a drop-in replacement of rental would be helpful as it's easier for crates to move to it. |
as far as I remember I tried alternative of rental but no one seem to do what I needed. |
I don't think forking An alternative would be to try to restore the 'nicer' pretty-printing behavior for all crates. That is, we would try to do a better job about keeping spacing information in the |
idk proc-macro-hack and syn seem to have far more users than rental. It's doable, also given that users should switch to something that has at least some basic level of maintenance anyways. |
We still haven't completed the migration for I can do a Crater run that just disables things from |
Unfortunately, However, that comma does not actually exist in the original input: https://github.com/jpernst/rental/blob/213671ab3aab3452efd7e2290c6bb714ee327014/src/lib.rs#L94-L96 A pretty-printing change along can't fix this - while it would be fine for us to improve pretty-printing for all crates, we should not be synthesizing fake commas that aren't present in the original macro input. However, this does suggest an combination of approaches we could take to solving this problem:
I've locally verified that the combination of these two changes is enough to keep |
cc @jpernst - I would normally post this on the TL;DR - it would be extremely helpful if you could make one final point release of Background:
Historically, the Rust compiler did not always preserve the exact input to a proc-macro (in this case, the item annotated with The problem In order to avoid breaking a large number of crates in the ecosystem, the Rust compiler added a backwards-compatibility hack, which keeps the original pretty-printed output for crates that use a type named As it stands now, the Rust compiler cannot remove this hack without making all versions of The solution I believe that the simplest solution is to make a new, final release of
I've verified that this is sufficient to allow Rust to remove the hack, allowing I understand that the Thank you for your work creating |
A new release of |
…ochenkov Remove some unncessary spaces from pretty-printed tokenstream output In addition to making the output look nicer for all crates, this also aligns the pretty-printing output with what the `rental` crate expects. This will allow us to eventually disable a backwards-compat hack in a follow-up PR. See rust-lang#84428 for some background information about why we want to make this change. Note that this change would be desirable (but not particularly necessary) even if `rental` didn't exist, so we're not adding any crate-specific hacks into the compiler.
From rust-lang/rust#84428 looks like it will be fixed soon.
This is resolved now I think due to #84920 being merged? |
To future reader, |
If I clone rental and run
cargo +beta test
on it, I get t he following warning:This also occurs in crates that use rental, e.g. one of glium's examples.
cc #83125 (tracking issue)
The warning itself has been added by PR #83168, whose justification was that the
procedural-masquerade
crate sees little use anyways. And indeed, on crates.io it "only" has27,419
recent downloads. Rental on the other hand has193,341
recent downloads, or almost 10 times as many. Furthermore, you can fix the warning on your side by just removing use of that crate as it's become redundant. Rental on the other hand is not redundant, so your only option is to switch to an alternative, which might be expensive.I would approach fixing of this issue with the following steps:
procedural-masquerade
back-compat hack torental
#85387cc @Aaron1011 @petrochenkov
The text was updated successfully, but these errors were encountered: