mark Ascii::new(), UniCase::unicode() as const#28
mark Ascii::new(), UniCase::unicode() as const#28seanmonstar merged 3 commits intoseanmonstar:masterfrom
Ascii::new(), UniCase::unicode() as const#28Conversation
| impl<S> UniCase<S> { | ||
| /// Creates a new `UniCase`, skipping the ASCII check. | ||
| pub fn unicode(s: S) -> UniCase<S> { | ||
| pub const fn unicode(s: S) -> UniCase<S> { |
There was a problem hiding this comment.
const fn can only currently reside in impl blocks without trait bounds.
|
Oh man, minimum version of Rust is 1.3. Is that a hard requirement? |
|
We could put this behind a Cargo feature instead. |
|
@seanmonstar should I fix this with another version check/cfg in |
Oh wow, that's old! I'm sure I set up CI with that back then, and never really needed anything newer... I don't think we need to support 1.3 forever, but since this requires 1.32, that's likely too new to not be a breaking change. Is it possible to work with a config in the |
|
I'm trying it now. By the way, I'm a bit concerned by the |
|
If it does cause parse errors I could probably put it in a separate file and |
|
1.3.0 doesn't want to build this locally, it fails trying to invoke |
|
Wow, it just worked. I guess |
| println!("cargo:rustc-cfg=__unicase__default_hasher"); | ||
| } | ||
|
|
||
| if rustc::is_min_version("1.31.0").map(|(is_min, _)| is_min).unwrap_or(true) { |
There was a problem hiding this comment.
We should probably use .unwrap_or(false) since if we can't verify the version then we probably don't want to assume these features are supported.
There was a problem hiding this comment.
It's been so long, I can't remember. Something that comes to mind is if nightly were to output an odd version string. Either way, I'm not too concern with it.
|
@seanmonstar are you waiting for other changes before you cut a release, or...? |
|
I also upgraded the CaseFolding from 11.0.0 to 12.0.0, and have since published v2.3.0. |
closes #27