Skip to content

Confusing typo in rustc_pattern_analysis::usefulness #149803

@baehyunsol

Description

@baehyunsol

Location (URL)

//! Let `pt_1, .., pt_n` and `qt` be length-m tuples of patterns for the same type `(T_1, .., T_m)`.
//! We compute `usefulness(tp_1, .., tp_n, tq)` as follows:

Summary

Let `pt_1, .., pt_n` and `qt` be length-m tuples of patterns for the same type `(T_1, .., T_m)`. We compute `usefulness(tp_1, .., tp_n, tq)` as follows: 

I'm studying how the compiler implements pattern-matchings, and I'm confused with this sentence. It first introduces pt_1, .., pt_n, and uses names tp_1, .., tp_n.

Is this just a typo? or does the document introduce tp_1, .., tp_n but I'm unable to find one?

Thanks!

EDIT: rendered version

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions