Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change function_missing witness hint #934

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(...);",
),
],
}
Loading