internal/lsp/source/completion: exclude 'any' from lexical results

The predeclared 'any' type is only valid when completing constraints. We
should support that properly, but for now exclude it from results so
that our completion tests don't fail on Go 1.18.

For golang/go#47669

Change-Id: I7852f844684a6c03da90bf367d45d732e5d1e9bb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/341850
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
diff --git a/internal/lsp/source/completion/completion.go b/internal/lsp/source/completion/completion.go
index 413ded4..dbc380c 100644
--- a/internal/lsp/source/completion/completion.go
+++ b/internal/lsp/source/completion/completion.go
@@ -1263,6 +1263,7 @@
 		// Filter it out from completion results to stabilize tests.
 		// TODO(rFindley) update (or remove) our handling for comparable once the
 		//                type parameter API has stabilized.
+		builtinAny        = types.Universe.Lookup("any")
 		builtinComparable = types.Universe.Lookup("comparable")
 	)
 
@@ -1282,7 +1283,7 @@
 			if declScope != scope {
 				continue // Name was declared in some enclosing scope, or not at all.
 			}
-			if obj == builtinComparable {
+			if obj == builtinComparable || obj == builtinAny {
 				continue
 			}