summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/vet/testdata/unused.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/cmd/vet/testdata/unused.go')
-rw-r--r--libgo/go/cmd/vet/testdata/unused.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/libgo/go/cmd/vet/testdata/unused.go b/libgo/go/cmd/vet/testdata/unused.go
deleted file mode 100644
index d50f6594d9b..00000000000
--- a/libgo/go/cmd/vet/testdata/unused.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the unusedresult checker.
-
-package testdata
-
-import (
- "bytes"
- "errors"
- "fmt"
-)
-
-func _() {
- fmt.Errorf("") // ERROR "result of fmt.Errorf call not used"
- _ = fmt.Errorf("")
-
- errors.New("") // ERROR "result of errors.New call not used"
-
- err := errors.New("")
- err.Error() // ERROR "result of \(error\).Error call not used"
-
- var buf bytes.Buffer
- buf.String() // ERROR "result of \(bytes.Buffer\).String call not used"
-
- fmt.Sprint("") // ERROR "result of fmt.Sprint call not used"
- fmt.Sprintf("") // ERROR "result of fmt.Sprintf call not used"
-}