Skip to content

Commit

Permalink
change function_missing witness hint (#934)
Browse files Browse the repository at this point in the history
change function_missing witness hint
  • Loading branch information
suaviloquence authored Sep 18, 2024
1 parent a056a5a commit d38349a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/lints/function_missing.ron
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ SemverQuery(
error_message: "A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.",
per_result_error_template: Some("function {{join \"::\" path}}, previously in file {{span_filename}}:{{span_begin_line}}"),
witness: (
hint_template:
r#"use {{join "::" path}};
{{name}}(...);"#,
hint_template: r#"{{join "::" path}}(...);"#,
),
)
14 changes: 7 additions & 7 deletions test_outputs/witnesses/function_missing.output.ron
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,45 @@
(
filename: "src/lib.rs",
begin_line: 4,
hint: "use feature_flags_validation::foo_becomes_gated;\nfoo_becomes_gated(...);",
hint: "feature_flags_validation::foo_becomes_gated(...);",
),
(
filename: "src/lib.rs",
begin_line: 5,
hint: "use feature_flags_validation::bar_becomes_gated;\nbar_becomes_gated(...);",
hint: "feature_flags_validation::bar_becomes_gated(...);",
),
],
"./test_crates/features_simple/": [
(
filename: "src/lib.rs",
begin_line: 2,
hint: "use features_simple::feature_dependent_function;\nfeature_dependent_function(...);",
hint: "features_simple::feature_dependent_function(...);",
),
],
"./test_crates/function_const_removed/": [
(
filename: "src/lib.rs",
begin_line: 5,
hint: "use function_const_removed::fn_removed;\nfn_removed(...);",
hint: "function_const_removed::fn_removed(...);",
),
],
"./test_crates/function_feature_changed/": [
(
filename: "src/lib.rs",
begin_line: 2,
hint: "use function_feature_changed::moving_from_feature_A_to_feature_B;\nmoving_from_feature_A_to_feature_B(...);",
hint: "function_feature_changed::moving_from_feature_A_to_feature_B(...);",
),
],
"./test_crates/function_missing/": [
(
filename: "src/lib.rs",
begin_line: 1,
hint: "use function_missing::will_be_removed_fn;\nwill_be_removed_fn(...);",
hint: "function_missing::will_be_removed_fn(...);",
),
(
filename: "src/lib.rs",
begin_line: 4,
hint: "use function_missing::pub_use_removed_fn;\npub_use_removed_fn(...);",
hint: "function_missing::pub_use_removed_fn(...);",
),
],
}

0 comments on commit d38349a

Please # to comment.