Skip to content

Commit

Permalink
fix wrong kind in warning for missing label
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Sep 20, 2023
1 parent 2c877a1 commit 1ebe5ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xref2/ref_tools.ml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ module L = struct
when name = LabelName.to_string name' ->
Ok (`Identifier label)
| _ -> find tl)
| [] -> Error (`Find_by_name (`Page, name))
| [] -> Error (`Find_by_name (`Label, name))
in
find p.Odoc_model.Lang.Page.content

Expand Down
2 changes: 1 addition & 1 deletion test/xref2/references_to_pages.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$ compile p.mld good_references.mli bad_references.mli
File "bad_references.mli", line 6, characters 42-69:
Warning: Failed to resolve reference unresolvedroot(p).not_found Couldn't find page "not_found"
Warning: Failed to resolve reference unresolvedroot(p).not_found Couldn't find label "not_found"
File "bad_references.mli", line 4, characters 20-37:
Warning: Failed to resolve reference unresolvedroot(not_found) Couldn't find page "not_found"

Expand Down

0 comments on commit 1ebe5ad

Please sign in to comment.