File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,8 @@ fn check_and_apply_linkage(
116116 let llty2 = if let ty:: RawPtr ( ref mt) = ty. sty {
117117 cx. layout_of ( mt. ty ) . llvm_type ( cx)
118118 } else {
119- cx. sess ( ) . span_fatal ( span, "must have type `*const T` or `*mut T`" )
119+ cx. sess ( ) . span_fatal (
120+ span, "must have type `*const T` or `*mut T` due to `#[linkage]` attribute" )
120121 } ;
121122 unsafe {
122123 // Declare a symbol `foo` with the desired linkage.
Original file line number Diff line number Diff line change 77
88extern {
99 #[ linkage = "extern_weak" ] static foo: i32 ;
10- //~^ ERROR: must have type `*const T` or `*mut T`
10+ //~^ ERROR: must have type `*const T` or `*mut T` due to `#[linkage]` attribute
1111}
1212
1313fn main ( ) {
Original file line number Diff line number Diff line change 1- error: must have type `*const T` or `*mut T`
1+ error: must have type `*const T` or `*mut T` due to `#[linkage]` attribute
22 --> $DIR/linkage2.rs:9:32
33 |
44LL | #[linkage = "extern_weak"] static foo: i32;
You can’t perform that action at this time.
0 commit comments