no overlap errors after failing the orphan check
This commit is contained in:
parent
800a156c1e
commit
1296719c06
28 changed files with 506 additions and 507 deletions
|
@ -443,8 +443,12 @@ fn report_conflicting_impls(
|
|||
match used_to_be_allowed {
|
||||
None => {
|
||||
sg.has_errored = true;
|
||||
let err = struct_span_err!(tcx.sess, impl_span, E0119, "");
|
||||
decorate(LintDiagnosticBuilder::new(err));
|
||||
if overlap.with_impl.is_local() || !tcx.orphan_check_crate(()).contains(&impl_def_id) {
|
||||
let err = struct_span_err!(tcx.sess, impl_span, E0119, "");
|
||||
decorate(LintDiagnosticBuilder::new(err));
|
||||
} else {
|
||||
tcx.sess.delay_span_bug(impl_span, "impl should have failed the orphan check");
|
||||
}
|
||||
}
|
||||
Some(kind) => {
|
||||
let lint = match kind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue