Source file test/escape_hash_maphash.go

     1  // errorcheck -0 -m -l
     2  
     3  // Copyright 2019 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Test escape analysis for hash/maphash.
     8  
     9  package escape
    10  
    11  import (
    12  	"hash/maphash"
    13  )
    14  
    15  func f() {
    16  	var x maphash.Hash // should be stack allocatable
    17  	x.WriteString("foo")
    18  	x.Sum64()
    19  }
    20  

View as plain text