Skip to content

Commit 6164bd0

Browse files
committed
Allow missing_safety_doc in deprecated segment functions
Signed-off-by: Joe Richey <[email protected]>
1 parent a7de595 commit 6164bd0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/instructions/segmentation.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,48 +202,56 @@ impl GS {
202202

203203
/// Alias for [`CS::set_reg()`]
204204
#[deprecated(since = "0.14.4", note = "use `CS::set_reg()` instead")]
205+
#[allow(clippy::missing_safety_doc)]
205206
#[inline]
206207
pub unsafe fn set_cs(sel: SegmentSelector) {
207208
CS::set_reg(sel)
208209
}
209210
/// Alias for [`SS::set_reg()`]
210211
#[deprecated(since = "0.14.4", note = "use `SS::set_reg()` instead")]
212+
#[allow(clippy::missing_safety_doc)]
211213
#[inline]
212214
pub unsafe fn load_ss(sel: SegmentSelector) {
213215
SS::set_reg(sel)
214216
}
215217
/// Alias for [`DS::set_reg()`]
216218
#[deprecated(since = "0.14.4", note = "use `DS::set_reg()` instead")]
219+
#[allow(clippy::missing_safety_doc)]
217220
#[inline]
218221
pub unsafe fn load_ds(sel: SegmentSelector) {
219222
DS::set_reg(sel)
220223
}
221224
/// Alias for [`ES::set_reg()`]
222225
#[deprecated(since = "0.14.4", note = "use `ES::set_reg()` instead")]
226+
#[allow(clippy::missing_safety_doc)]
223227
#[inline]
224228
pub unsafe fn load_es(sel: SegmentSelector) {
225229
ES::set_reg(sel)
226230
}
227231
/// Alias for [`FS::set_reg()`]
228232
#[deprecated(since = "0.14.4", note = "use `FS::set_reg()` instead")]
233+
#[allow(clippy::missing_safety_doc)]
229234
#[inline]
230235
pub unsafe fn load_fs(sel: SegmentSelector) {
231236
FS::set_reg(sel)
232237
}
233238
/// Alias for [`GS::set_reg()`]
234239
#[deprecated(since = "0.14.4", note = "use `GS::set_reg()` instead")]
240+
#[allow(clippy::missing_safety_doc)]
235241
#[inline]
236242
pub unsafe fn load_gs(sel: SegmentSelector) {
237243
GS::set_reg(sel)
238244
}
239245
/// Alias for [`GS::swap()`]
240246
#[deprecated(since = "0.14.4", note = "use `GS::swap()` instead")]
247+
#[allow(clippy::missing_safety_doc)]
241248
#[inline]
242249
pub unsafe fn swap_gs() {
243250
GS::swap()
244251
}
245252
/// Alias for [`CS::get_reg()`]
246253
#[deprecated(since = "0.14.4", note = "use `CS::get_reg()` instead")]
254+
#[allow(clippy::missing_safety_doc)]
247255
#[inline]
248256
pub fn cs() -> SegmentSelector {
249257
CS::get_reg()
@@ -252,12 +260,14 @@ pub fn cs() -> SegmentSelector {
252260
///
253261
/// Raises #GP if the provided address is non-canonical.
254262
#[deprecated(since = "0.14.4", note = "use `FS::write_base()` instead")]
263+
#[allow(clippy::missing_safety_doc)]
255264
#[inline]
256265
pub unsafe fn wrfsbase(val: u64) {
257266
FS::write_base(VirtAddr::new(val))
258267
}
259268
/// Alias for [`FS::read_base()`]
260269
#[deprecated(since = "0.14.4", note = "use `FS::read_base()` instead")]
270+
#[allow(clippy::missing_safety_doc)]
261271
#[inline]
262272
pub unsafe fn rdfsbase() -> u64 {
263273
FS::read_base().as_u64()
@@ -266,12 +276,14 @@ pub unsafe fn rdfsbase() -> u64 {
266276
///
267277
/// Raises #GP if the provided address is non-canonical.
268278
#[deprecated(since = "0.14.4", note = "use `GS::write_base()` instead")]
279+
#[allow(clippy::missing_safety_doc)]
269280
#[inline]
270281
pub unsafe fn wrgsbase(val: u64) {
271282
GS::write_base(VirtAddr::new(val))
272283
}
273284
/// Alias for [`GS::read_base()`]
274285
#[deprecated(since = "0.14.4", note = "use `GS::read_base()` instead")]
286+
#[allow(clippy::missing_safety_doc)]
275287
#[inline]
276288
pub unsafe fn rdgsbase() -> u64 {
277289
GS::read_base().as_u64()

0 commit comments

Comments
 (0)