github.com/spotify/syslog-redirector-golang@v0.0.0-20140320174030-4859f03d829a/src/cmd/gofmt/testdata/rewrite5.golden (about)

     1  // Copyright 2011 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Rewriting of expressions containing nodes with associated comments to
     6  // expressions without those nodes must also eliminate the associated
     7  // comments.
     8  
     9  package p
    10  
    11  func f(x int) int {
    12  	_ = 2 * x // this comment remains in the rewrite
    13  	_ = 2 * x
    14  	return 2 * x
    15  }