]> git.lizzy.rs Git - rust.git/commitdiff
remove FIXME(#48116) and remove the logic to debug the issue
authorNiv Kaminer <nivkner@zoho.com>
Fri, 16 Mar 2018 23:28:55 +0000 (01:28 +0200)
committerNiv Kaminer <nivkner@zoho.com>
Sat, 17 Mar 2018 18:24:49 +0000 (20:24 +0200)
src/librustc_resolve/resolve_imports.rs

index 01c1ded94578ecc1fa45da7521930f70595598e7..a73f660c4059aaff3fd600af0dd81644876805e1 100644 (file)
@@ -1026,28 +1026,9 @@ fn import_path_to_string(names: &[SpannedIdent],
         if names.is_empty() {
             import_directive_subclass_to_string(subclass)
         } else {
-            // FIXME: Remove this entire logic after #48116 is fixed.
-            //
-            // Note that this code looks a little wonky, it's currently here to
-            // hopefully help debug #48116, but otherwise isn't intended to
-            // cause any problems.
-            let x = format!(
-                "{}::{}",
-                names_to_string(names),
-                import_directive_subclass_to_string(subclass),
-            );
-            if names.is_empty() || x.starts_with("::") {
-                span_bug!(
-                    span,
-                    "invalid name `{}` at {:?}; global = {}, names = {:?}, subclass = {:?}",
-                    x,
-                    span,
-                    global,
-                    names,
-                    subclass
-                );
-            }
-            return x
+            format!("{}::{}",
+                    names_to_string(names),
+                    import_directive_subclass_to_string(subclass))
         }
     }
 }