Diagnostic and cause
СсылкаNative emitter cannot lower this construct yet
- Семейство
- topaz
- Этап
- emit
- Код
TPZ6001
Причина и условия
A multiple-rest list pattern retains the established TPZ6001 emission-refusal expectation. A single-rest list pattern has supported Rust emission. The language admission policy for multiple rests remains open.
Связанное правило · Multiple list rests and emission refusal →Действия
Use one rest element per list pattern. Match additional structure inside that remainder when it is needed.
Compiler phase: emit.
Compiler explanation: The program is accepted by the language, but the selected native emit path lacks a proven lowering for this construct.
Message templates are Pending. The explanation above is not an observed CLI message.
A multiple-rest list pattern retains the established TPZ6001 emission-refusal expectation. A single-rest list pattern has supported Rust emission. The language admission policy for multiple rests remains open.
Multiple list rests and emission refusal
A multiple-rest list pattern retains the established TPZ6001 emission-refusal expectation. A single-rest list pattern has supported Rust emission. The language admission policy for multiple rests remains open.
Response
СсылкаUse one rest element per list pattern. Match additional structure inside that remainder when it is needed.
Reproduction and verification
СсылкаRejected program
Ссылкаlet value = match ([1, 2]) {case [..left, ..right] => 0case _ => 1}
Ожидаемый результат
Ожидаемый результат
Этап отклонения emit. Ненулевой код завершения.
multiple-rest-emission-refusal
Контракт обязательного основного местоположения не определён.
The established Rust backend reports the multiple-rest-emission-refusal cause. Current SELF emits several Rust slice rests without establishing that refusal. The P5 runtime/emit product runner preserves TPZ6001 and nonzero; the exact primary location remains pending. These examples do not decide whether the language should admit multiple rests.
Repaired program
Ссылкаlet value = match ([1, 2]) {case [first, ..rest] => 0case _ => 1}
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
The established Rust backend reports the multiple-rest-emission-refusal cause. Current SELF emits several Rust slice rests without establishing that refusal. The P5 runtime/emit product runner preserves TPZ6001 and nonzero; the exact primary location remains pending. These examples do not decide whether the language should admit multiple rests.