hir: simplify is_range_literal
This commit simplifies `is_range_literal` by checking for `QPath::LangItem` containing range-related lang items, rather than using a heuristic. Co-authored-by: Matthew Jasper <mjjasper1@gmail.com> Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
parent
1e2f350d92
commit
664ecf1085
4 changed files with 23 additions and 49 deletions
|
|
@ -17,9 +17,13 @@ error[E0277]: the size for values of type `[{integer}]` cannot be known at compi
|
|||
|
|
||||
LL | let range = *arr..;
|
||||
| ^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
::: $SRC_DIR/core/src/ops/range.rs:LL:COL
|
||||
|
|
||||
LL | pub struct RangeFrom<Idx> {
|
||||
| --- required by this bound in `std::ops::RangeFrom`
|
||||
|
|
||||
= help: the trait `std::marker::Sized` is not implemented for `[{integer}]`
|
||||
= note: required by `std::ops::RangeFrom`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue