f(2, &t)
f(3, &sync.Mutex{})
f(4, m) // ERROR "call of f copies lock value: sync.Mutex"
- f(5, t) // ERROR "call of f copies lock value: struct{lock sync.Mutex} contains sync.Mutex"
+ f(5, t) // ERROR "call of f copies lock value: struct.lock sync.Mutex. contains sync.Mutex"
var fntab []func(t)
- fntab[0](t) // ERROR "call of fntab.0. copies lock value: struct{lock sync.Mutex} contains sync.Mutex"
+ fntab[0](t) // ERROR "call of fntab.0. copies lock value: struct.lock sync.Mutex. contains sync.Mutex"
}
// Returning lock via interface value
case 2:
return 2, m // ERROR "return copies lock value: sync.Mutex"
default:
- return 3, t // ERROR "return copies lock value: struct{lock sync.Mutex} contains sync.Mutex"
+ return 3, t // ERROR "return copies lock value: struct.lock sync.Mutex. contains sync.Mutex"
}
}