Skip to content

Commit dc0d02a

Browse files
authored
fix: wrong concat and field name (#15074)
### What does this PR try to resolve? Fixes a wrong concatenation in macro, and one wrong field name. ### How should we test and review this PR? `cargo doc --document-private-items --no-deps --open`
2 parents 150bbc4 + e2f85e1 commit dc0d02a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cargo/util/toml/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ fn inheritable_from_path(
869869
macro_rules! package_field_getter {
870870
( $(($key:literal, $field:ident -> $ret:ty),)* ) => (
871871
$(
872-
#[doc = concat!("Gets the field `workspace.package", $key, "`.")]
872+
#[doc = concat!("Gets the field `workspace.package.", $key, "`.")]
873873
fn $field(&self) -> CargoResult<$ret> {
874874
let Some(val) = self.package.as_ref().and_then(|p| p.$field.as_ref()) else {
875875
bail!("`workspace.package.{}` was not defined", $key);
@@ -940,7 +940,7 @@ impl InheritableFields {
940940
Ok(dep)
941941
}
942942

943-
/// Gets the field `workspace.lint`.
943+
/// Gets the field `workspace.lints`.
944944
pub fn lints(&self) -> CargoResult<manifest::TomlLints> {
945945
let Some(val) = &self.lints else {
946946
bail!("`workspace.lints` was not defined");

0 commit comments

Comments
 (0)