From eb0e71620d7f927dc3f10598409d4375b5374dcf Mon Sep 17 00:00:00 2001 From: Alex Macleod Date: Mon, 29 Jul 2024 13:11:29 +0000 Subject: [PATCH] Make `rustc_attr::parse_version` pub --- compiler/rustc_attr/src/builtin.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index 34c24a26f7b..acb4f0a8266 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -574,7 +574,7 @@ fn gate_cfg(gated_cfg: &GatedCfg, cfg_span: Span, sess: &Session, features: &Fea /// Parse a rustc version number written inside string literal in an attribute, /// like appears in `since = "1.0.0"`. Suffixes like "-dev" and "-nightly" are /// not accepted in this position, unlike when parsing CFG_RELEASE. -fn parse_version(s: Symbol) -> Option { +pub fn parse_version(s: Symbol) -> Option { let mut components = s.as_str().split('-'); let d = components.next()?; if components.next().is_some() {