anchor.diff:      var element = node.staticElement;
       if (element != null) {
         var enclosingElement = element.enclosingElement;
  -      if (enclosingElement is ExtensionElement) {
  -        if (_isNativeStructPointerExtension(enclosingElement)) {
  -          if (element.name == 'ref') {
  -            _validateRefPrefixedIdentifier(node);
  -          }
  +      if (enclosingElement.isNativeStructPointerExtension) {
  +        if (element.name == 'ref') {
  +          _validateRefPrefixedIdentifier(node);
           }
         }
       }
  
positive.code:   _PrimitiveDartType _primitiveNativeType(DartType nativeType) {
      if (nativeType is InterfaceType) {
        final element = nativeType.element;
        if (element.library.name == _dartFfiLibraryName) {
          final String name = element.name;
          if (_primitiveIntegerNativeTypes.contains(name)) {
            return _PrimitiveDartType.int;
  
negative.code:           (primitiveType != _PrimitiveDartType.void_ || allowVoid)) {
          return true;
        }
        if (nativeType.isNativeFunction) {
          return _isValidFfiNativeFunctionType(nativeType.typeArguments.single);
        }
        if (nativeType.isPointer) {
          final nativeArgumentType = nativeType.typeArguments.single;
          return _isValidFfiNativeType(nativeArgumentType,
                  allowVoid: true, allowEmptyStruct: true) ||
              nativeArgumentType.isStructSubtype ||
              nativeArgumentType.isNativeType;
        }
        if (nativeType.isStructSubtype) {
          if (!allowEmptyStruct) {
            if (nativeType.element.isEmptyStruct) {
              // TODO(dartbug.com/36780): This results in an error message not
              // mentioning empty structs at all.
              return false;
  