Skip to content

make HR_LIFETIME_IN_ASSOC_TYPE deny-by-default #37843

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

Merged
merged 1 commit into from
Nov 22, 2016

Conversation

nikomatsakis
Copy link
Contributor

It's time to fix issue #32330.

cc #33685
cc @arielb1

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@nikomatsakis nikomatsakis added the S-waiting-on-crater Status: Waiting on a crater run to be completed. label Nov 17, 2016
@nikomatsakis
Copy link
Contributor Author

This needs a crater run.

@eddyb
Copy link
Member

eddyb commented Nov 17, 2016

Please switch to Forbid for the crater run. r=me otherwise.

@KalitaAlexey
Copy link
Contributor

Dear @nikomatsakis, are you going to write tests for that case?

@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented Nov 18, 2016

Crater report available here.

@nikomatsakis
Copy link
Contributor Author

@KalitaAlexey there are many tests for the ling that already exist, they are just already set to deny

@nikomatsakis
Copy link
Contributor Author

@djudd -- note that according to this crater run, your package human-name contains a future incompatibility warning (#33685). This warning will soon change to a hard error. I tried checking it out and building it locally but I got errors (at least with the latest nightly) related to the package phf_macros (I'm actually not sure how the crater run managed to succeed -- doing a bit more investigation).

In any case, here are the errors we see. I suspect the fix is to change the signature of transliterate to the following:

pub fn transliterate(c: char) -> Chars<'static>

but I am not entirely sure until I am able to experiment. (Note that the need to do this is itself a compiler bug, as described in #32330, but fixing that bug is (somewhat ironically) blocked on converting this lint into a hard error.)

error: lifetime parameter `'a` declared on fn `utils::transliterate` appears only in the return type, but here is required to be higher-ranked, which means that `'a` must appear in both argument and return types, #[forbid(hr_lifetime_in_assoc_type)] on by default
   --> src/comparison.rs:413:33
    |
413 |                                .filter_map(lowercase_if_alpha);
    |                                 ^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #33685 <https://github.com/rust-lang/rust/issues/33685>

error: lifetime parameter `'a` declared on fn `utils::transliterate` appears only in the return type, but here is required to be higher-ranked, which means that `'a` must appear in both argument and return types, #[forbid(hr_lifetime_in_assoc_type)] on by default
   --> src/comparison.rs:417:37
    |
417 |                                    .filter_map(lowercase_if_alpha);
    |                                     ^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #33685 <https://github.com/rust-lang/rust/issues/33685>

error: lifetime parameter `'a` declared on fn `utils::transliterate` appears only in the return type, but here is required to be higher-ranked, which means that `'a` must appear in both argument and return types, #[forbid(hr_lifetime_in_assoc_type)] on by default
   --> src/lib.rs:405:34
    |
405 |                                 .rev();
    |                                  ^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #33685 <https://github.com/rust-lang/rust/issues/33685>

I'll update with more info when I figure out what's happening with the phf_macros crate.

@djudd
Copy link

djudd commented Nov 19, 2016

@nikomatsakis that fix appears to work - thanks! (I didn't see phf_macros-related errors locally.)

@nikomatsakis nikomatsakis force-pushed the issue-33685-hard-error branch from f85d48b to a257d8d Compare November 21, 2016 19:28
@nikomatsakis
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Collaborator

bors commented Nov 21, 2016

📌 Commit a257d8d has been approved by eddyb

@bors
Copy link
Collaborator

bors commented Nov 22, 2016

⌛ Testing commit a257d8d with merge 3bf2be9...

bors added a commit that referenced this pull request Nov 22, 2016
make HR_LIFETIME_IN_ASSOC_TYPE deny-by-default

It's time to fix issue #32330.

cc #33685
cc @arielb1
@bors
Copy link
Collaborator

bors commented Nov 22, 2016

💔 Test failed - auto-win-gnu-32-opt

@alexcrichton
Copy link
Member

@bors: retry

On Tue, Nov 22, 2016 at 9:13 AM, bors notifications@github.com wrote:

💔 Test failed - auto-win-gnu-32-opt
https://buildbot.rust-lang.org/builders/auto-win-gnu-32-opt/builds/6242


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#37843 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95MrOAcTM6MWCDXT5NE3ZTPiwNOR0ks5rAwZ_gaJpZM4K12wY
.

@bors bors merged commit a257d8d into rust-lang:master Nov 22, 2016
@nikomatsakis nikomatsakis deleted the issue-33685-hard-error branch April 14, 2017 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-crater Status: Waiting on a crater run to be completed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants