Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#24761 closed defect (wontfix)

rust: needs retain_hash_collection to build with older rustc versions

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Normal Keywords: rust, 032-backport
Cc: Actual Points: 0.1
Parent ID: Points: 0.1
Reviewer: Sponsor:


I was using rustc 1.19.0-nightly on master and received the following warning:

   Compiling protover v0.0.1 (file:///Users/twilsonb/tor/tor-rust/src/rust/protover)
error: use of unstable library feature 'retain_hash_collection' (see issue #36648)
   --> protover/
259 |     vers.retain(|x| !supported_versions.contains(x));
    |          ^^^^^^
    = help: add #![feature(retain_hash_collection)] to the crate attributes to enable

When I added the feature declaration, everything worked fine and the tests passed.

Child Tickets

Change History (5)

comment:1 Changed 2 years ago by teor

Actual Points: 0.1
Status: assignedneeds_review

Please see my branch bug24761 on

comment:2 Changed 2 years ago by Sebastian

This is a bad idea. Features mean you cannot compile on anything but nightly. Did we move away from our 1.14 stable policy? If not then there really should be CI for this preventing the merge of such changes. If we moved away from it, what is the current policy?

comment:3 Changed 2 years ago by teor

Resolution: wontfix
Status: needs_reviewclosed

I'm not familiar with the current rust policy, and I couldn't find where it is documented.
So I'm going to assume we require 1.14, and therefore that we won't fix this.

I opened #24765 so we follow up by documenting this requirement in our 0.3.2 release notes, and on the wiki.

comment:4 Changed 2 years ago by Sebastian

Well, it won't build with 1.14 either. retain() is too new for that.

comment:5 Changed 2 years ago by teor

You're right, it's 1.18, I'll update the other ticket.

Note: See TracTickets for help on using tickets.