1// errorcheck -std
2// Copyright 2017 The Go Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file.
5// Issue 18331: We should catch invalid pragma verbs
6// for code that resides in the standard library.
7package issue18331
8
9//go:unknown // ERROR "//go:unknown is not allowed in the standard library"
10func foo()
11
12//go:nowritebarrierc // ERROR "//go:nowritebarrierc is not allowed in the standard library"
13func bar()
14
15//go:noesape // ERROR "//go:noesape is not allowed in the standard library"
16func groot()
17
18//go:noescape
19func hey() { // ERROR "can only use //go:noescape with external func implementations"
20}
21