mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
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
This commit is contained in:
commit
83734f2802
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user