• Rob Pike's avatar
    go/types: remove the renaming import of go/constant · ecead89b
    Rob Pike authored
    For niceness, when go/exact was moved from x/tools, it
    was renamed go/constant.
    
    For simplicity, when go/types was moved from x/tools, its
    imports of (now) go/constant were done with a rename:
    
        import exact "go/constant"
    
    This kept the code just as it was before and avoided the issue
    of what to call the internal constant called, um, constant.
    
    But not all was hidden, as the text of some fields of structs and
    the like leaked the old name, so things like "exact.Value" appeared
    in type definitions and function signatures in the documentation.
    This is unacceptable.
    
    Fix the documentation issue by fixing the code. Rename the constant
    constant constant_, and remove the renaming import.
    
    This should go into 1.5. It's mostly a mechanical change, is
    internal to the package, and fixes the documentation. It contains
    no semantic changes except to fix a benchmark that was broken
    in the original transition.
    
    Fixes #11949.
    
    Change-Id: Ieb94b6558535b504180b1378f19e8f5a96f92d3c
    Reviewed-on: https://go-review.googlesource.com/13051Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    ecead89b
check.go 9.68 KB