Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Range patterns of strings are accepted

Open Beginner friendly
#157 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
compilers

Research direction

Start at the :todo case in tests/checker/patterns.txt on the test/checker-edges branch, then inspect the relevant type-checking code in the boltlang-hir-ty crate. Add the case so a string range pattern is rejected while ranges over supported ordered types remain valid; done when the checker test passes.

Written by the indexing model from the issue text.

Description

bug scope:types

A range pattern of strings is accepted:

fn f(s: str) = match s { "a"..="z" => 1, _ => 2 };

Range patterns only make sense for types with an order that the compiler knows, like integers, floats and chars. A range of strings should be an error.

There's a :todo case in tests/checker/patterns.txt, on the branch test/checker-edges.

Crates: boltlang-hir-ty.

Dominant language
Rust
Stars
54
Forks
3
Avg merge
7m
Merged PRs (30d)
28

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boltlang/Bolt

All issues in boltlang/Bolt

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.