Skip to content

Commit 83734f2

Browse files
authored
Rollup merge of rust-lang#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 rust-lang/rust-clippy#13168
2 parents 5de94b6 + eb0e716 commit 83734f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_attr/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ fn gate_cfg(gated_cfg: &GatedCfg, cfg_span: Span, sess: &Session, features: &Fea
578578
/// Parse a rustc version number written inside string literal in an attribute,
579579
/// like appears in `since = "1.0.0"`. Suffixes like "-dev" and "-nightly" are
580580
/// not accepted in this position, unlike when parsing CFG_RELEASE.
581-
fn parse_version(s: Symbol) -> Option<RustcVersion> {
581+
pub fn parse_version(s: Symbol) -> Option<RustcVersion> {
582582
let mut components = s.as_str().split('-');
583583
let d = components.next()?;
584584
if components.next().is_some() {

0 commit comments

Comments
 (0)