diff options
| author | Alex Macleod <alex@macleod.io> | 2024-07-29 13:11:29 +0000 |
|---|---|---|
| committer | Alex Macleod <alex@macleod.io> | 2024-07-29 13:11:29 +0000 |
| commit | eb0e71620d7f927dc3f10598409d4375b5374dcf (patch) | |
| tree | eb74cd39793b0661dcbc2a9dd3f9fccf89089357 | |
| parent | 8fe0c753f23e7050b87a444b6622caf4d2272d5d (diff) | |
Make `rustc_attr::parse_version` pub
| -rw-r--r-- | compiler/rustc_attr/src/builtin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<RustcVersion> { +pub fn parse_version(s: Symbol) -> Option<RustcVersion> { let mut components = s.as_str().split('-'); let d = components.next()?; if components.next().is_some() { |
