diff --git a/phases/ephemeral/witx/wasi_ephemeral_preview.witx b/phases/ephemeral/witx/wasi_ephemeral_preview.witx index eb2c3f5e..d15b8c51 100644 --- a/phases/ephemeral/witx/wasi_ephemeral_preview.witx +++ b/phases/ephemeral/witx/wasi_ephemeral_preview.witx @@ -423,9 +423,9 @@ ;;; Create a symbolic link. ;;; Note: This is similar to `symlinkat` in POSIX. (@interface func (export "path_symlink") - (param $fd $fd_t) ;;; The contents of the symbolic link. (param $old_path string) + (param $fd $fd_t) ;;; The destination path at which to create the symbolic link. (param $new_path string) (result $error $errno_t) diff --git a/phases/old/witx/wasi_unstable.witx b/phases/old/witx/wasi_unstable.witx index 0aed04f2..4cf5f4ff 100644 --- a/phases/old/witx/wasi_unstable.witx +++ b/phases/old/witx/wasi_unstable.witx @@ -426,9 +426,9 @@ ;;; Create a symbolic link. ;;; Note: This is similar to `symlinkat` in POSIX. (@interface func (export "path_symlink") - (param $fd $fd_t) ;;; The contents of the symbolic link. (param $old_path string) + (param $fd $fd_t) ;;; The destination path at which to create the symbolic link. (param $new_path string) (result $error $errno_t) diff --git a/phases/unstable/witx/wasi_unstable_preview0.witx b/phases/unstable/witx/wasi_unstable_preview0.witx index 6be66a25..cde2a6a0 100644 --- a/phases/unstable/witx/wasi_unstable_preview0.witx +++ b/phases/unstable/witx/wasi_unstable_preview0.witx @@ -423,9 +423,9 @@ ;;; Create a symbolic link. ;;; Note: This is similar to `symlinkat` in POSIX. (@interface func (export "path_symlink") - (param $fd $fd_t) ;;; The contents of the symbolic link. (param $old_path string) + (param $fd $fd_t) ;;; The destination path at which to create the symbolic link. (param $new_path string) (result $error $errno_t) diff --git a/tools/witx/src/validate.rs b/tools/witx/src/validate.rs index e75b4d61..eba087e8 100644 --- a/tools/witx/src/validate.rs +++ b/tools/witx/src/validate.rs @@ -140,10 +140,11 @@ impl DocValidation { impl DocValidationScope<'_> { fn location(&self, span: wast::Span) -> Location { + // Wast Span gives 0-indexed lines and columns. Location is 1-indexed. let (line, column) = span.linecol_in(self.text); Location { - line, - column, + line: line + 1, + column: column + 1, path: self.path.to_path_buf(), } }