diff --git a/collects/tests/unstable/port.rkt b/collects/tests/unstable/port.rkt index c0acbff1d2..980a545aef 100644 --- a/collects/tests/unstable/port.rkt +++ b/collects/tests/unstable/port.rkt @@ -22,13 +22,4 @@ (parameterize ([current-input-port (open-input-string "1 2 3")]) (read-all-syntax))) - (list 1 2 3)))) - - (test-suite "port->srcloc" - (test-ok (define port (open-input-string "\n x ")) - (port-count-lines! port) - (check-equal? (port->srcloc port) - (make-srcloc 'string 1 0 1 0)) - (read port) - (check-equal? (port->srcloc port 'here 1) - (make-srcloc 'here 2 2 4 1)))))) + (list 1 2 3)))))) diff --git a/collects/unstable/port.rkt b/collects/unstable/port.rkt index 9584a1bac6..90ed4b0358 100644 --- a/collects/unstable/port.rkt +++ b/collects/unstable/port.rkt @@ -33,5 +33,4 @@ [read-all (->* [] [(-> any/c) input-port?] list?)] [read-all-syntax (->* [] [(-> (or/c syntax? eof-object?)) input-port?] - (syntax/c list?))] - [port->srcloc (->* [port?] [any/c exact-nonnegative-integer?] srcloc?)]) + (syntax/c list?))]) diff --git a/collects/unstable/scribblings/port.scrbl b/collects/unstable/scribblings/port.scrbl index 577d02a815..010127ccb0 100644 --- a/collects/unstable/scribblings/port.scrbl +++ b/collects/unstable/scribblings/port.scrbl @@ -51,25 +51,4 @@ of the result spans the entire portion of the port that was read. } -@defproc[(port->srcloc [port port?] - [source any/c (object-name port)] - [span exact-nonnegative-integer? 0]) - srcloc?]{ - -Produces a @racket[srcloc] structure representing the current position of a -port, using the provided @racket[source] and @racket[span] values to fill in -missing fields. This function relies on @racket[port-next-location], so line -counting must be enabled for @racket[port] to get meaningful results. - -@defexamples[ -#:eval the-eval -(define port (open-input-string "1 2 3")) -(port-count-lines! port) -(read port) -(port->srcloc port) -(port->srcloc port "1 2 3" 1) -] - -} - @(close-eval the-eval)