@@ -77,7 +77,7 @@ pub(super) fn check<'tcx>(
77
77
& format ! ( "transmute from `{from_ty_orig}` which has an undefined layout" ) ,
78
78
|diag| {
79
79
if from_ty_orig. peel_refs ( ) != from_ty. peel_refs ( ) {
80
- diag. note ( & format ! ( "the contained type `{from_ty}` has an undefined layout" ) ) ;
80
+ diag. note ( format ! ( "the contained type `{from_ty}` has an undefined layout" ) ) ;
81
81
}
82
82
} ,
83
83
) ;
@@ -91,7 +91,7 @@ pub(super) fn check<'tcx>(
91
91
& format ! ( "transmute to `{to_ty_orig}` which has an undefined layout" ) ,
92
92
|diag| {
93
93
if to_ty_orig. peel_refs ( ) != to_ty. peel_refs ( ) {
94
- diag. note ( & format ! ( "the contained type `{to_ty}` has an undefined layout" ) ) ;
94
+ diag. note ( format ! ( "the contained type `{to_ty}` has an undefined layout" ) ) ;
95
95
}
96
96
} ,
97
97
) ;
@@ -119,16 +119,16 @@ pub(super) fn check<'tcx>(
119
119
) ,
120
120
|diag| {
121
121
if let Some ( same_adt_did) = same_adt_did {
122
- diag. note ( & format ! (
122
+ diag. note ( format ! (
123
123
"two instances of the same generic type (`{}`) may have different layouts" ,
124
124
cx. tcx. item_name( same_adt_did)
125
125
) ) ;
126
126
} else {
127
127
if from_ty_orig. peel_refs ( ) != from_ty {
128
- diag. note ( & format ! ( "the contained type `{from_ty}` has an undefined layout" ) ) ;
128
+ diag. note ( format ! ( "the contained type `{from_ty}` has an undefined layout" ) ) ;
129
129
}
130
130
if to_ty_orig. peel_refs ( ) != to_ty {
131
- diag. note ( & format ! ( "the contained type `{to_ty}` has an undefined layout" ) ) ;
131
+ diag. note ( format ! ( "the contained type `{to_ty}` has an undefined layout" ) ) ;
132
132
}
133
133
}
134
134
} ,
@@ -146,7 +146,7 @@ pub(super) fn check<'tcx>(
146
146
& format ! ( "transmute from `{from_ty_orig}` which has an undefined layout" ) ,
147
147
|diag| {
148
148
if from_ty_orig. peel_refs ( ) != from_ty {
149
- diag. note ( & format ! ( "the contained type `{from_ty}` has an undefined layout" ) ) ;
149
+ diag. note ( format ! ( "the contained type `{from_ty}` has an undefined layout" ) ) ;
150
150
}
151
151
} ,
152
152
) ;
@@ -163,7 +163,7 @@ pub(super) fn check<'tcx>(
163
163
& format ! ( "transmute into `{to_ty_orig}` which has an undefined layout" ) ,
164
164
|diag| {
165
165
if to_ty_orig. peel_refs ( ) != to_ty {
166
- diag. note ( & format ! ( "the contained type `{to_ty}` has an undefined layout" ) ) ;
166
+ diag. note ( format ! ( "the contained type `{to_ty}` has an undefined layout" ) ) ;
167
167
}
168
168
} ,
169
169
) ;
0 commit comments