Skip to content

Commit

Permalink
Add string slices to supported types message in match expressions (#6243
Browse files Browse the repository at this point in the history
)

## Description

This PR adds `string slices` to `CURRENTLY_SUPPORTED_TYPES_MESSAGE` in
`match` expressions. The support for string slices is added in #6202.

## Checklist

- [x] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.
  • Loading branch information
ironcev authored Jul 8, 2024
1 parent f81b6c2 commit 9db4fe7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sway-core/src/type_system/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,11 +1261,12 @@ impl TypeInfo {
engines: &Engines,
span: &Span,
) -> Result<(), ErrorEmitted> {
const CURRENTLY_SUPPORTED_TYPES_MESSAGE: [&str; 8] = [
const CURRENTLY_SUPPORTED_TYPES_MESSAGE: [&str; 9] = [
"Sway currently supports pattern matching on these types:",
" - b256",
" - boolean",
" - enums",
" - string slices",
" - structs",
" - tuples",
" - unsigned integers",
Expand Down

0 comments on commit 9db4fe7

Please # to comment.