diff --git a/internal/core/export/export.go b/internal/core/export/export.go index 0d132650573..c7f44cd7d6c 100644 --- a/internal/core/export/export.go +++ b/internal/core/export/export.go @@ -284,8 +284,6 @@ type exporter struct { letAlias map[*ast.LetClause]*ast.LetClause references map[*adt.Vertex]*referenceInfo - usedHidden map[string]bool - pivotter *pivotter } @@ -786,19 +784,3 @@ func (e *exporter) setDocs(x adt.Node) { f.docSources = []adt.Conjunct{adt.MakeRootConjunct(nil, x)} e.stack[len(e.stack)-1] = f } - -// func (e *Exporter) promise(upCount int32, f completeFunc) { -// e.todo = append(e.todo, f) -// } - -func (e *exporter) errf(format string, args ...interface{}) *ast.BottomLit { - err := &exporterError{} - e.errs = errors.Append(e.errs, err) - return &ast.BottomLit{} -} - -type errTODO errors.Error - -type exporterError struct { - errTODO -} diff --git a/internal/core/export/expr.go b/internal/core/export/expr.go index a66088a2323..20106c21beb 100644 --- a/internal/core/export/expr.go +++ b/internal/core/export/expr.go @@ -353,7 +353,6 @@ func (c *conjuncts) addConjunct(f adt.Feature, t adt.ArcType, env *adt.Environme type field struct { arcType adt.ArcType - docs []*ast.CommentGroup arc *adt.Vertex conjuncts []conjunct } diff --git a/internal/core/export/self.go b/internal/core/export/self.go index b55f51f6f5f..267b98f6263 100644 --- a/internal/core/export/self.go +++ b/internal/core/export/self.go @@ -110,7 +110,6 @@ func (d *depData) usageCount() int { type refData struct { dst *depData - ref ast.Expr } func (v *depData) node() *adt.Vertex { diff --git a/internal/core/export/self_test.go b/internal/core/export/self_test.go index bee0adb0eb6..b6bfbda1a11 100644 --- a/internal/core/export/self_test.go +++ b/internal/core/export/self_test.go @@ -16,8 +16,6 @@ package export_test import ( "bytes" - "io/ioutil" - "log" "strings" "testing" @@ -116,12 +114,7 @@ func patch(t *testing.T, r *cue.Context, orig *txtar.Archive, f *ast.File) cue.V Data: b, }) - dir, err := ioutil.TempDir("", "test") - if err != nil { - log.Fatal(err) - } - - instance := cuetxtar.Load(&a, dir)[0] + instance := cuetxtar.Load(&a, t.TempDir())[0] if instance.Err != nil { t.Fatal(instance.Err) } @@ -156,13 +149,8 @@ module: "mod.test/a" t.Skip() } - dir, err := ioutil.TempDir("", "test") - if err != nil { - log.Fatal(err) - } - a := txtar.Parse([]byte(in)) - instance := cuetxtar.Load(a, dir)[0] + instance := cuetxtar.Load(a, t.TempDir())[0] if instance.Err != nil { t.Fatal(instance.Err) }