Skip to content

Commit

Permalink
is_range_literal: leave FIXME
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Dec 23, 2019
1 parent dd7f493 commit 4bb8346
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/librustc/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,9 @@ impl fmt::Debug for Expr {

/// Checks if the specified expression is a built-in range literal.
/// (See: `LoweringContext::lower_expr()`).
///
/// FIXME(#60607): This function is a hack. If and when we have `QPath::Lang(...)`,
/// we can use that instead as simpler, more reliable mechanism, as opposed to using `SourceMap`.
pub fn is_range_literal(sm: &SourceMap, expr: &Expr) -> bool {
// Returns whether the given path represents a (desugared) range,
// either in std or core, i.e. has either a `::std::ops::Range` or
Expand Down

0 comments on commit 4bb8346

Please sign in to comment.