Rollup merge of #150191 - hkBst:clippy-fix-15, r=Kivooeo
change non-canonical clone impl to {*self}, fix some doc comments
This commit is contained in:
commit
87457c563f
6 changed files with 11 additions and 16 deletions
|
|
@ -416,7 +416,7 @@ impl<'a> Id<'a> {
|
|||
/// it in the generated .dot file. They can also provide more
|
||||
/// elaborate (and non-unique) label text that is used in the graphviz
|
||||
/// rendered output.
|
||||
|
||||
///
|
||||
/// The graph instance is responsible for providing the DOT compatible
|
||||
/// identifiers for the nodes and (optionally) rendered labels for the nodes and
|
||||
/// edges, as well as an identifier for the graph itself.
|
||||
|
|
|
|||
|
|
@ -2654,7 +2654,7 @@ struct InternedInSet<'tcx, T: ?Sized + PointeeSized>(&'tcx T);
|
|||
|
||||
impl<'tcx, T: 'tcx + ?Sized + PointeeSized> Clone for InternedInSet<'tcx, T> {
|
||||
fn clone(&self) -> Self {
|
||||
InternedInSet(self.0)
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ pub struct MatchArm<'p, Cx: PatCx> {
|
|||
|
||||
impl<'p, Cx: PatCx> Clone for MatchArm<'p, Cx> {
|
||||
fn clone(&self) -> Self {
|
||||
Self { pat: self.pat, has_guard: self.has_guard, arm_data: self.arm_data }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,10 +174,7 @@ pub(crate) enum PatOrWild<'p, Cx: PatCx> {
|
|||
|
||||
impl<'p, Cx: PatCx> Clone for PatOrWild<'p, Cx> {
|
||||
fn clone(&self) -> Self {
|
||||
match self {
|
||||
PatOrWild::Wild => PatOrWild::Wild,
|
||||
PatOrWild::Pat(pat) => PatOrWild::Pat(pat),
|
||||
}
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -824,7 +824,7 @@ struct PlaceCtxt<'a, Cx: PatCx> {
|
|||
impl<'a, Cx: PatCx> Copy for PlaceCtxt<'a, Cx> {}
|
||||
impl<'a, Cx: PatCx> Clone for PlaceCtxt<'a, Cx> {
|
||||
fn clone(&self) -> Self {
|
||||
Self { cx: self.cx, ty: self.ty }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,8 +153,8 @@ pub struct Registry {
|
|||
terminate_count: AtomicUsize,
|
||||
}
|
||||
|
||||
/// ////////////////////////////////////////////////////////////////////////
|
||||
/// Initialization
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Initialization
|
||||
|
||||
static mut THE_REGISTRY: Option<Arc<Registry>> = None;
|
||||
static THE_REGISTRY_SET: Once = Once::new();
|
||||
|
|
@ -407,12 +407,12 @@ impl Registry {
|
|||
}
|
||||
}
|
||||
|
||||
/// ////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/// MAIN LOOP
|
||||
///
|
||||
/// So long as all of the worker threads are hanging out in their
|
||||
/// top-level loop, there is no work to be done.
|
||||
|
||||
///
|
||||
/// Push a job into the given `registry`. If we are running on a
|
||||
/// worker thread for the registry, this will push onto the
|
||||
/// deque. Else, it will inject from the outside (which is slower).
|
||||
|
|
@ -668,8 +668,8 @@ impl ThreadInfo {
|
|||
}
|
||||
}
|
||||
|
||||
/// ////////////////////////////////////////////////////////////////////////
|
||||
/// WorkerThread identifiers
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WorkerThread identifiers
|
||||
|
||||
pub(super) struct WorkerThread {
|
||||
/// the "worker" half of our local deque
|
||||
|
|
@ -1019,8 +1019,6 @@ impl WorkerThread {
|
|||
}
|
||||
}
|
||||
|
||||
/// ////////////////////////////////////////////////////////////////////////
|
||||
|
||||
unsafe fn main_loop(thread: ThreadBuilder) {
|
||||
let worker_thread = &WorkerThread::from(thread);
|
||||
unsafe { WorkerThread::set_current(worker_thread) };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue