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(
116
116
let llty2 = if let ty:: RawPtr ( ref mt) = ty. sty {
117
117
cx. layout_of ( mt. ty ) . llvm_type ( cx)
118
118
} 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" )
120
121
} ;
121
122
unsafe {
122
123
// Declare a symbol `foo` with the desired linkage.
Original file line number Diff line number Diff line change 7
7
8
8
extern {
9
9
#[ 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
11
11
}
12
12
13
13
fn 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
2
2
--> $DIR/linkage2.rs:9:32
3
3
|
4
4
LL | #[linkage = "extern_weak"] static foo: i32;
You can’t perform that action at this time.
0 commit comments