Auto merge of #95082 - spastorino:overlap-inherent-impls, r=nikomatsakis

Overlap inherent impls

r? `@nikomatsakis`

Closes #94526
This commit is contained in:
bors 2022-03-25 09:09:48 +00:00
commit e70e211e99
9 changed files with 177 additions and 65 deletions

View file

@ -44,6 +44,7 @@ use rustc_span::symbol::{kw, Ident, Symbol};
use rustc_span::Span;
use rustc_target::abi::Align;
use std::fmt::Debug;
use std::hash::Hash;
use std::ops::ControlFlow;
use std::{fmt, str};
@ -172,6 +173,12 @@ pub struct ImplHeader<'tcx> {
pub predicates: Vec<Predicate<'tcx>>,
}
#[derive(Copy, Clone, Debug, TypeFoldable)]
pub enum ImplSubject<'tcx> {
Trait(TraitRef<'tcx>),
Inherent(Ty<'tcx>),
}
#[derive(
Copy,
Clone,