...ear
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes#4821.
r? @catamorphism
The function that formats and prints the squigly line that hilights
errors counted tabs as spaces, which resulted in incorrect error
messages when tabs were used for indentation. This change compares
the highlight line with the previous line and inserts a tab instead
of a space whenever such a tab exists on the previous line. Note
that error messages will still highlight incorrectly when the
previous line include characters that require more than one utf8
code point, as mentioned in issue 3260.
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes#4821.
The number of operands of the LLVM node initializing the array
underlying a const vector isn't always the array length -- if the
array is of a sufficiently primitive type and all the elements' values
are known (or something like that), LLVM uses a specialized Constant
subclass that stores the data packed, and thus has no operands. Oops.
But, because llsize_of now gives us a ConstantInt, we can just fix
mozilla/rust#3169 and this all goes away.
This adds a `BaseIter` impl to `PriorityQueue`, `TreeMap`, `LinearMap` and `SmallIntMap`, and introduces a `ReverseIter` trait + implementations for `TreeMap`, `TreeSet` and `SmallIntMap`.
This is wasted space if the const is just an enum, but optimizing that
case without breaking everything else is an issue that can be addressed
separately.