Skip to content

Commit 618d9a5

Browse files
Mark FloatType and IntegerType as #[non_exhaustive]
This is a preparation for v1.0: it's unlikely that new integer or float types are added to the language anytime soon, but I wouldn't rule it out. `u128` was added after all. I don't want that to cause a v2.0 release.
1 parent ffe8198 commit 618d9a5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/float/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ pub(crate) fn parse_impl(input: &str) -> Result<FloatLit<&str>, ParseError> {
211211

212212
/// All possible float type suffixes.
213213
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
214+
#[non_exhaustive]
214215
pub enum FloatType {
215216
F32,
216217
F64,

src/integer/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ impl IntegerBase {
274274

275275
/// All possible integer type suffixes.
276276
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
277+
#[non_exhaustive]
277278
pub enum IntegerType {
278279
U8,
279280
U16,

0 commit comments

Comments
 (0)