pub struct CloneRegion {
pub grade: CloneRegionGrade,
pub gates: bool,
pub groups: Vec<usize>,
pub spans: Vec<CloneSpan>,
pub accepted_by: Vec<String>,
pub ignore_hint: Vec<String>,
pub demoted: Vec<usize>,
/* private fields */
}Expand description
One region: the head clone groups whose instances overlap.
Fields§
§grade: CloneRegionGradeGrade of the region.
gates: boolWhether the region fails the introduced-clone-group gate under
new-only: the grade is introduced, and no ignoredClones entry
accepts the new copies.
groups: Vec<usize>Indices of the member groups, in output order.
spans: Vec<CloneSpan>The union of the member instance lines in each file, at head paths.
accepted_by: Vec<String>The ignoredClones entries that accept the region.
ignore_hint: Vec<String>The ignoredClones keys of the member groups, when the region follows
an accepted base clone that the change edited. The config needs these
keys so that fallow dupes hides the edited clone too.
demoted: Vec<usize>Member groups that the change wrote no line of, although their key is not in the base (issue #2164).
Implementations§
Source§impl CloneRegion
impl CloneRegion
Sourcepub fn follows_edited_accept(&self) -> bool
pub fn follows_edited_accept(&self) -> bool
Whether the region is inherited-edited and follows an accepted base
clone.
Trait Implementations§
Source§impl Clone for CloneRegion
impl Clone for CloneRegion
Source§impl Debug for CloneRegion
impl Debug for CloneRegion
impl Eq for CloneRegion
Source§impl PartialEq for CloneRegion
impl PartialEq for CloneRegion
impl StructuralPartialEq for CloneRegion
Auto Trait Implementations§
impl Forget for CloneRegion
impl Freeze for CloneRegion
impl Move for CloneRegion
impl RefUnwindSafe for CloneRegion
impl Send for CloneRegion
impl Sync for CloneRegion
impl Unpin for CloneRegion
impl UnsafeUnpin for CloneRegion
impl UnwindSafe for CloneRegion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more