]> git.lizzy.rs Git - rust.git/commitdiff
is_range_literal: leave FIXME
authorMazdak Farrokhzad <twingoow@gmail.com>
Sun, 22 Dec 2019 19:55:27 +0000 (20:55 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Mon, 23 Dec 2019 12:11:15 +0000 (13:11 +0100)
src/librustc/hir/mod.rs

index b4c51cca4d24d1de53e4ae3a1a316231876fc433..915b0afc48fcb0b3f4d55d35676aea622312ef5e 100644 (file)
@@ -1566,6 +1566,9 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 /// 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