[tor-bugs] #24761 [Core Tor/Tor]: rust: protover.rs needs retain_hash_collection to build with older rustc versions

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Dec 29 11:41:58 UTC 2017


#24761: rust: protover.rs needs retain_hash_collection to build with older rustc
versions
------------------------------+--------------------------------
     Reporter:  teor          |      Owner:  teor
         Type:  defect        |     Status:  assigned
     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
Actual Points:                |  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/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.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24761>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list