Skip to content

Commit

Permalink
Fix override_targets keys in docs (#2905)
Browse files Browse the repository at this point in the history
Updates the documentation to match the implementation:
https://github.com/bazelbuild/rules_rust/blob/144d34fdaa3c3c5fe27a9666b760aa31aa9155a5/crate_universe/src/context/crate_context.rs#L65-L74

---------

Co-authored-by: Daniel Wagner-Hall <[email protected]>
Co-authored-by: Daniel Wagner-Hall <[email protected]>
  • Loading branch information
3 people authored Oct 1, 2024
1 parent 57d6cfc commit 5c8f791
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crate_universe/private/crate.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ def _annotation(
rustc_flags (list, optional): A list of strings to set on a crate's `rust_library::rustc_flags` attribute.
shallow_since (str, optional): An optional timestamp used for crates originating from a git repository
instead of a crate registry. This flag optimizes fetching the source code.
override_targets (dict, optional): A dictionary of alternate tagets to use when something depends on this crate to allow
the parent repo to provide its own version of this dependency. Keys can be `proc_marco`, `build_script`, `lib`, `bin`.
override_targets (dict, optional): A dictionary of alternate targets to use when something depends on this crate to allow
the parent repo to provide its own version of this dependency. Keys can be `proc-marco`, `custom-build`, `lib`, `bin`.
Returns:
string: A json encoded string containing the specified version and separately all other inputs.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/crate_universe.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ A collection of extra attributes and settings for a particular crate
| <a id="crate.annotation-rustc_env_files"></a>rustc_env_files | A list of labels to set on a crate's `rust_library::rustc_env_files` attribute. | `None` |
| <a id="crate.annotation-rustc_flags"></a>rustc_flags | A list of strings to set on a crate's `rust_library::rustc_flags` attribute. | `None` |
| <a id="crate.annotation-shallow_since"></a>shallow_since | An optional timestamp used for crates originating from a git repository instead of a crate registry. This flag optimizes fetching the source code. | `None` |
| <a id="crate.annotation-override_targets"></a>override_targets | A dictionary of alternate tagets to use when something depends on this crate to allow the parent repo to provide its own version of this dependency. Keys can be `proc_marco`, `build_script`, `lib`, `bin`. | `None` |
| <a id="crate.annotation-override_targets"></a>override_targets | A dictionary of alternate targets to use when something depends on this crate to allow the parent repo to provide its own version of this dependency. Keys can be `proc-marco`, `custom-build`, `lib`, `bin`. | `None` |

**RETURNS**

Expand Down

0 comments on commit 5c8f791

Please sign in to comment.