github.com/prysmaticlabs/prysm@v1.4.4/tools/analyzers/nop/testdata/no_op.go (about)

     1  package testdata
     2  
     3  type foo struct {
     4  }
     5  
     6  // AddressOfDereferencedValue --
     7  func AddressOfDereferencedValue() {
     8  	x := &foo{}
     9  	_ = &*x // want "Found a no-op instruction that can be safely removed. It might be a result of writing code that does not do what was intended."
    10  }
    11  
    12  // DereferencedAddressOfValue --
    13  func DereferencedAddressOfValue() {
    14  	x := foo{}
    15  	_ = *&x // want "Found a no-op instruction that can be safely removed. It might be a result of writing code that does not do what was intended."
    16  }