File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,20 @@ macro_rules! pre_emit {
41
41
} ;
42
42
( $( $_: tt) * ) => { } ;
43
43
}
44
+
45
+ // TODO: remove the mannually written Label conversions. These can be auto-generated by
46
+ // changing the base class of AssocItem from AstNode to Item
44
47
impl From < crate :: trap:: Label < generated:: AssocItem > > for crate :: trap:: Label < generated:: Item > {
45
48
fn from ( value : crate :: trap:: Label < generated:: AssocItem > ) -> Self {
46
- // SAFETY: this is safe because in the dbscheme Item is a subclass of Stmt
49
+ // SAFETY: this is safe because every concrete instance of `@assoc_item` is also an instance of `@item`
47
50
unsafe { Self :: from_untyped ( value. as_untyped ( ) ) }
48
51
}
49
52
}
53
+ // TODO: remove the mannually written Label conversions. These can be auto-generated by
54
+ // changing the base class of ExternItem from AstNode to Item
50
55
impl From < crate :: trap:: Label < generated:: ExternItem > > for crate :: trap:: Label < generated:: Item > {
51
56
fn from ( value : crate :: trap:: Label < generated:: ExternItem > ) -> Self {
52
- // SAFETY: this is safe because in the dbscheme Item is a subclass of Stmt
57
+ // SAFETY: this is safe because every concrete instance of `@extern_item` is also an instance of `@item`
53
58
unsafe { Self :: from_untyped ( value. as_untyped ( ) ) }
54
59
}
55
60
}
You can’t perform that action at this time.
0 commit comments