Commit a8668664 authored by Ian Jackson's avatar Ian Jackson 💬
Browse files

Merge branch 'cdf_pub_use' into 'main'

Fix a bug in check_doc_features, and fix a warning too.

See merge request tpo/core/arti!1023
parents 750c5122 d09273a6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -17,14 +17,14 @@ use tor_llcrypto::pk::rsa::RsaIdentity;

use bitflags::bitflags;

#[cfg_attr(docsrs, doc(cfg(feature = "onion-service")))]
#[cfg(feature = "onion-service")]
#[cfg_attr(docsrs, doc(cfg(feature = "onion-service")))]
pub use super::hs::{
    est_intro::EstablishIntro, EstablishRendezvous, IntroEstablished, Introduce1, Introduce2,
    IntroduceAck, Rendezvous1, Rendezvous2, RendezvousEstablished,
};
#[cfg_attr(docsrs, doc(cfg(feature = "experimental-udp")))]
#[cfg(feature = "experimental-udp")]
#[cfg_attr(docsrs, doc(cfg(feature = "experimental-udp")))]
pub use super::udp::{ConnectUdp, ConnectedUdp, Datagram};

crate::restrict::restricted_msg! {
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ use tor_llcrypto::pk::curve25519;
use tor_units::IntegerMinutes;

#[cfg(feature = "hsdesc-inner-docs")]
#[cfg_attr(docsrs, doc(cfg(feature = "hsdesc-inner-docs")))]
pub use {inner::HsDescInner, middle::HsDescMiddle, outer::HsDescOuter};

/// Metadata about an onion service descriptor, as stored at an HsDir.
+3 −7
Original line number Diff line number Diff line
@@ -53,12 +53,6 @@ additional_provided['tor-netdoc']= [
    ('NsConsensusRouterStatus', 'feature = "ns_consensus"'),
]


additional_provided['tor-cell'] = [
    ('{', 'feature = "onion-service"'),
    ('{ConnectUdp, ConnectedUdp, Datagram}', 'feature = "experimental-udp"'),
]

def extract_feature_pub_use(path):
    START_CFG = '#[cfg('
    END_CFG = ')]'
@@ -74,11 +68,13 @@ def extract_feature_pub_use(path):
                if '//' in line[:pubuse_pos]:
                    continue
                # extract ident
                #
                # (BUG: this still doesn't handle `pub use {A,B,C} very well.)
                start = line.rfind(":")
                if start == -1:
                    start = line.rfind(" ")
                ident = line[start + 1:]
                if pos:= ident.find(';'):
                if (pos:= ident.find(';')) != -1:
                    ident = ident[:pos]
                res.append((ident, cfg))
                cfg = None