Commit e43c74a0 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

all: use cannot instead of can not

You can not use cannot, but you cannot spell cannot can not.

Change-Id: I2f0971481a460804de96fd8c9e46a9cc62a3fc5b
Reviewed-on: https://go-review.googlesource.com/19772Reviewed-by: 's avatarRob Pike <r@golang.org>
parent 5dc053b9
...@@ -52,7 +52,7 @@ func (w *Writer) Flush() error { ...@@ -52,7 +52,7 @@ func (w *Writer) Flush() error {
} }
// Close finishes writing the zip file by writing the central directory. // Close finishes writing the zip file by writing the central directory.
// It does not (and can not) close the underlying writer. // It does not (and cannot) close the underlying writer.
func (w *Writer) Close() error { func (w *Writer) Close() error {
if w.last != nil && !w.last.closed { if w.last != nil && !w.last.closed {
if err := w.last.close(); err != nil { if err := w.last.close(); err != nil {
......
...@@ -133,7 +133,7 @@ C's union types are represented as a Go byte array with the same length. ...@@ -133,7 +133,7 @@ C's union types are represented as a Go byte array with the same length.
Go structs cannot embed fields with C types. Go structs cannot embed fields with C types.
Go code can not refer to zero-sized fields that occur at the end of Go code cannot refer to zero-sized fields that occur at the end of
non-empty C structs. To get the address of such a field (which is the non-empty C structs. To get the address of such a field (which is the
only operation you can do with a zero-sized field) you must take the only operation you can do with a zero-sized field) you must take the
address of the struct and add the size of the struct. address of the struct and add the size of the struct.
......
...@@ -432,7 +432,7 @@ func (p *Package) loadDWARF(f *File, names []*Name) { ...@@ -432,7 +432,7 @@ func (p *Package) loadDWARF(f *File, names []*Name) {
fmt.Fprintf(&b, "\t0,\n") fmt.Fprintf(&b, "\t0,\n")
} }
} }
// for the last entry, we can not use 0, otherwise // for the last entry, we cannot use 0, otherwise
// in case all __cgodebug_data is zero initialized, // in case all __cgodebug_data is zero initialized,
// LLVM-based gcc will place the it in the __DATA.__common // LLVM-based gcc will place the it in the __DATA.__common
// zero-filled section (our debug/macho doesn't support // zero-filled section (our debug/macho doesn't support
...@@ -2025,7 +2025,7 @@ func (c *typeConv) Struct(dt *dwarf.StructType, pos token.Pos) (expr *ast.Struct ...@@ -2025,7 +2025,7 @@ func (c *typeConv) Struct(dt *dwarf.StructType, pos token.Pos) (expr *ast.Struct
// We can't permit that, because then the size of the Go // We can't permit that, because then the size of the Go
// struct will not be the same as the size of the C struct. // struct will not be the same as the size of the C struct.
// Our only option in such a case is to remove the field, // Our only option in such a case is to remove the field,
// which means that it can not be referenced from Go. // which means that it cannot be referenced from Go.
for off > 0 && sizes[len(sizes)-1] == 0 { for off > 0 && sizes[len(sizes)-1] == 0 {
n := len(sizes) n := len(sizes)
fld = fld[0 : n-1] fld = fld[0 : n-1]
......
...@@ -255,7 +255,7 @@ func Main() { ...@@ -255,7 +255,7 @@ func Main() {
msanpkg.Name = "msan" msanpkg.Name = "msan"
} }
if flag_race != 0 && flag_msan != 0 { if flag_race != 0 && flag_msan != 0 {
log.Fatal("can not use both -race and -msan") log.Fatal("cannot use both -race and -msan")
} else if flag_race != 0 || flag_msan != 0 { } else if flag_race != 0 || flag_msan != 0 {
instrumenting = true instrumenting = true
} }
......
...@@ -2337,7 +2337,7 @@ func TestGoGetHTTPS404(t *testing.T) { ...@@ -2337,7 +2337,7 @@ func TestGoGetHTTPS404(t *testing.T) {
tg.run("get", "bazil.org/fuse/fs/fstestutil") tg.run("get", "bazil.org/fuse/fs/fstestutil")
} }
// Test that you can not import a main package. // Test that you cannot import a main package.
func TestIssue4210(t *testing.T) { func TestIssue4210(t *testing.T) {
tg := testgo(t) tg := testgo(t)
defer tg.cleanup() defer tg.cleanup()
......
...@@ -199,7 +199,7 @@ type Scanner interface { ...@@ -199,7 +199,7 @@ type Scanner interface {
// time.Time // time.Time
// nil - for NULL values // nil - for NULL values
// //
// An error should be returned if the value can not be stored // An error should be returned if the value cannot be stored
// without loss of information. // without loss of information.
Scan(src interface{}) error Scan(src interface{}) error
} }
......
...@@ -85,7 +85,7 @@ type Writer struct { ...@@ -85,7 +85,7 @@ type Writer struct {
} }
// This interface and the separate syslog_unix.go file exist for // This interface and the separate syslog_unix.go file exist for
// Solaris support as implemented by gccgo. On Solaris you can not // Solaris support as implemented by gccgo. On Solaris you cannot
// simply open a TCP connection to the syslog daemon. The gccgo // simply open a TCP connection to the syslog daemon. The gccgo
// sources have a syslog_solaris.go file that implements unixSyslog to // sources have a syslog_solaris.go file that implements unixSyslog to
// return a type that satisfies this interface and simply calls the C // return a type that satisfies this interface and simply calls the C
......
...@@ -2032,7 +2032,7 @@ const ( ...@@ -2032,7 +2032,7 @@ const (
// For HTTP/2, StateActive fires on the transition from zero // For HTTP/2, StateActive fires on the transition from zero
// to one active request, and only transitions away once all // to one active request, and only transitions away once all
// active requests are complete. That means that ConnState // active requests are complete. That means that ConnState
// can not be used to do per-request work; ConnState only notes // cannot be used to do per-request work; ConnState only notes
// the overall state of the connection. // the overall state of the connection.
StateActive StateActive
......
...@@ -418,7 +418,7 @@ func (t *Transport) CloseIdleConnections() { ...@@ -418,7 +418,7 @@ func (t *Transport) CloseIdleConnections() {
// CancelRequest cancels an in-flight request by closing its connection. // CancelRequest cancels an in-flight request by closing its connection.
// CancelRequest should only be called after RoundTrip has returned. // CancelRequest should only be called after RoundTrip has returned.
// //
// Deprecated: Use Request.Cancel instead. CancelRequest can not cancel // Deprecated: Use Request.Cancel instead. CancelRequest cannot cancel
// HTTP/2 requests. // HTTP/2 requests.
func (t *Transport) CancelRequest(req *Request) { func (t *Transport) CancelRequest(req *Request) {
t.reqMu.Lock() t.reqMu.Lock()
......
...@@ -11,7 +11,7 @@ package on Windows and Plan 9, see below. ...@@ -11,7 +11,7 @@ package on Windows and Plan 9, see below.
Types of signals Types of signals
The signals SIGKILL and SIGSTOP may not be caught by a program, and The signals SIGKILL and SIGSTOP may not be caught by a program, and
therefore can not be affected by this package. therefore cannot be affected by this package.
Synchronous signals are signals triggered by errors in program Synchronous signals are signals triggered by errors in program
execution: SIGBUS, SIGFPE, and SIGSEGV. These are only considered execution: SIGBUS, SIGFPE, and SIGSEGV. These are only considered
......
...@@ -340,7 +340,7 @@ var racecgosync uint64 // represents possible synchronization in C code ...@@ -340,7 +340,7 @@ var racecgosync uint64 // represents possible synchronization in C code
// When and if we implement a moving garbage collector, // When and if we implement a moving garbage collector,
// cgoCheckPointer will pin the pointer for the duration of the cgo // cgoCheckPointer will pin the pointer for the duration of the cgo
// call. (This is necessary but not sufficient; the cgo program will // call. (This is necessary but not sufficient; the cgo program will
// also have to change to pin Go pointers that can not point to Go // also have to change to pin Go pointers that cannot point to Go
// pointers.) // pointers.)
// cgoCheckPointer checks if the argument contains a Go pointer that // cgoCheckPointer checks if the argument contains a Go pointer that
......
...@@ -100,7 +100,7 @@ func gcmarkwb_m(slot *uintptr, ptr uintptr) { ...@@ -100,7 +100,7 @@ func gcmarkwb_m(slot *uintptr, ptr uintptr) {
// related operations. In particular there are times when the GC assumes // related operations. In particular there are times when the GC assumes
// that the world is stopped but scheduler related code is still being // that the world is stopped but scheduler related code is still being
// executed, dealing with syscalls, dealing with putting gs on runnable // executed, dealing with syscalls, dealing with putting gs on runnable
// queues and so forth. This code can not execute write barriers because // queues and so forth. This code cannot execute write barriers because
// the GC might drop them on the floor. Stopping the world involves removing // the GC might drop them on the floor. Stopping the world involves removing
// the p associated with an m. We use the fact that m.p == nil to indicate // the p associated with an m. We use the fact that m.p == nil to indicate
// that we are in one these critical section and throw if the write is of // that we are in one these critical section and throw if the write is of
......
...@@ -30,8 +30,8 @@ type fixalloc struct { ...@@ -30,8 +30,8 @@ type fixalloc struct {
} }
// A generic linked list of blocks. (Typically the block is bigger than sizeof(MLink).) // A generic linked list of blocks. (Typically the block is bigger than sizeof(MLink).)
// Since assignments to mlink.next will result in a write barrier being preformed // Since assignments to mlink.next will result in a write barrier being performed
// this can not be used by some of the internal GC structures. For example when // this cannot be used by some of the internal GC structures. For example when
// the sweeper is placing an unmarked object on the free list it does not want the // the sweeper is placing an unmarked object on the free list it does not want the
// write barrier to be called since that could result in the object being reachable. // write barrier to be called since that could result in the object being reachable.
type mlink struct { type mlink struct {
......
...@@ -165,7 +165,7 @@ type MemStats struct { ...@@ -165,7 +165,7 @@ type MemStats struct {
// Size of the trailing by_size array differs between Go and C, // Size of the trailing by_size array differs between Go and C,
// and all data after by_size is local to runtime, not exported. // and all data after by_size is local to runtime, not exported.
// NumSizeClasses was changed, but we can not change Go struct because of backward compatibility. // NumSizeClasses was changed, but we cannot change Go struct because of backward compatibility.
// sizeof_C_MStats is what C thinks about size of Go struct. // sizeof_C_MStats is what C thinks about size of Go struct.
var sizeof_C_MStats = unsafe.Offsetof(memstats.by_size) + 61*unsafe.Sizeof(memstats.by_size[0]) var sizeof_C_MStats = unsafe.Offsetof(memstats.by_size) + 61*unsafe.Sizeof(memstats.by_size[0])
...@@ -192,7 +192,7 @@ func readmemstats_m(stats *MemStats) { ...@@ -192,7 +192,7 @@ func readmemstats_m(stats *MemStats) {
updatememstats(nil) updatememstats(nil)
// Size of the trailing by_size array differs between Go and C, // Size of the trailing by_size array differs between Go and C,
// NumSizeClasses was changed, but we can not change Go struct because of backward compatibility. // NumSizeClasses was changed, but we cannot change Go struct because of backward compatibility.
memmove(unsafe.Pointer(stats), unsafe.Pointer(&memstats), sizeof_C_MStats) memmove(unsafe.Pointer(stats), unsafe.Pointer(&memstats), sizeof_C_MStats)
// Stack numbers are part of the heap numbers, separate those out for user consumption // Stack numbers are part of the heap numbers, separate those out for user consumption
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// The file contains tests that can not run under race detector for some reason. // The file contains tests that cannot run under race detector for some reason.
// +build !race // +build !race
package runtime_test package runtime_test
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// The file contains tests that can not run under race detector for some reason. // The file contains tests that cannot run under race detector for some reason.
// +build !race // +build !race
package runtime_test package runtime_test
......
...@@ -157,7 +157,7 @@ func sigblock() { ...@@ -157,7 +157,7 @@ func sigblock() {
} }
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
// Initialize signal handling. // Initialize signal handling.
_g_ := getg() _g_ := getg()
......
...@@ -133,7 +133,7 @@ func sigblock() { ...@@ -133,7 +133,7 @@ func sigblock() {
} }
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
_g_ := getg() _g_ := getg()
......
...@@ -136,7 +136,7 @@ func sigblock() { ...@@ -136,7 +136,7 @@ func sigblock() {
} }
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
_g_ := getg() _g_ := getg()
......
...@@ -225,7 +225,7 @@ func sigblock() { ...@@ -225,7 +225,7 @@ func sigblock() {
func gettid() uint32 func gettid() uint32
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
// Initialize signal handling. // Initialize signal handling.
_g_ := getg() _g_ := getg()
......
...@@ -30,7 +30,7 @@ func sigblock() { ...@@ -30,7 +30,7 @@ func sigblock() {
} }
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
_g_ := getg() _g_ := getg()
......
...@@ -167,7 +167,7 @@ func sigblock() { ...@@ -167,7 +167,7 @@ func sigblock() {
} }
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
_g_ := getg() _g_ := getg()
_g_.m.procid = uint64(lwp_self()) _g_.m.procid = uint64(lwp_self())
......
...@@ -33,7 +33,7 @@ func sigblock() { ...@@ -33,7 +33,7 @@ func sigblock() {
} }
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
// Mask all SSE floating-point exceptions // Mask all SSE floating-point exceptions
// when running on the 64-bit kernel. // when running on the 64-bit kernel.
......
...@@ -399,7 +399,7 @@ func sigblock() { ...@@ -399,7 +399,7 @@ func sigblock() {
} }
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
var thandle uintptr var thandle uintptr
stdcall7(_DuplicateHandle, currentProcess, currentThread, currentProcess, uintptr(unsafe.Pointer(&thandle)), 0, 0, _DUPLICATE_SAME_ACCESS) stdcall7(_DuplicateHandle, currentProcess, currentThread, currentProcess, uintptr(unsafe.Pointer(&thandle)), 0, 0, _DUPLICATE_SAME_ACCESS)
......
...@@ -208,7 +208,7 @@ func sigblock() { ...@@ -208,7 +208,7 @@ func sigblock() {
} }
// Called to initialize a new m (including the bootstrap m). // Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory. // Called on the new thread, cannot allocate memory.
func minit() { func minit() {
_g_ := getg() _g_ := getg()
asmcgocall(unsafe.Pointer(funcPC(miniterrno)), unsafe.Pointer(&libc____errno)) asmcgocall(unsafe.Pointer(funcPC(miniterrno)), unsafe.Pointer(&libc____errno))
......
...@@ -261,7 +261,7 @@ cont: ...@@ -261,7 +261,7 @@ cont:
MOVW R1, 24(R6) MOVW R1, 24(R6)
// switch stack and g // switch stack and g
MOVW R6, R13 // sigtramp can not re-entrant, so no need to back up R13. MOVW R6, R13 // sigtramp is not re-entrant, so no need to back up R13.
MOVW R5, g MOVW R5, g
BL (R0) BL (R0)
......
...@@ -245,7 +245,7 @@ cont: ...@@ -245,7 +245,7 @@ cont:
MOVD R1, 48(R6) MOVD R1, 48(R6)
// switch stack and g // switch stack and g
MOVD R6, RSP // sigtramp can not re-entrant, so no need to back up RSP. MOVD R6, RSP // sigtramp is not re-entrant, so no need to back up RSP.
MOVD R5, g MOVD R5, g
BL (R0) BL (R0)
......
...@@ -263,7 +263,7 @@ func vdso_find_version(info *vdso_info, ver *version_key) int32 { ...@@ -263,7 +263,7 @@ func vdso_find_version(info *vdso_info, ver *version_key) int32 {
def = (*elf64Verdef)(add(unsafe.Pointer(def), uintptr(def.vd_next))) def = (*elf64Verdef)(add(unsafe.Pointer(def), uintptr(def.vd_next)))
} }
return -1 // can not match any version return -1 // cannot match any version
} }
func vdso_parse_symbols(info *vdso_info, version int32) { func vdso_parse_symbols(info *vdso_info, version int32) {
......
...@@ -149,7 +149,7 @@ func (p *Pool) getSlow() (x interface{}) { ...@@ -149,7 +149,7 @@ func (p *Pool) getSlow() (x interface{}) {
func (p *Pool) pin() *poolLocal { func (p *Pool) pin() *poolLocal {
pid := runtime_procPin() pid := runtime_procPin()
// In pinSlow we store to localSize and then to local, here we load in opposite order. // In pinSlow we store to localSize and then to local, here we load in opposite order.
// Since we've disabled preemption, GC can not happen in between. // Since we've disabled preemption, GC cannot happen in between.
// Thus here we must observe local at least as large localSize. // Thus here we must observe local at least as large localSize.
// We can observe a newer/larger local, it is fine (we must observe its zero-initialized-ness). // We can observe a newer/larger local, it is fine (we must observe its zero-initialized-ness).
s := atomic.LoadUintptr(&p.localSize) // load-acquire s := atomic.LoadUintptr(&p.localSize) // load-acquire
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment