Skip to content

Commit 065b853

Browse files
authored
Tighten IO typespecs (#15555)
1 parent 0aa4ace commit 065b853

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/elixir/lib/io.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ defmodule IO do
128128
@type nodata :: {:error, term} | :eof
129129
@type chardata :: String.t() | maybe_improper_list(char | chardata, String.t() | [])
130130

131-
@type inspect_opts :: [Inspect.Opts.new_opt() | {:label, term}]
131+
@type inspect_opts :: [Inspect.Opts.new_opt() | {:label, String.Chars.t()}]
132132

133133
@typedoc """
134134
Stacktrace information as keyword options for `warn/2`.

lib/elixir/lib/io/stream.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ defmodule IO.Stream do
3131
@type t :: %__MODULE__{
3232
device: IO.device(),
3333
raw: boolean(),
34-
line_or_bytes: :line | non_neg_integer()
34+
line_or_bytes: :line | pos_integer()
3535
}
3636

3737
@doc false

0 commit comments

Comments
 (0)