Skip to content

Commit

Permalink
chore: Remove signed integer warning (#3808)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

Removes the experimental feature warning for signed integers. Bit
shifting is the only task that remains for signed integers and this
already has a separate error message.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
jfecher authored Dec 14, 2023
1 parent 98a5004 commit 151dbf0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions compiler/noirc_frontend/src/parser/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,14 +1119,7 @@ fn int_type() -> impl NoirParser<UnresolvedType> {
Err(ParserError::expected_label(ParsingRuleLabel::IntegerType, unexpected, span))
}
}))
.validate(|(_, token), span, emit| {
let typ = UnresolvedTypeData::from_int_token(token).with_span(span);
if let UnresolvedTypeData::Integer(crate::Signedness::Signed, _) = &typ.typ {
let reason = ParserErrorReason::ExperimentalFeature("Signed integer types");
emit(ParserError::with_reason(reason, span));
}
typ
})
.map_with_span(|(_, token), span| UnresolvedTypeData::from_int_token(token).with_span(span))
}

fn named_type(type_parser: impl NoirParser<UnresolvedType>) -> impl NoirParser<UnresolvedType> {
Expand Down

0 comments on commit 151dbf0

Please sign in to comment.