Skip to content

Commit 72c84a6

Browse files
committed
assert impossible branch is impossible
1 parent ee44706 commit 72c84a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎compiler/rustc_resolve/src/ident.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,10 +743,10 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
743743

744744
let ambiguity_error_kind = if is_builtin(innermost_res) || is_builtin(res) {
745745
Some(AmbiguityKind::BuiltinAttr)
746-
} else if innermost_res == derive_helper_compat
747-
|| res == derive_helper_compat && innermost_res != derive_helper
748-
{
746+
} else if innermost_res == derive_helper_compat {
749747
Some(AmbiguityKind::DeriveHelper)
748+
} else if res == derive_helper_compat && innermost_res != derive_helper {
749+
span_bug!(orig_ident.span, "impossible inner resolution kind")
750750
} else if innermost_flags.contains(Flags::MACRO_RULES)
751751
&& flags.contains(Flags::MODULE)
752752
&& !self.disambiguate_macro_rules_vs_modularized(innermost_binding, binding)

0 commit comments

Comments
 (0)