File tree 2 files changed +5
-1
lines changed
libsyntax_ext/deriving/generic
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -757,7 +757,7 @@ impl<'a> TraitDef<'a> {
757
757
758
758
fn find_repr_type_name ( diagnostic : & Handler ,
759
759
type_attrs : & [ ast:: Attribute ] ) -> & ' static str {
760
- let mut repr_type_name = "i32 " ;
760
+ let mut repr_type_name = "i64 " ;
761
761
for a in type_attrs {
762
762
for r in & attr:: find_repr_attrs ( diagnostic, a) {
763
763
repr_type_name = match * r {
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ enum Ei64 {
46
46
Bi64 = 0x8000_0000
47
47
}
48
48
49
+ #[ derive( PartialEq ) ]
49
50
enum Eu64 {
50
51
Au64 = 0 ,
51
52
Bu64 = 0x8000_0000_0000_0000
@@ -60,4 +61,7 @@ pub fn main() {
60
61
assert_eq ! ( size_of:: <Eu32 >( ) , 4 ) ;
61
62
assert_eq ! ( size_of:: <Ei64 >( ) , 8 ) ;
62
63
assert_eq ! ( size_of:: <Eu64 >( ) , 8 ) ;
64
+
65
+ // ensure no i32 collisions
66
+ assert ! ( Eu64 :: Au64 != Eu64 :: Bu64 ) ;
63
67
}
You can’t perform that action at this time.
0 commit comments