File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ impl<T> fmt::Display for PoisonError<T> {
111111}
112112
113113#[ stable( feature = "rust1" , since = "1.0.0" ) ]
114- impl < T : Send + Reflect > Error for PoisonError < T > {
114+ impl < T : Reflect > Error for PoisonError < T > {
115115 fn description ( & self ) -> & str {
116116 "poisoned lock: another task failed inside"
117117 }
@@ -158,14 +158,17 @@ impl<T> fmt::Debug for TryLockError<T> {
158158}
159159
160160#[ stable( feature = "rust1" , since = "1.0.0" ) ]
161- impl < T : Send + Reflect > fmt:: Display for TryLockError < T > {
161+ impl < T > fmt:: Display for TryLockError < T > {
162162 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
163- self . description ( ) . fmt ( f)
163+ match * self {
164+ TryLockError :: Poisoned ( ..) => "poisoned lock: another task failed inside" ,
165+ TryLockError :: WouldBlock => "try_lock failed because the operation would block"
166+ } . fmt ( f)
164167 }
165168}
166169
167170#[ stable( feature = "rust1" , since = "1.0.0" ) ]
168- impl < T : Send + Reflect > Error for TryLockError < T > {
171+ impl < T : Reflect > Error for TryLockError < T > {
169172 fn description ( & self ) -> & str {
170173 match * self {
171174 TryLockError :: Poisoned ( ref p) => p. description ( ) ,
You can’t perform that action at this time.
0 commit comments