Home
last modified time | relevance | path

Searched refs:Cast (Results 1 – 17 of 17) sorted by relevance

/linux/rust/zerocopy/src/pointer/
H A Dmod.rs78 /// A `Cast` projection must preserve the address of the referent. It may
80 pub unsafe trait Cast<Src: ?Sized, Dst: ?Sized>: Project<Src, Dst> {}
82 /// A [`Cast`] which does not shrink the set of referent bytes.
87 pub unsafe trait CastExact<Src: ?Sized, Dst: ?Sized>: Cast<Src, Dst> {}
105 unsafe impl<T: ?Sized> Cast<T, T> for IdCast {}
134 unsafe impl<Src, Dst> Cast<Src, Dst> for CastSized {}
161 unsafe impl<Src, Dst> Cast<Src, Dst> for CastSizedExact {}
214 unsafe impl<Src, Dst> Cast<Src, Dst> for CastUnsized in project()
293 unsafe impl<T: ?Sized, Client, F, const FIELD_ID: i128> Cast<T, T::Type>
305 /// If `TU: Cast` an
83 pub unsafe trait Cast<Src: ?Sized, Dst: ?Sized>: Project<Src, Dst> {} global() interface
295 unsafe impl<T: ?Sized, F, const FIELD_ID: i128> Cast<T, T::Type> global() impl
[all...]
H A Dptr.rs581 // - By `CastSized: Cast`, `CastSized` preserves referent address, in into_unalign()
841 pointer::cast::{AsBytesCast, Cast}, in cast_unchecked()
862 pub unsafe fn cast_unchecked<U, C: Cast<T, U>>( in cast()
869 // - By `C: Cast`, `C` preserves the address of the referent. in cast()
892 C: Cast<T, U>, in project()
1257 define_cast!(unsafe { Cast<T: ?Sized> = UnsafeCell<T> => T }); in get_mut()
1280 let ptr = unsafe { self.project_transmute_unchecked::<_, _, Cast>() }; in iter()
/linux/rust/syn/
H A Dprecedence.rs49 Cast, enumerator
123 Expr::Cast(_) => Precedence::Cast, in of()
H A Dfixup.rs437 if let Expr::Cast(cast) = expr { in precedence()
488 Expr::Cast(_) => fixup.previous_operator < Precedence::Cast, in scan_left()
743 | Expr::Cast(_) in scan_right()
H A Dclassify.rs45 | Expr::Cast(_) in requires_comma_to_be_match_arm()
144 Expr::Cast(e) => expr = &e.expr, in expr_leading_label()
207 Expr::Cast(e) => return type_trailing_brace(&e.ty), in expr_trailing_brace()
H A Dexpr.rs141 Cast(ExprCast),
937 | Expr::Cast(ExprCast { attrs, .. }) in replace_attrs()
1373 } else if Precedence::Cast >= base && input.peek(Token![as]) { in parse_expr()
1379 lhs = Expr::Cast(ExprCast { in parse_expr()
1416 } else if Precedence::Cast >= base && input.peek(Token![as]) { in parse_expr()
1422 lhs = Expr::Cast(ExprCast { in parse_expr()
1478 Precedence::Cast in peek_precedence()
2399 ExprCast, Cast, "expected cast expression",
3220 Expr::Cast(e) => print_expr_cast(e, tokens, fixup), in print_expr()
3523 Precedence::Cast, in print_expr_cast()
[all …]
H A Dstmt.rs348 Expr::Cast(e) => &mut e.expr, in stmt_expr()
/linux/rust/zerocopy/src/
H A Dref.rs1432 use crate::pointer::cast::{Cast, Project};
1452 unsafe impl<T: ?Sized + KnownLayout> Cast<[u8], T> for CastForSized {}
H A Dlayout.rs1900 unsafe impl<Src, Dst> crate::pointer::cast::Cast<Src, Dst> for CastFrom<Dst> in test_validate_rust_layout()
/linux/rust/zerocopy/src/util/
H A Dmacros.rs704 /// Defines a named [`Cast`] implementation.
711 /// [`Cast`]: crate::pointer::cast::Cast
734 unsafe impl $(<$tyvar $(: ?$optbound)?>)? $crate::pointer::cast::Cast<$src, $dst> for $name {}
/linux/rust/syn/gen/
H A Dclone.rs258 crate::Expr::Cast(v0) => crate::Expr::Cast(v0.clone()), in clone()
H A Deq.rs284 (crate::Expr::Cast(self0), crate::Expr::Cast(other0)) => self0 == other0, in eq()
H A Dfold.rs1350 crate::Expr::Cast(_binding_0) => crate::Expr::Cast(f.fold_expr_cast(_binding_0)), in fold_expr()
H A Dhash.rs394 crate::Expr::Cast(v0) => { in hash()
H A Ddebug.rs436 crate::Expr::Cast(v0) => v0.debug(formatter, "Cast"), in fmt()
H A Dvisit_mut.rs1335 crate::Expr::Cast(_binding_0) => { in visit_expr_mut()
H A Dvisit.rs1337 crate::Expr::Cast(_binding_0) => { in visit_expr()