Update outdated comment
The highest-priority item is the *first* in the list, not the last.
See [this code][1] for more.
[this code]: 0e63af5da3/compiler/rustc_mir_build/src/build/matches/mod.rs (L1334-L1335)
This commit is contained in:
parent
496836acf7
commit
8b52cdc942
@ -1226,9 +1226,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
/// this point, the input candidates have been fully simplified,
|
||||
/// and so we know that all remaining match-pairs require some
|
||||
/// sort of test. To decide what test to perform, we take the highest
|
||||
/// priority candidate (last one in the list) and extract the
|
||||
/// first match-pair from the list. From this we decide what kind
|
||||
/// of test is needed using [`Builder::test`], defined in the
|
||||
/// priority candidate (the first one in the list, as of January 2021)
|
||||
/// and extract the first match-pair from the list. From this we decide
|
||||
/// what kind of test is needed using [`Builder::test`], defined in the
|
||||
/// [`test` module](mod@test).
|
||||
///
|
||||
/// *Note:* taking the first match pair is somewhat arbitrary, and
|
||||
|
Loading…
x
Reference in New Issue
Block a user