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 22, 2019
1 parent 80a83ea commit db4cc3b
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 @@ -1598,6 +1598,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 db4cc3b

Please sign in to comment.