@@ -177,10 +177,7 @@ pub trait Push<T> {
177
177
///
178
178
/// E.g.
179
179
///
180
- /// ```rust
181
- /// # #[macro_use] extern crate swagger;
182
- /// # use swagger::{Has, Pop, Push};
183
- ///
180
+ /// ```rust2018
184
181
/// #[derive(Default)]
185
182
/// struct MyType1;
186
183
/// #[derive(Default)]
@@ -197,7 +194,7 @@ pub trait Push<T> {
197
194
/// fn use_has_my_type_3<T: Has<MyType3>> (_: &T) {}
198
195
/// fn use_has_my_type_4<T: Has<MyType4>> (_: &T) {}
199
196
///
200
- /// // will implement `Has<MyType1>` and `Has<MyType2>` because these appear
197
+ /// // Will implement `Has<MyType1>` and `Has<MyType2>` because these appear
201
198
/// // in the type, and were passed to `new_context_type!`. Will not implement
202
199
/// // `Has<MyType3>` even though it was passed to `new_context_type!`, because
203
200
/// // it is not included in the type.
@@ -246,7 +243,7 @@ macro_rules! new_context_type {
246
243
// implement `Push<T>` on the empty context type for each type `T` that
247
244
// was passed to the macro
248
245
$(
249
- impl Push <$types> for $empty_context_name {
246
+ impl $crate :: Push <$types> for $empty_context_name {
250
247
type Result = $context_name<$types, Self >;
251
248
fn push( self , item: $types) -> Self :: Result {
252
249
$context_name{ head: item, tail: Self :: default ( ) }
@@ -278,7 +275,7 @@ macro_rules! new_context_type {
278
275
279
276
// implement `Push<U>` for non-empty lists, for each type `U` that was passed
280
277
// to the macro
281
- impl <C , T > Push <$types> for $context_name<T , C > {
278
+ impl <C , T > $crate :: Push <$types> for $context_name<T , C > {
282
279
type Result = $context_name<$types, Self >;
283
280
fn push( self , item: $types) -> Self :: Result {
284
281
$context_name{ head: item, tail: self }
@@ -288,7 +285,7 @@ macro_rules! new_context_type {
288
285
289
286
// Add implementations of `Has<T>` and `Pop<T>` when `T` is any type stored in
290
287
// the list, not just the head.
291
- new_context_type!( impl extend_has $context_name, $empty_context_name, $( $types) ,+) ;
288
+ $crate :: new_context_type!( impl extend_has $context_name, $empty_context_name, $( $types) ,+) ;
292
289
} ;
293
290
294
291
// "HELPER" MACRO CASE - NOT FOR EXTERNAL USE
@@ -311,7 +308,7 @@ macro_rules! new_context_type {
311
308
$head,
312
309
$( $tail) ,+
313
310
) ;
314
- new_context_type!( impl extend_has $context_name, $empty_context_name, $( $tail) ,+) ;
311
+ $crate :: new_context_type!( impl extend_has $context_name, $empty_context_name, $( $tail) ,+) ;
315
312
} ;
316
313
317
314
// "HELPER" MACRO CASE - NOT FOR EXTERNAL USE
0 commit comments