Lines Matching full:safety

37 /// # Safety
66 /// # Safety
69 /// required by [`ByteSlice`] (see that trait's safety documentation) do not
77 /// # Safety
80 /// required by [`ByteSlice`] (see that trait's safety documentation) do not
88 /// # Safety
107 /// # Safety
114 // SAFETY: Above, we ensure that `mid <= self.deref().len()`. By in split_at()
130 /// # Safety
148 #[allow(clippy::missing_safety_doc)] // There's a `Safety` section on `into_byte_slice`.
162 /// # Safety
167 /// Note that, combined with the safety invariant on [`ByteSlice`], this
168 /// safety invariant implies that the returned reference is "stable" in the
173 #[allow(clippy::missing_safety_doc)] // There's a `Safety` section on `into_byte_slice_mut`.
187 /// # Safety
192 /// Note that, combined with the safety invariant on [`ByteSlice`], this
193 /// safety invariant implies that the returned reference is "stable" in the
198 // FIXME(#429): Add a "SAFETY" comment and remove this `allow`.
202 // FIXME(#429): Add a "SAFETY" comment and remove this `allow`.
206 // FIXME(#429): Add a "SAFETY" comment and remove this `allow`.
210 // SAFETY: This delegates to `polyfills:split_at_unchecked`, which is documented
215 // SAFETY: By contract on caller, `mid` is not greater than in split_at_unchecked()
224 // SAFETY: See inline.
228 // SAFETY: It would be patently insane to implement `<Deref for in into_byte_slice()
236 // FIXME(#429): Add a "SAFETY" comment and remove this `allow`.
240 // SAFETY: This delegates to `polyfills:split_at_mut_unchecked`, which is
252 // SAFETY: By contract on caller, `mid` is not greater than in split_at_unchecked()
258 // SAFETY: By contract on caller, `mid` is not greater than in split_at_unchecked()
265 // SAFETY: These invocations of `from_raw_parts_mut` satisfy its in split_at_unchecked()
266 // documented safety preconditions [1]: in split_at_unchecked()
292 // [1] https://doc.rust-lang.org/std/slice/fn.from_raw_parts_mut.html#safety in split_at_unchecked()
300 // SAFETY: See inline.
304 // SAFETY: It would be patently insane to implement `<Deref for &mut in into_byte_slice()
312 // SAFETY: See inline.
316 // SAFETY: It would be patently insane to implement `<DerefMut for &mut in into_byte_slice_mut()
324 // FIXME(#429): Add a "SAFETY" comment and remove this `allow`.
328 // SAFETY: This delegates to stdlib implementation of `Ref::map_split`, which is
336 // SAFETY: By precondition on caller, `mid` is not greater than in split_at_unchecked()
344 // FIXME(#429): Add a "SAFETY" comment and remove this `allow`.
348 // SAFETY: This delegates to stdlib implementation of `RefMut::map_split`, which
356 // SAFETY: By precondition on caller, `mid` is not greater than in split_at_unchecked()
418 // SAFETY: 2 is within bounds of [1, 2, 3, 4] in test_ref_split_at_unchecked()
429 // SAFETY: 2 is within bounds of [1, 2, 3, 4] in test_ref_mut_split_at_unchecked()