Skip to content

Commit

Permalink
Auto merge of rust-lang#132251 - jieyouxu:rollup-mtv9mpd, r=jieyouxu
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - rust-lang#131633 (error on alignments greater than `isize::MAX`)
 - rust-lang#132086 (Tweak E0277 highlighting and "long type" path printing)
 - rust-lang#132220 (Add GUI regression test for doc struct fields margins)
 - rust-lang#132225 (Dynamically link run-make support)
 - rust-lang#132227 (Pass constness with span into lower_poly_trait_ref)
 - rust-lang#132242 (Support `char::is_digit` in const contexts.)
 - rust-lang#132243 (Remove `ObligationCause::span()` method)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Oct 28, 2024
2 parents e212260 + ac1ec5f commit 848fcd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ impl char {
/// '1'.is_digit(37);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_char_is_digit", issue = "132241")]
#[inline]
pub fn is_digit(self, radix: u32) -> bool {
pub const fn is_digit(self, radix: u32) -> bool {
self.to_digit(radix).is_some()
}

Expand Down

0 comments on commit 848fcd5

Please sign in to comment.