Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#24761 closed defect (wontfix)

rust: protover.rs 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: 0.3.2.1-alpha
Severity: Normal Keywords: rust, 032-backport
Cc: Actual Points: 0.1
Parent ID: Points: 0.1
Reviewer: Sponsor:

Description

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/protover.rs:259:10
    |
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 21 months ago by teor

Actual Points: 0.1
Status: assignedneeds_review

Please see my branch bug24761 on https://github.com/teor2345/tor.git

comment:2 Changed 21 months 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 21 months 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 21 months ago by Sebastian

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

comment:5 Changed 21 months ago by teor

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

Note: See TracTickets for help on using tickets.