8000 internal/xtools: import parts of golang.org/x/tools/internal · dominikh/go-tools@e8d9aa6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e8d9aa6

Browse files
committed
internal/xtools: import parts of golang.org/x/tools/internal
This imports parts of x/tools, in preparation of bringing in newer x/tools/go/ssa code. Imported from commit bf84e70f8fb7b8597ccf99e08b4d19358758ec0c.
1 parent 78869c6 commit e8d9aa6

113 files changed

Lines changed: 13704 additions & 394 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎analysis/code/visit.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"iter"
1010
"slices"
1111

12-
typeindexanalyzer "honnef.co/go/tools/internal/analysisinternal/typeindex"
13-
"honnef.co/go/tools/internal/typesinternal/typeindex"
12+
typeindexanalyzer "honnef.co/go/tools/internal/xtools-internal/analysis/typeindex"
13+
"honnef.co/go/tools/internal/xtools-internal/typesinternal/typeindex"
1414
"honnef.co/go/tools/pattern"
1515

1616
"golang.org/x/tools/go/analysis"

‎internal/testenv/UPSTREAM‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎internal/testenv/testenv.go‎

Lines changed: 0 additions & 323 deletions
This file was deleted.

‎internal/testenv/testenv_112.go‎

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2024 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package aliases
6+
7+
import (
8+
"go/token"
9+
"go/types"
10+
)
11+
12+
// New creates a new TypeName in Package pkg that
13+
// is an alias for the type rhs.
14+
func New(pos token.Pos, pkg *types.Package, name string, rhs types.Type, tparams []*types.TypeParam) *types.TypeName {
15+
tname := types.NewTypeName(pos, pkg, name, nil)
16+
types.NewAlias(tname, rhs).SetTypeParams(tparams)
17+
return tname
18+
}

0 commit comments

Comments
 (0)
0