From 2750830694ae64031e2af48a02d71425496093be Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 1 Jul 2019 21:00:52 -0400 Subject: [PATCH] remove outdated comment --- src/dependency.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dependency.rs b/src/dependency.rs index d4cf6bec..ab48c6dc 100644 --- a/src/dependency.rs +++ b/src/dependency.rs @@ -21,10 +21,9 @@ pub(crate) struct Dependency { impl Dependency { pub(crate) fn new(slot: Arc + '_>) -> Self { - // Forgive me for I am a horrible monster and pray for death: - // - // Hiding these bounds behind a trait object is a total hack - // but I just want to see how well this works. -nikomatsakis + // Unsafety note: It is safe to 'pretend' the trait object is + // Send+Sync+'static because the phantom-data will reflect the + // reality. let slot: Arc + Send + Sync> = unsafe { std::mem::transmute(slot) }; Self { slot,