# M0003 no such field or method (/docs/diagnostics/codes/m0003)

<Diagnostic code="M0003" />

For methods, check the receiver: a method with a pointer receiver is not in the method set of the value type when the value is not addressable.

## The mistake and the fix [#the-mistake-and-the-fix]

<div className="code-pair">

```go title="The mistake"
var b strings.Builder
b.WriteStrin("x")
```

```go title="Fixed"
var b strings.Builder
b.WriteString("x") // [!code highlight]
```

</div>

## The fix [#the-fix]

Use one of the fields or methods of the type.

See also [all error codes](/docs/diagnostics/codes) and [marmot explain](/docs/commands/explain).