Skip to content

Commit

Permalink
Improve the error message when crate root couldn't be found. (bazelbu…
Browse files Browse the repository at this point in the history
…ild#2296)

Co-authored-by: scentini <[email protected]>
  • Loading branch information
hlopko and scentini authored Dec 1, 2023
1 parent ea05260 commit acb1513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/private/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def crate_root_src(name, srcs, crate_type):
)
if not crate_root:
file_names = [default_crate_root_filename, name + ".rs"]
fail("No {} source file found.".format(" or ".join(file_names)), "srcs")
fail("Couldn't find {} among `srcs`, please use `crate_root` to specify the root file.".format(" or ".join(file_names)))
return crate_root

def _shortest_src_with_basename(srcs, basename):
Expand Down

0 comments on commit acb1513

Please sign in to comment.