github.com/sbinet/go@v0.0.0-20160827155028-54d7de7dd62b/src/cmd/gofmt/testdata/rewrite5.golden (about) 1 //gofmt -r=x+x->2*x 2 3 // Copyright 2011 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 // Rewriting of expressions containing nodes with associated comments to 8 // expressions without those nodes must also eliminate the associated 9 // comments. 10 11 package p 12 13 func f(x int) int { 14 _ = 2 * x // this comment remains in the rewrite 15 _ = 2 * x 16 return 2 * x 17 }