Better HN
topnewbestaskshowjobs
Log inSign up

atrick6

5 karma · joined May 7, 2014 (12y ago) · 2 submissions

Submissions

comment 7y ago · link · parent

Yes, it removes exclusivity checks and bounds checks.

comment 10y ago · link · parent

From the doc comments:

  /// Accesses the `Pointee` instance referenced by `self`.
  ///
  /// - Precondition: Either the pointee has been initialized with an
  ///   instance of type `Pointee`, or `pointee` is being assigned to
  ///   and `Pointee` is a trivial type.
  public var pointee: Pointee
So, `a.pointee = 42` is fine since we all know that `Int` is a trivial type.