]> Cypherpunks repositories - gostls13.git/commit
go/ast: drop //directive comments from doc.Text
authorRuss Cox <rsc@golang.org>
Sat, 21 Mar 2020 12:23:13 +0000 (08:23 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 29 Apr 2020 19:02:32 +0000 (19:02 +0000)
commit5a550b695117f07a4f2454039a4871250cd3ed09
treeb31910682919578c848d80e75578d56e08e27268
parentb13ce66d1b3ce01064fd1912055d71447ab62384
go/ast: drop //directive comments from doc.Text

This allows writing

// F does a thing.
//go:noinline
func F()

without the //go:noinline or other directive (such as //line)
ending up looking like extra words in the doc comment.

Fixes #37974.

Change-Id: Ic738d72802cc2fa448f7633915e7126d2f76d8ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/224737
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/ast/ast.go
src/go/ast/ast_test.go