Skip to content

Commit 9442cb2

Browse files
remove asserts
1 parent a819395 commit 9442cb2

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

compiler/rustc_resolve/src/build_reduced_graph.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
8282
span: Span,
8383
expn_id: LocalExpnId,
8484
) {
85-
assert!(!parent.is_local());
86-
assert!(res.opt_def_id().is_none_or(|def_id| !def_id.is_local()));
87-
vis.map_id(|def_id| {
88-
assert!(!def_id.is_local());
89-
});
9085
let binding = self.arenas.new_res_binding(res, vis, span, expn_id);
9186
// Even if underscore names cannot be looked up, we still need to add them to modules,
9287
// because they can be fetched by glob imports from those modules, and bring traits

compiler/rustc_resolve/src/imports.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
342342
binding: NameBinding<'ra>,
343343
warn_ambiguity: bool,
344344
) -> Result<(), NameBinding<'ra>> {
345-
assert!(module.is_local());
346-
if let NameBindingKind::Res(res) = binding.kind {
347-
assert!(res.opt_def_id().is_none_or(|def_id| def_id.is_local()))
348-
}
349-
let _ = binding.vis.expect_local();
350-
351345
let res = binding.res();
352346
self.check_reserved_macro_name(ident, res);
353347
self.set_binding_parent_module(binding, module);

0 commit comments

Comments
 (0)