diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-29 17:46:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-29 17:46:44 +0200 |
| commit | 83734f2802da74fbd1c95d6c79962944fdec31c9 (patch) | |
| tree | a67ccf4df01012eb2a9102a8893fd839f2dccbc2 | |
| parent | 5de94b67d4966a9f0fcf562122bdc5dacd0fc4ad (diff) | |
| parent | eb0e71620d7f927dc3f10598409d4375b5374dcf (diff) | |
| download | rust-83734f2802da74fbd1c95d6c79962944fdec31c9.tar.gz rust-83734f2802da74fbd1c95d6c79962944fdec31c9.zip | |
Rollup merge of #128341 - Alexendoo:parse-version-pub, r=compiler-errors
Make `rustc_attr::parse_version` pub I'd like to use it in Clippy but I'll make those changes in the Clippy repo after the sync so it doesn't cause a conflict with https://github.com/rust-lang/rust-clippy/pull/13168
| -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 86afe08323f..12a19ae5c3d 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -578,7 +578,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() { |
