Handle type-closing chevrons adjacent to an initializer assignment
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start with type parsing in front/parser/src/parser/types.rs and storage declarations in front/parser/src/parser/decl.rs, then inspect the lexer’s compound-operator handling. Reproduce with array<i32,1>=[1] and ptr<i32>=null while comparing the spaced forms and genuine >=/>> expressions. Done means the agreed compact-or-spaced policy is consistent across the listed generic types, diagnostics identify the exact boundary when rejected, AST/HIR behavior is equivalent for accepted forms, and source spans remain accurate.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A storage declaration using array<i32,1>=[1] or ptr<i32>=null fails while the same declaration with whitespace between > and = succeeds. The diagnostic consumes past the chevron/operator boundary and says a semicolon is missing, rather than explaining the actual boundary problem.
Starting points: type parsing, storage declarations, and the lexer compound-operator handling. This differs from the error-message preservation work in #971 and nested generic comma/chevron tests in #393.
Reproduction
Audited canonical master 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 on Linux amd64 with a checkout-built Wave 0.0.1-alpha-dev, matching checkout std, Rust 1.89.0 and LLVM 21.1.8. Both check and build --emit=ir, with --error-format=json, reject:
fun main() {
var a: array<i32,1>=[1];
var p: ptr<i32>=null;
}
array<i32,1> = [1] and ptr<i32> = null are accepted controls. The errors are expected ';' in storage declaration; the pointer case highlights null, after the problematic boundary.
Scope
Resolve the type/assignment token boundary in its parsing context, retaining correct spans for any split tokens. Keep actual expression >=, >> and compound shifts unchanged. If the language intentionally requires whitespace here, document that choice and issue a boundary-specific diagnostic instead of the misleading semicolon error.
Please mention @LunaStev to discuss the design before starting implementation.
Completion criteria
- The agreed policy is consistent for pointer, array, nested generic and ordinary named generic types.
- Accepted compact/spaced forms have equivalent AST/HIR, or intentionally rejected forms identify the exact boundary with actionable help.
- Genuine comparison/shift operators retain maximal-munch expression behavior; human/JSON source ranges remain accurate.
- Ngôn ngữ chính
- Rust
- Star
- 56
- Fork
- 21
- Merge trung bình
- 23 giờ 20 phút
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của wavefnd/Wave
-
Reject unrepresentable POSIX listener descriptors before Unix-domain acceptCó thể đã có người làm @ShahadatTest đã nhận 6 ngày trước. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
wavefnd/Wave#1082 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Preserve expression assembly result types when recording HIR conversionsCó thể đã có người làm @hiyouwhatsapp đã nhận 2 ngày trước. Đang mởbug help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 53/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Preserve the previous build output when writing its Cargo receipt failsCó thể đã có người làm @hiyouwhatsapp đã nhận 2 ngày trước. Đang mởbug build help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Reconcile obsolete staging assets before verifying a new Nightly generationCó thể đã có người làm @hiyouwhatsapp đã nhận 2 ngày trước. Đang mởbug ci help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
storytold/photocraft#12706 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
IngvarConsulting/unica#2822 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Clean master build fails in zune-jpeg error conversion and zero-IV array construction (patch)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100