File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
branches/tmp/src/librustc/lint Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34
34
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
35
35
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
36
36
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37
- refs/heads/tmp: 73d5d89567ef155dc12ee7d7ed61e206e43bf74e
37
+ refs/heads/tmp: b6f55efd5b21b2132dafa85c112b339ba498bc7c
Original file line number Diff line number Diff line change @@ -2107,7 +2107,10 @@ impl LintPass for InvalidNoMangleItems {
2107
2107
} ,
2108
2108
ast:: ItemConst ( ..) => {
2109
2109
if attr:: contains_name ( it. attrs . as_slice ( ) , "no_mangle" ) {
2110
- let msg = "const items should never be #[no_mangle]" ;
2110
+ // Const items do not refer to a particular location in memory, and therefore
2111
+ // don't have anything to attach a symbol to
2112
+ let msg = "const items should never be #[no_mangle], consider instead using \
2113
+ `pub static`";
2111
2114
cx. span_lint ( NO_MANGLE_CONST_ITEMS , it. span , msg) ;
2112
2115
}
2113
2116
}
You can’t perform that action at this time.
0 commit comments