27 |
/// be able to mutate the reference counter.
|
28 |
#[allow(clippy::mut_from_ref)]
|
29 |
#[inline]
|
38 |
#[allow(clippy::mut_from_ref)]
|
39 |
pub(crate) unsafe fn get_mut_unsafe(&self) -> &mut T {
|
44 |
#[allow(clippy::mut_from_ref)]
|
45 |
pub(crate) unsafe fn get_mut_unsafe(&self) -> &mut T {
|
262 |
#[allow(clippy::mut_from_ref, clippy::missing_errors_doc)]
|
263 |
/// A trait that mark a function as differentiable
|
48 |
/// Clone an AST with another backing [arena](bumpalo::Bump)
|
49 |
#[allow(clippy::mut_from_ref)]
|
50 |
pub fn clone_in<'new_arena>(
|
25 |
#[allow(mutable_transmutes)]
|
26 |
#[allow(clippy::mut_from_ref)]
|
27 |
fn as_mut(&self) -> &'static mut Self {
|
392 |
}
|
393 |
#[allow(clippy::mut_from_ref)]
|
394 |
pub fn get_mut(&self) -> &mut TileMap<TestTile, E> {
|
17 |
#[inline]
|
18 |
#[allow(clippy::mut_from_ref)]
|
19 |
pub fn get_mut(&self) -> &mut T {
|
133 |
#[inline(always)]
|
134 |
#[allow(clippy::mut_from_ref)]
|
135 |
fn raw_table_mut(&self) -> &mut RawTable<K, V> {
|
37 |
#[inline(always)]
|
38 |
#[allow(clippy::mut_from_ref)]
|
39 |
fn db_mut(&self) -> &mut DB {
|
87 |
// Returning `mut` is allowed because of `UnsafeCell`
|
88 |
#[allow(clippy::mut_from_ref)]
|
89 |
unsafe fn page(&self, index: usize) -> &mut Option<Page<T>> {
|
95 |
// Returning `mut` is allowed because of `UnsafeCell`
|
96 |
#[allow(clippy::mut_from_ref)]
|
97 |
unsafe fn page_or_create(&self, index: usize) -> (&mut Page<T>, usize, usize) {
|
23 |
/// The [`Waiter`] must be accessed from multiple threads at the same time.
|
24 |
#[allow(clippy::mut_from_ref)]
|
25 |
pub unsafe fn get(&self) -> &mut WaiterInner {
|
335 |
/// callback, meaning that this shouldn't be a problem in practice.
|
336 |
#[allow(clippy::mut_from_ref)]
|
337 |
pub(super) unsafe fn from_field(obj: &Object) -> &mut Self {
|
165 |
#[inline(always)]
|
166 |
#[allow(clippy::mut_from_ref)]
|
167 |
fn inner_mut(&self) -> &mut BBlockInner {
|
13 |
/// Ensure that the access is unique (no active references, mutable or not).
|
14 |
#[allow(clippy::mut_from_ref)]
|
15 |
pub unsafe fn get_mut(&self) -> &mut T {
|
137 |
/// Only called by `Registration`
|
138 |
#[allow(clippy::mut_from_ref)] // https://github.com/rust-lang/rust-clippy/issues/4281
|
139 |
pub(crate) unsafe fn time_mut(&self) -> &mut Time {
|
803 |
#[inline(always)]
|
804 |
#[allow(clippy::mut_from_ref)]
|
805 |
pub fn alloc<T>(&self, val: T) -> &mut T {
|
823 |
#[inline(always)]
|
824 |
#[allow(clippy::mut_from_ref)]
|
825 |
pub fn try_alloc<T>(&self, val: T) -> Result<&mut T, AllocErr> {
|
848 |
#[inline(always)]
|
849 |
#[allow(clippy::mut_from_ref)]
|
850 |
pub fn alloc_with<F, T>(&self, f: F) -> &mut T
|
901 |
#[inline(always)]
|
902 |
#[allow(clippy::mut_from_ref)]
|
903 |
pub fn try_alloc_with<F, T>(&self, f: F) -> Result<&mut T, AllocErr>
|
973 |
#[inline(always)]
|
974 |
#[allow(clippy::mut_from_ref)]
|
975 |
pub fn alloc_try_with<F, T, E>(&self, f: F) -> Result<&mut T, E>
|
193 |
/// lifetime of the returned reference.
|
194 |
#[allow(clippy::mut_from_ref)]
|
195 |
pub unsafe fn get_unchecked_mut(&self) -> &mut T {
|
160 |
#[inline]
|
161 |
#[allow(clippy::mut_from_ref)]
|
162 |
unsafe fn get_mut_bufs(&self) -> &mut [Mmap] {
|
110 |
#[allow(clippy::mut_from_ref)]
|
111 |
unsafe fn slice_mut(&self) -> &mut [u8] {
|
119 |
#[allow(clippy::mut_from_ref)]
|
120 |
pub unsafe fn slot_mut(&self, slot: usize) -> &mut [u8] {
|
21 |
#[allow(clippy::mut_from_ref)]
|
22 |
pub fn alloc(&'a self, value: RangeTree<'a>) -> &'a mut RangeTree<'a> {
|
178 |
#[inline(always)]
|
179 |
#[allow(clippy::mut_from_ref)]
|
180 |
pub(crate) fn as_bucket_mut<K: Hash + Eq + Clone + Debug, V: Clone>(
|
209 |
#[inline(always)]
|
210 |
#[allow(clippy::mut_from_ref)]
|
211 |
pub(crate) fn as_branch_mut<K: Hash + Eq + Clone + Debug, V: Clone>(
|
224 |
#[inline(always)]
|
225 |
#[allow(clippy::mut_from_ref)]
|
226 |
unsafe fn as_branch_mut_nock<K: Hash + Eq + Clone + Debug, V: Clone>(
|
20 |
/// This returns a mutable reference with the same lifetime as the [`Container`].
|
21 |
#[allow(clippy::mut_from_ref)]
|
22 |
fn put_mut(&self, item: T) -> &mut T;
|
15 |
#[allow(clippy::mut_from_ref)] // Dirty.
|
16 |
pub(crate) unsafe fn get_node_mut(&self) -> &mut NodeLeaf<E, I, IE, LE> {
|
125 |
// pointer, so we have to do that here.
|
126 |
#[allow(clippy::mut_from_ref)]
|
127 |
#[inline(always)]
|
211 |
#[inline(always)]
|
212 |
#[allow(clippy::mut_from_ref)]
|
213 |
fn self_mut(&self) -> &mut Self {
|
220 |
#[inline]
|
221 |
#[allow(clippy::mut_from_ref)]
|
222 |
/// Takes a log and returns a mutable reference to the underlying data.
|
1164 |
trait PrcBoxPtr<T: PSafe + ?Sized, A: MemPool> {
|
1165 |
#[allow(clippy::mut_from_ref)]
|
1166 |
fn count(&self) -> &mut Counter<A>;
|
107 |
#[inline]
|
108 |
#[allow(clippy::mut_from_ref)]
|
109 |
/// Returns the mutable reference of the value
|
167 |
#[inline]
|
168 |
#[allow(clippy::mut_from_ref)]
|
169 |
#[track_caller]
|
182 |
#[inline]
|
183 |
#[allow(clippy::mut_from_ref)]
|
184 |
fn self_mut(&self) -> &mut Self {
|
191 |
#[inline(always)]
|
192 |
#[allow(clippy::mut_from_ref)]
|
193 |
fn self_mut(&self) -> &mut Self {
|
200 |
#[inline]
|
201 |
#[allow(clippy::mut_from_ref)]
|
202 |
/// Takes a log and returns a mutable reference to the underlying data.
|
258 |
#[inline]
|
259 |
#[allow(clippy::mut_from_ref)]
|
260 |
#[inline]
|
855 |
trait PrcBoxPtr<T: PSafe + ?Sized, A: MemPool> {
|
856 |
#[allow(clippy::mut_from_ref)]
|
857 |
fn count(&self) -> &mut Counter;
|
103 |
#[inline]
|
104 |
#[allow(clippy::mut_from_ref)]
|
105 |
/// Returns the mutable reference of the value
|
168 |
#[inline]
|
169 |
#[allow(clippy::mut_from_ref)]
|
170 |
/// Takes a log and returns a `&mut T` for interior mutability
|
181 |
#[inline]
|
182 |
#[allow(clippy::mut_from_ref)]
|
183 |
fn self_mut(&self) -> &mut Self {
|
78 |
#[allow(clippy::mut_from_ref)]
|
79 |
pub trait Arena {
|
12 |
impl Node {
|
13 |
#[allow(clippy::mut_from_ref)]
|
14 |
pub fn new<A: Arena>(data: Bytes, height: usize, arena: &A) -> &mut Self {
|
28 |
#[allow(clippy::mut_from_ref)]
|
29 |
pub fn head<A: Arena>(arena: &A) -> &mut Self {
|
68 |
#[inline]
|
69 |
#[allow(clippy::mut_from_ref)]
|
70 |
pub(crate) unsafe fn app(&self) -> &mut A {
|
22 |
#[allow(clippy::mut_from_ref)]
|
23 |
pub fn alloc(&'a self, value: RangeTree<'a>) -> &'a mut RangeTree<'a> {
|
21 |
#[allow(clippy::mut_from_ref)]
|
22 |
pub fn alloc(&'a self, value: RangeTree<'a>) -> &'a mut RangeTree<'a> {
|
22 |
#[allow(clippy::mut_from_ref)]
|
23 |
pub fn alloc(&'a self, value: RangeTree<'a>) -> &'a mut RangeTree<'a> {
|
210 |
#[allow(clippy::mut_from_ref)]
|
211 |
pub fn string_pool(&self) -> &mut StringPool {
|
34 |
#[allow(clippy::mut_from_ref)]
|
35 |
pub(crate) unsafe fn bump_mut(&self) -> &mut Bump {
|
643 |
/// ```
|
644 |
#[allow(clippy::mut_from_ref)]
|
645 |
pub fn use_hook<State: 'static>(&self, initializer: impl FnOnce() -> State) -> &mut State {
|
72 |
#[allow(clippy::mut_from_ref)]
|
73 |
#[allow(clippy::missing_safety_doc)]
|
33 |
#[allow(clippy::mut_from_ref)]
|
34 |
unsafe fn rx_waker_mut(&self) -> &mut MaybeUninit<Waker>;
|
36 |
#[allow(clippy::mut_from_ref)]
|
37 |
unsafe fn tx_waker_mut(&self) -> &mut MaybeUninit<Waker>;
|
168 |
#[allow(clippy::mut_from_ref)]
|
169 |
unsafe fn err_mut(&self) -> &mut Option<Self::Error>;
|
17 |
// This is safe because this container cannot be immutably iterated over
|
18 |
#[allow(clippy::mut_from_ref)]
|
19 |
pub(crate) fn push(&self, mut value: T) -> &mut T {
|
156 |
#[inline]
|
157 |
#[allow(clippy::mut_from_ref)]
|
158 |
pub fn alloc_copy<T: Copy + Send>(&self, value: T) -> &mut T {
|
170 |
#[inline]
|
171 |
#[allow(clippy::mut_from_ref)]
|
172 |
pub unsafe fn alloc_unchecked<T>(&self, value: T) -> &mut T {
|
239 |
#[inline]
|
240 |
#[allow(clippy::mut_from_ref)]
|
241 |
pub fn alloc<T: Send + 'a>(&self, value: T) -> &mut T {
|
267 |
#[inline]
|
268 |
#[allow(clippy::mut_from_ref)]
|
269 |
pub fn alloc<T: 'a>(&self, value: T) -> &mut T {
|
15 |
#[allow(clippy::mut_from_ref)]
|
16 |
pub unsafe fn as_mut(&self) -> &mut T {
|
45 |
/// get the global THREADS list, mutable
|
46 |
#[allow(clippy::mut_from_ref)]
|
47 |
pub(crate) unsafe fn get_mut(cs: &CriticalSection) -> &mut Threads {
|
44 |
#[allow(clippy::mut_from_ref)]
|
45 |
pub(crate) unsafe fn get_mut_unsafe(&self) -> &mut T {
|
318 |
#[allow(clippy::mut_from_ref)]
|
319 |
#[inline]
|
24 |
#[allow(clippy::mut_from_ref)]
|
25 |
pub unsafe fn get(&self) -> &mut T {
|
111 |
/// [`handle_alloc_error`]: alloc::alloc::handle_alloc_error
|
112 |
#[allow(clippy::mut_from_ref)]
|
113 |
#[must_use]
|
130 |
/// If allocation fails, <code>[Err]\(value)</code> is returned.
|
131 |
#[allow(clippy::mut_from_ref)]
|
132 |
pub fn try_alloc_value<T>(&self, value: T) -> Result<&mut T, T> {
|
92 |
/// [`handle_alloc_error`]: alloc::alloc::handle_alloc_error
|
93 |
#[allow(clippy::mut_from_ref)]
|
94 |
#[must_use]
|
111 |
/// If allocation fails, <code>[Err]\(value)</code> is returned.
|
112 |
#[allow(clippy::mut_from_ref)]
|
113 |
pub fn try_alloc_value<T>(&self, value: T) -> Result<&mut T, T> {
|
57 |
#[allow(clippy::mut_from_ref)]
|
58 |
#[must_use]
|
69 |
#[allow(clippy::mut_from_ref)]
|
70 |
pub fn try_alloc_value<T>(&self, value: T) -> Result<&mut T, T> {
|
81 |
/// [`handle_alloc_error`]: alloc::alloc::handle_alloc_error
|
82 |
#[allow(clippy::mut_from_ref)]
|
83 |
pub fn alloc(&self, value: T) -> &mut T
|
100 |
/// Like [`Self::alloc`], but returns [`None`] if memory allocation fails.
|
101 |
#[allow(clippy::mut_from_ref)]
|
102 |
pub fn try_alloc(&self, value: T) -> Option<&mut T>
|
44 |
#[allow(clippy::mut_from_ref)]
|
45 |
fn get_unique(&self) -> &mut T {
|
400 |
// "logically" immutable and reference counted.
|
401 |
#[allow(clippy::mut_from_ref)]
|
402 |
unsafe fn rep_mut(&self) -> &mut StrRep<'a> {
|
219 |
#[allow(clippy::mut_from_ref)]
|
220 |
fn get_device<'b, 'c>(&'b self, device_no: DeviceNo) -> &'c Device {
|
220 |
#[allow(clippy::mut_from_ref)] // unsafe anyway
|
221 |
unsafe fn local_future(&self) -> &mut Option<LocalFutureObj<'static, ()>> {
|
37 |
// at most one pop operation must be in progress at a time.
|
38 |
#[allow(clippy::mut_from_ref)]
|
39 |
pub unsafe fn start_pop(&self) -> impl Iterator<Item = *const Link> + '_ {
|
168 |
#[allow(clippy::mut_from_ref)]
|
169 |
#[doc(alias = "gdk_window_get_user_data")]
|
244 |
/// or write to the data.
|
245 |
#[allow(clippy::mut_from_ref)]
|
246 |
#[allow(clippy::missing_safety_doc)]
|
161 |
#[inline]
|
162 |
#[allow(clippy::mut_from_ref)]
|
163 |
pub unsafe fn get_mut_ref<K>(&self, key: K) -> &mut Variant
|
80 |
#[inline]
|
81 |
#[allow(clippy::mut_from_ref)]
|
82 |
pub unsafe fn get_mut_ref(&self, idx: i32) -> &mut Variant {
|
218 |
#[allow(clippy::mut_from_ref)]
|
219 |
pub fn get_mut<T: Sized>(&self, ix: u64) -> &mut T {
|
232 |
#[allow(clippy::mut_from_ref)]
|
233 |
pub fn get_mut_cell_slice<T: Sized>(&self, ix: u64, len: u64) -> &mut [T] {
|
249 |
// Messy code ahead
|
250 |
#[allow(clippy::mut_from_ref)]
|
251 |
fn root_mut(&self) -> &mut Option<Box<Node<K, V>>> {
|
114 |
/// Returns a typed slice of the mapped memory range.
|
115 |
#[allow(clippy::mut_from_ref)]
|
116 |
pub unsafe fn map_buffer<T>(
|
333 |
#[inline]
|
334 |
#[allow(unknown_lints, clippy::mut_from_ref)]
|
335 |
unsafe fn copy_mut_lifetime<'a, S: ?Sized, T: ?Sized + 'a>(_ptr: &'a S, ptr: &mut T) -> &'a mut T {
|
70 |
}
|
71 |
#[allow(clippy::mut_from_ref)]
|
72 |
#[inline(always)]
|
86 |
#[allow(clippy::mut_from_ref)]
|
87 |
pub fn map_mut(&self) -> &mut MmapMut {
|
148 |
#[allow(clippy::mut_from_ref)]
|
149 |
pub fn map_mut(&self) -> &mut MmapMut {
|
25 |
#[inline]
|
26 |
#[allow(clippy::mut_from_ref)]
|
27 |
pub fn get_mut(&self) -> &mut T {
|
60 |
#[allow(clippy::mut_from_ref)]
|
61 |
impl<'a> Value<'a> {
|
98 |
#[allow(clippy::mut_from_ref)]
|
99 |
fn get_idlayer(&self) -> &mut Self::IdlLayerType;
|
672 |
#[allow(clippy::mut_from_ref)]
|
673 |
fn get_idlayer(&self) -> &mut IdlArcSqliteReadTransaction<'a> {
|
696 |
#[allow(clippy::mut_from_ref)]
|
697 |
fn get_idlayer(&self) -> &mut IdlArcSqliteWriteTransaction<'a> {
|
127 |
/// Only called by `Registration`
|
128 |
#[allow(clippy::mut_from_ref)] // https://github.com/rust-lang/rust-clippy/issues/4281
|
129 |
pub(crate) unsafe fn time_mut(&self) -> &mut Time {
|
93 |
#[allow(clippy::mut_from_ref)]
|
94 |
pub(crate) unsafe fn get_mut_unsafe(&self) -> &mut T {
|
137 |
/// Only called by `Registration`
|
138 |
#[allow(clippy::mut_from_ref)] // https://github.com/rust-lang/rust-clippy/issues/4281
|
139 |
pub(crate) unsafe fn time_mut(&self) -> &mut Time {
|
57 |
/// 取出可变数据引用
|
58 |
#[allow(clippy::mut_from_ref)]
|
59 |
pub fn to_mut<V>(&self) -> &mut V {
|
99 |
/// 取出可变数据引用,可采用继承类型的特征,不需要与原始类型完全一致
|
100 |
#[allow(clippy::mut_from_ref)]
|
101 |
pub fn to_mut<V>(&self) -> &mut V {
|
77 |
/// Returns a mutable reference to `kvm_run`.
|
78 |
#[allow(clippy::mut_from_ref)]
|
79 |
pub fn as_mut_ref(&self) -> &mut kvm_run {
|
9 |
#[allow(dead_code)]
|
10 |
#[allow(clippy::mut_from_ref)]
|
11 |
#[allow(clippy::too_many_arguments)]
|
117 |
#[allow(clippy::mut_from_ref)]
|
118 |
unsafe fn get_mut(&self) -> &mut dyn ParallelRunnable {
|
104 |
#[allow(clippy::mut_from_ref)]
|
105 |
unsafe fn get_mut(&self) -> &mut dyn Schedulable {
|
45 |
#[allow(clippy::mut_from_ref)]
|
46 |
pub fn alloc_expression(&'a self, expr: Expression<'a>) -> &'a Expression<'a> {
|
53 |
#[allow(clippy::mut_from_ref)]
|
54 |
pub fn alloc_statement(&'a self, statement: Statement<'a>) -> &'a Statement<'a> {
|
61 |
#[allow(clippy::mut_from_ref)]
|
62 |
pub fn alloc_variable(&'a self, variable: Variable<'a>) -> &'a Variable<'a> {
|
69 |
#[allow(clippy::mut_from_ref)]
|
70 |
pub fn alloc_scope(&'a self, scope: Scope<'a>) -> &'a Scope<'a> {
|
77 |
#[allow(clippy::mut_from_ref)]
|
78 |
pub fn alloc_circuit(&'a self, circuit: Circuit<'a>) -> &'a Circuit<'a> {
|
55 |
#[allow(clippy::mut_from_ref)]
|
56 |
impl<'a> Scope<'a> {
|
312 |
#[inline]
|
313 |
#[allow(clippy::mut_from_ref)]
|
314 |
fn get_shadow_page(emu: &Emulator, page: GuestAddr) -> &mut [i8] {
|
1242 |
// SAFETY: it's a new NcPlane, not a new one
|
1243 |
#[allow(clippy::mut_from_ref)]
|
1244 |
pub fn dup(&self) -> &mut NcPlane {
|
251 |
// Messy code ahead
|
252 |
#[allow(clippy::mut_from_ref)]
|
253 |
fn root_mut(&self) -> &mut Option<Box<Node<K, V>>> {
|
27 |
#[allow(unused)]
|
28 |
#[allow(clippy::mut_from_ref)]
|
29 |
pub(crate) const unsafe fn const_cast<T: ?Sized>(x: &T) -> &mut T {
|
93 |
#[inline]
|
94 |
#[allow(clippy::mut_from_ref)] // the function is marked as unsafe for a reason
|
95 |
pub unsafe fn get_mut(&self, id: &PageId) -> &mut T {
|
406 |
// pointer, so we have to do that here.
|
407 |
#[allow(clippy::mut_from_ref)]
|
408 |
pub unsafe fn deref(&self) -> &mut T {
|
37 |
/// - the value is atomic, so thread-safely update.
|
38 |
#[allow(clippy::mut_from_ref)]
|
39 |
#[inline(always)]
|
59 |
#[allow(clippy::mut_from_ref)]
|
60 |
unsafe fn get_handler(this: &Object) -> &mut (Box<dyn Fn(&Window, FileDropEvent) -> bool>, Rc<Window>) {
|
101 |
/// [`capacity`]: Storage::capacity
|
102 |
#[allow(clippy::mut_from_ref)]
|
103 |
unsafe fn slice_mut_unchecked(&self, range: Range<usize>) -> &mut [T];
|
160 |
#[allow(clippy::cast_ref_to_mut)]
|
161 |
#[allow(clippy::mut_from_ref)]
|
162 |
unsafe fn mut_self(&self) -> &mut Self {
|
366 |
#[allow(clippy::cast_ref_to_mut)]
|
367 |
#[allow(clippy::mut_from_ref)]
|
368 |
unsafe fn mut_self(&self) -> &mut Self {
|
460 |
#[allow(clippy::cast_ref_to_mut)]
|
461 |
#[allow(clippy::mut_from_ref)]
|
462 |
unsafe fn mut_self(&self) -> &mut Self {
|
228 |
#[allow(clippy::cast_ref_to_mut)]
|
229 |
#[allow(clippy::mut_from_ref)]
|
230 |
unsafe fn mut_self(&self) -> &mut Self {
|
259 |
#[allow(clippy::cast_ref_to_mut)]
|
260 |
#[allow(clippy::mut_from_ref)]
|
261 |
unsafe fn mut_self(&self) -> &mut Self {
|
223 |
#[allow(clippy::cast_ref_to_mut)]
|
224 |
#[allow(clippy::mut_from_ref)]
|
225 |
unsafe fn mut_self(&self) -> &mut Self {
|
239 |
impl Session {
|
240 |
#[allow(clippy::mut_from_ref)]
|
241 |
unsafe fn inner (&self) -> &mut Option<Vec<Message>> {
|
245 |
#[allow(clippy::mut_from_ref)]
|
246 |
fn vec (&self) -> &mut Vec<Message> {
|
196 |
impl SourceManager {
|
197 |
#[allow(clippy::mut_from_ref)]
|
198 |
unsafe fn inner (&self) -> &mut Option<SlotMap<SourceKey, Source>> {
|
202 |
#[allow(clippy::mut_from_ref)]
|
203 |
fn map (&self) -> &mut SlotMap<SourceKey, Source> {
|
132 |
/// Return slice for copying data from user space to Buf.
|
133 |
#[allow(clippy::mut_from_ref)]
|
134 |
pub(crate) fn buf_to_write(&mut self) -> &mut [u8] {
|
36 |
impl<T> PersistedPerInstanceVec<T> {
|
37 |
#[allow(clippy::mut_from_ref)]
|
38 |
fn borrow_mut<F>(&self, f: F)
|
83 |
#[allow(clippy::mut_from_ref)]
|
84 |
pub(crate) fn borrow_mut<F, R>(&self, f: F) -> R
|
455 |
/// data race because we assert that a lock is around insert. Porting C++ to Rust kinda hurts :/
|
456 |
#[allow(clippy::mut_from_ref)]
|
457 |
fn head_mut(&self) -> &mut SkipNode<K, V> {
|
47 |
#[allow(clippy::mut_from_ref)]
|
48 |
pub(crate) fn get_mut(&self) -> &mut T {
|
37 |
#[allow(clippy::mut_from_ref)]
|
38 |
pub(super) fn get_mut(&self) -> &mut T {
|
100 |
#[allow(clippy::mut_from_ref)]
|
101 |
fn get_inner<T>(inner: &Cell<Slab<Inner<T>>>, token: usize) -> &mut Inner<T> {
|
800 |
#[inline(always)]
|
801 |
#[allow(clippy::mut_from_ref)]
|
802 |
pub unsafe fn uget_mut<Idx>(&self, index: Idx) -> &mut T
|
223 |
#[allow(clippy::mut_from_ref)]
|
224 |
unsafe fn get(&self) -> &mut FxHashMap<NPY_DATETIMEUNIT, Py<PyArrayDescr>> {
|
107 |
#[allow(clippy::needless_lifetimes)]
|
108 |
#[allow(clippy::mut_from_ref)]
|
109 |
pub unsafe fn ptr_as_mut<'p, T: ?Sized>(&'p self, ptr: *mut T) -> &'p mut T {
|
544 |
#[allow(clippy::needless_lifetimes)]
|
545 |
#[allow(clippy::mut_from_ref)]
|
546 |
pub fn autorelease<'p>(self, pool: &'p AutoreleasePool) -> &'p mut T {
|
192 |
#[allow(clippy::mut_from_ref)]
|
193 |
pub unsafe fn as_mut_unchecked(&self) -> &mut T {
|
251 |
// Messy code ahead
|
252 |
#[allow(clippy::mut_from_ref)]
|
253 |
fn root_mut(&self) -> &mut Option<Box<Node<K, V>>> {
|
2 |
/// This may break aliasing rules, make sure you are the only owner.
|
3 |
#[allow(clippy::mut_from_ref)]
|
4 |
pub unsafe fn to_mutable_slice<T: Copy>(s: &[T]) -> &mut [T] {
|
149 |
#[allow(clippy::mut_from_ref)]
|
150 |
unsafe fn downcast_mut<T>(&self) -> &mut T {
|
201 |
/// apply to this function as well.
|
202 |
#[allow(clippy::mut_from_ref)]
|
203 |
pub unsafe fn as_bytes_mut(&self) -> &mut [u8] {
|
433 |
/// leak outside of a single call site that needs to access it!
|
434 |
#[allow(clippy::mut_from_ref)]
|
435 |
pub fn get_resources_state_mut<'a>(&self) -> &mut PythonResourcesState<'a, u8> {
|
660 |
#[inline]
|
661 |
#[allow(clippy::mut_from_ref)]
|
662 |
pub fn rw<'a, T: ?Sized>(self: Pin<&'a mut Self>, qc: &'a QCell<T>) -> &'a mut T {
|
209 |
// through `UnsafeCell`
|
210 |
#[allow(clippy::mut_from_ref)]
|
211 |
unsafe fn assume_init_mut(&self) -> &mut T {
|
177 |
#[inline]
|
178 |
#[allow(clippy::mut_from_ref)] // Slices won't overlap. See SAFETY.
|
179 |
unsafe fn get_mut_slice(&self, range: &Range<usize>) -> &mut [T] {
|
246 |
#[inline]
|
247 |
#[allow(clippy::mut_from_ref)] // Slices won't overlap. See SAFETY.
|
248 |
unsafe fn get_mut_slice(&self, cycle_offset_slices: usize, cycle: usize) -> &mut [T] {
|
52 |
#[doc(hidden)]
|
53 |
#[allow(clippy::mut_from_ref)]
|
54 |
unsafe fn get_inner(&self) -> &mut *mut u8;
|
209 |
#[allow(clippy::mut_from_ref)]
|
210 |
unsafe fn write(&self, offset: u64, len: usize) -> Result<PageHackMut> {
|
20 |
#[allow(clippy::mut_from_ref)]
|
21 |
pub fn add<T: 'rpass>(&'rpass self, v: T) -> &'rpass mut T {
|
38 |
#[allow(clippy::mut_from_ref)]
|
39 |
pub(crate) unsafe fn get_mut_unsafe(&self) -> &mut T {
|
44 |
#[allow(clippy::mut_from_ref)]
|
45 |
pub(crate) unsafe fn get_mut_unsafe(&self) -> &mut T {
|
23 |
#[allow(clippy::mut_from_ref)]
|
24 |
pub(crate) unsafe fn iovec_as_slice_mut(iov: &iovec) -> &mut [u8] {
|
27 |
/// It is recommended to use [`Consumer::as_slices`](`crate::Consumer::as_slices`) and [`Producer::free_space_as_slices`](`crate::Producer::free_space_as_slices`) instead.
|
28 |
#[allow(clippy::mut_from_ref)]
|
29 |
unsafe fn data(&self) -> &mut [MaybeUninit<T>];
|
107 |
/// [`Producer::free_space_as_slices`](`crate::LocalProducer::free_space_as_slices`) instead.
|
108 |
#[allow(clippy::mut_from_ref)]
|
109 |
#[inline]
|
33 |
}
|
34 |
#[allow(clippy::mut_from_ref)]
|
35 |
pub unsafe fn get_mut(&self) -> &mut Vec<T> {
|
90 |
#[allow(clippy::mut_from_ref)]
|
91 |
#[inline]
|
85 |
// Only safe if you can guarantee no other references to the same range
|
86 |
#[allow(clippy::mut_from_ref)]
|
87 |
pub unsafe fn range_mut(&self, index: u64, len: usize) -> &mut [T] {
|
94 |
/// mutability (such as using `UnsafeCell`).
|
95 |
#[allow(clippy::mut_from_ref)]
|
96 |
unsafe fn view_mut(&self, index: u64, len: usize) -> &mut [Self::Item];
|
152 |
#[allow(clippy::mut_from_ref)]
|
153 |
pub fn as_mut(&self) -> &mut [T] {
|
171 |
#[allow(clippy::mut_from_ref)]
|
172 |
pub fn range(&self, start: usize, end: usize) -> &mut [T] {
|
767 |
#[allow(clippy::mut_from_ref)]
|
768 |
fn current(&self) -> &mut MappingPostingsSub<T> {
|
582 |
#[allow(clippy::mut_from_ref)]
|
583 |
fn slice(&self) -> &mut TermIteratorWithSlice<T> {
|
136 |
#[allow(clippy::mut_from_ref)]
|
137 |
fn terms_iter(&self) -> &mut SegmentTermIteratorInner {
|
455 |
#[allow(clippy::mut_from_ref)]
|
456 |
fn comparators(&self) -> &mut [CrossReaderComparatorEnum] {
|
1000 |
#[allow(clippy::mut_from_ref)]
|
1001 |
fn reader(&self) -> &mut CompressingStoredFieldsReader {
|
627 |
#[allow(clippy::mut_from_ref)]
|
628 |
fn term_vectors_writer(&self) -> &mut TermVectorsConsumer<D, C, MS, MP> {
|
298 |
#[allow(clippy::mut_from_ref)]
|
299 |
fn sub(&self) -> &mut T {
|
200 |
#[allow(clippy::mut_from_ref)]
|
201 |
unsafe fn scheduler_mut(&self, _guard: &MutexGuard<()>) -> &mut ConcurrentMergeSchedulerInner {
|
162 |
#[allow(clippy::mut_from_ref)]
|
163 |
pub fn segment_info(&self) -> &mut SegmentInfo<D, C> {
|
130 |
#[allow(clippy::mut_from_ref)]
|
131 |
fn doc_writer(&self) -> &mut DocumentsWriterPerThread<D, C, MS, MP> {
|
154 |
/// return ref to header of item 'ix' in mmapped file
|
155 |
#[allow(clippy::mut_from_ref)]
|
156 |
fn header_mut_ptr(&self, ix: u64) -> &mut Header {
|
239 |
#[allow(clippy::mut_from_ref)]
|
240 |
pub fn get_mut<T: Sized>(&self, ix: u64) -> &mut T {
|
251 |
#[allow(clippy::mut_from_ref)]
|
252 |
pub fn get_mut_cell_slice<T: Sized>(&self, ix: u64, len: u64) -> &mut [T] {
|
16 |
#[allow(clippy::needless_doctest_main)]
|
17 |
#[allow(clippy::mut_from_ref)]
|
18 |
#[allow(clippy::needless_lifetimes)]
|
343 |
/// The [`EntryPtr`] must point to a valid entry, and the associated [`Bucket`] must be locked.
|
344 |
#[allow(clippy::mut_from_ref)]
|
345 |
#[inline]
|
95 |
/// Returns a mutable reference to a [`Bucket`] at the given position.
|
96 |
#[allow(clippy::mut_from_ref)]
|
97 |
#[inline]
|
69 |
#[allow(clippy::mut_from_ref)]
|
70 |
pub fn get_data<T>(ptr: &LPVOID) -> &mut T {
|
195 |
/// Cast the pointer to a managed asset reference.
|
196 |
#[allow(clippy::mut_from_ref)]
|
197 |
pub fn from_raw(thing: &*mut som_asset_t) -> &mut IAsset<T> {
|
574 |
#[allow(clippy::mut_from_ref)]
|
575 |
fn ensure_tmp_mut(&self) -> &mut Value {
|
38 |
#[allow(clippy::mut_from_ref)]
|
39 |
pub(crate) unsafe fn get_mut_unsafe(&self) -> &mut T {
|
44 |
#[allow(clippy::mut_from_ref)]
|
45 |
pub(crate) unsafe fn get_mut_unsafe(&self) -> &mut T {
|
132 |
impl Reusable {
|
133 |
#[allow(clippy::mut_from_ref)]
|
134 |
/// Return as mutable sender payload value.
|
205 |
impl Reusable {
|
206 |
#[allow(clippy::mut_from_ref)]
|
207 |
/// Return as mutable sender payload value.
|
10 |
/// panic!! ptr is none
|
11 |
#[allow(clippy::mut_from_ref)]
|
12 |
unsafe fn get_mut_unchecked(&self)->&mut T;
|
16 |
impl SharedMutPtr {
|
17 |
#[allow(clippy::mut_from_ref)]
|
18 |
unsafe fn get(&self) -> &mut [[u8; 4]] {
|
58 |
// same memory locations are ever created.
|
59 |
#[allow(clippy::mut_from_ref)]
|
60 |
impl ErrorCtx {
|
164 |
*/
|
165 |
#[allow(clippy::mut_from_ref)] // Clippy can't see through the Exists
|
166 |
#[inline(always)]
|
33 |
#[inline]
|
34 |
#[allow(clippy::mut_from_ref)]
|
35 |
unsafe fn into_mut_unchecked(ptr: &*mut SnarcBox<T>) -> &mut T {
|
154 |
/// return ref to header of item 'ix' in mmapped file
|
155 |
#[allow(clippy::mut_from_ref)]
|
156 |
fn header_mut_ptr(&self, ix: u64) -> &mut Header {
|
239 |
#[allow(clippy::mut_from_ref)]
|
240 |
pub fn get_mut<T: Sized>(&self, ix: u64) -> &mut T {
|
251 |
#[allow(clippy::mut_from_ref)]
|
252 |
pub fn get_mut_cell_slice<T: Sized>(&self, ix: u64, len: u64) -> &mut [T] {
|
35 |
// This is safe because it's part of the API design.
|
36 |
#[allow(clippy::mut_from_ref)]
|
37 |
pub fn alloc(&self, value: T) -> &mut T {
|
41 |
#[inline]
|
42 |
#[allow(clippy::mut_from_ref)]
|
43 |
pub fn init(&'static self, val: T) -> &'static mut T {
|
55 |
#[inline]
|
56 |
#[allow(clippy::mut_from_ref)]
|
57 |
pub fn init_with(&'static self, val: impl FnOnce() -> T) -> &'static mut T {
|
150 |
#[allow(clippy::mut_from_ref)]
|
151 |
trait LeakBorrow {
|
362 |
/// function.
|
363 |
#[allow(clippy::mut_from_ref)]
|
364 |
pub unsafe fn buf_as_slice_mut(&self) -> &mut [u8] {
|
335 |
/// function.
|
336 |
#[allow(clippy::mut_from_ref)]
|
337 |
pub unsafe fn buf_as_slice_mut(&self) -> &mut [u8] {
|
160 |
#[inline]
|
161 |
#[allow(clippy::mut_from_ref)]
|
162 |
unsafe fn get_mut_bufs(&self) -> &mut [Mmap] {
|
1 |
#![allow(clippy::mut_from_ref)]
|
112 |
#[allow(clippy::mut_from_ref)]
|
113 |
unsafe fn slice_mut(&self) -> &mut [u8] {
|
121 |
#[allow(clippy::mut_from_ref)]
|
122 |
pub unsafe fn slot_mut(&self, slot: usize) -> &mut [u8] {
|
21 |
#[allow(clippy::mut_from_ref)]
|
22 |
pub fn alloc(&'a self, value: RangeTree<'a>) -> &'a mut RangeTree<'a> {
|
24 |
/// itself.
|
25 |
#[allow(clippy::mut_from_ref)] // We return a new reference each time so this is a false-positive.
|
26 |
pub fn alloc<T: 'a>(&'a self, value: T) -> &'a mut T {
|
281 |
/// [`heal`]: TakeCell::heal
|
282 |
#[allow(clippy::mut_from_ref)]
|
283 |
pub unsafe fn steal(&self) -> &mut T {
|
264 |
// pointer, so we have to do that here.
|
265 |
#[allow(clippy::mut_from_ref)]
|
266 |
#[inline(always)]
|
476 |
#[allow(clippy::mut_from_ref)]
|
477 |
unsafe fn get_backing_store_slice_mut(
|
127 |
/// Only called by `Registration`
|
128 |
#[allow(clippy::mut_from_ref)] // https://github.com/rust-lang/rust-clippy/issues/4281
|
129 |
pub(crate) unsafe fn time_mut(&self) -> &mut Time {
|
27 |
/// Two threads concurrently writing to the same location will cause UB!!
|
28 |
#[allow(clippy::mut_from_ref)]
|
29 |
pub unsafe fn get(&self, index: usize) -> &mut T {
|
63 |
/// * You only access this outside of interrupts, as interrupts don't break the mutex guarantees
|
64 |
#[allow(clippy::mut_from_ref)]
|
65 |
pub unsafe fn no_critical_section_lock(&self) -> &mut T {
|
66 |
#[allow(clippy::mut_from_ref)]
|
67 |
unsafe fn get_handler(
|
30 |
/// - the value is atomic, so thread-safely update.
|
31 |
#[allow(clippy::mut_from_ref)]
|
32 |
#[inline(always)]
|
68 |
/// explicitly accounted for.
|
69 |
#[allow(clippy::mut_from_ref)]
|
70 |
unsafe fn as_mut_slice(&self) -> &mut [u8];
|
412 |
// overflow. However, it is possible to alias.
|
413 |
#[allow(clippy::mut_from_ref)]
|
414 |
unsafe fn as_mut_slice(&self) -> &mut [u8] {
|
200 |
#[allow(clippy::mut_from_ref)]
|
201 |
unsafe fn as_mut_slice(&self) -> &mut [u8] {
|
544 |
/// recorded using the associated bitmap object.
|
545 |
#[allow(clippy::mut_from_ref)]
|
546 |
unsafe fn as_mut_slice(&self) -> &mut [u8] {
|
49 |
/// Provides raw access to the slice.
|
50 |
#[allow(clippy::mut_from_ref)]
|
51 |
pub unsafe fn slice_mut(&self) -> &mut [T] {
|
75 |
/// [capacity](DoubleMappedBuffer::capacity) of the buffer.
|
76 |
#[allow(clippy::mut_from_ref)]
|
77 |
pub unsafe fn slice_with_offset_mut(&self, offset: usize) -> &mut [T] {
|
12 |
/// # Safety
|
13 |
#[allow(clippy::mut_from_ref)]
|
14 |
pub unsafe fn as_mut<T>(reference: &T) -> &mut T {
|
37 |
#[allow(clippy::mut_from_ref)]
|
38 |
unsafe fn const_cast(&self) -> &mut Self {
|
88 |
/// blocks for the entire duration of each event callback, so this should be fine.
|
89 |
#[allow(clippy::mut_from_ref)]
|
90 |
fn from_field(obj: &Object) -> &mut EventDelegate {
|
154 |
/// return ref to header of item 'ix' in mmapped file
|
155 |
#[allow(clippy::mut_from_ref)]
|
156 |
fn header_mut_ptr(&self, ix: u64) -> &mut Header {
|
239 |
#[allow(clippy::mut_from_ref)]
|
240 |
pub fn get_mut<T: Sized>(&self, ix: u64) -> &mut T {
|
251 |
#[allow(clippy::mut_from_ref)]
|
252 |
pub fn get_mut_cell_slice<T: Sized>(&self, ix: u64, len: u64) -> &mut [T] {
|
222 |
#[allow(clippy::mut_from_ref)]
|
223 |
#[must_use]
|
222 |
#[allow(clippy::mut_from_ref)]
|
223 |
#[must_use]
|
9 |
#[allow(dead_code)]
|
10 |
#[allow(clippy::mut_from_ref)]
|
11 |
#[allow(clippy::too_many_arguments)]
|
84 |
/// by resizing this Memory.
|
85 |
#[allow(clippy::mut_from_ref)]
|
86 |
#[doc(hidden)]
|
76 |
/// by resizing this Memory.
|
77 |
#[allow(clippy::mut_from_ref)]
|
78 |
#[doc(hidden)]
|
115 |
/// by resizing this Memory.
|
116 |
#[allow(clippy::mut_from_ref)]
|
117 |
pub unsafe fn data_unchecked_mut(&self) -> &mut [u8] {
|
113 |
/// by resizing this Memory.
|
114 |
#[allow(clippy::mut_from_ref)]
|
115 |
pub unsafe fn data_unchecked_mut(&self) -> &mut [u8] {
|
1402 |
#[allow(clippy::mut_from_ref)]
|
1403 |
#[allow(dead_code)]
|
1216 |
#[allow(clippy::mut_from_ref)]
|
1217 |
/// Return a byte-slice view of a memory's data.
|
42 |
/// This function is not safe
|
43 |
#[allow(clippy::mut_from_ref)]
|
44 |
pub(crate) fn get_memory_and_wasi_state(
|
1280 |
#[allow(clippy::mut_from_ref)]
|
1281 |
fn get_cocoa_window(this: &Object) -> &mut CocoaWindow {
|
1288 |
#[allow(clippy::mut_from_ref)]
|
1289 |
fn get_cocoa_app(this: &Object) -> &mut CocoaApp {
|
72 |
#[allow(clippy::mut_from_ref)]
|
73 |
pub fn as_ref(&self) -> &mut T {
|
72 |
#[allow(clippy::mut_from_ref)]
|
73 |
unsafe fn get_handler(
|
35 |
pub trait Builder {
|
36 |
#[allow(clippy::mut_from_ref)]
|
37 |
fn build<'bump>(&self, bump: &'bump bumpalo::Bump) -> &'bump mut dyn Counter<Stats>;
|
64 |
#[inline]
|
65 |
#[allow(clippy::mut_from_ref)]
|
66 |
pub(crate) unsafe fn borrow_mut(&self) -> &mut Vec<T> {
|
86 |
#[allow(clippy::mut_from_ref)]
|
87 |
pub fn slice<T>(&self) -> &mut [T] {
|
289 |
#[inline]
|
290 |
#[allow(clippy::mut_from_ref)]
|
291 |
pub(crate) unsafe fn app(&self) -> &mut A {
|
698 |
#[inline(always)]
|
699 |
#[allow(clippy::mut_from_ref)]
|
700 |
#[cfg(not(feature = "nightly"))]
|
706 |
#[inline(always)]
|
707 |
#[allow(clippy::mut_from_ref)]
|
708 |
#[cfg(feature = "nightly")]
|
1274 |
#[allow(clippy::mut_from_ref)]
|
1275 |
fn get_cocoa_window(this: &Object) -> &mut CocoaWindow {
|
1282 |
#[allow(clippy::mut_from_ref)]
|
1283 |
fn get_cocoa_app(this: &Object) -> &mut CocoaApp {
|
66 |
#[allow(clippy::mut_from_ref)]
|
67 |
pub fn as_ref(&self) -> &mut T {
|
54 |
#[allow(clippy::missing_safety_doc)]
|
55 |
#[allow(clippy::mut_from_ref)]
|
56 |
unsafe fn as_mut_slice(&self) -> &mut [u8] {
|
245 |
/// undefined behavior in Rust. To use with extreme caution.
|
246 |
#[allow(clippy::mut_from_ref)]
|
247 |
#[inline]
|
87 |
// are respectively acquired in any read and write operation.
|
88 |
#[allow(clippy::mut_from_ref)]
|
89 |
fn get_port_mut(&self) -> &mut ZSerial {
|
122 |
// are respectively acquired in any read and write operation.
|
123 |
#[allow(clippy::mut_from_ref)]
|
124 |
fn get_sock_mut(&self) -> &mut TlsStream<TcpStream> {
|
82 |
impl AvahiTxtRecord {
|
83 |
#[allow(clippy::mut_from_ref)]
|
84 |
fn inner_mut(&self) -> &mut ManagedAvahiStringList {
|
1 |
#![allow(clippy::mut_from_ref)]
|
75 |
// sound. Thus, disabling the lint.
|
76 |
#![allow(clippy::mut_from_ref)]
|
15 |
#![allow(clippy::cast_ptr_alignment)]
|
16 |
#![allow(clippy::mut_from_ref)]
|
17 |
#![allow(clippy::cognitive_complexity)]
|
14 |
#![allow(clippy::cast_ptr_alignment)]
|
15 |
#![allow(clippy::mut_from_ref)]
|
16 |
#![allow(clippy::cognitive_complexity)]
|
1 |
#![allow(clippy::mut_from_ref)]
|