Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi authored Oct 15, 2024
1 parent 69c20ac commit 885d709
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/lints/declarative_macro_missing.ron
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ SemverQuery(
item {
... on Macro {
visibility_limit @filter(op: "=", value: ["$public"])
public_api_eligible @filter(op: "=", value: ["$true"])
name @filter(op: "=", value: ["%name"])
}
}
Expand Down
14 changes: 13 additions & 1 deletion test_crates/declarative_macro_missing/new/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
macro_rules! will_no_longer_be_exported {
() => {};
}
}

#[doc(hidden)]
#[macro_export]
macro_rules! became_doc_hidden {
() => {};
}

#[doc(hidden)]
#[macro_export]
macro_rules! always_doc_hidden {
() => {};
}
13 changes: 12 additions & 1 deletion test_crates/declarative_macro_missing/old/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,15 @@ macro_rules! will_no_longer_be_exported {

macro_rules! textual_scope_macro_removed {
() => {};
}
}

#[macro_export]
macro_rules! became_doc_hidden {
() => {};
}

#[doc(hidden)]
#[macro_export]
macro_rules! always_doc_hidden {
() => {};
}
5 changes: 5 additions & 0 deletions test_outputs/query_execution/declarative_macro_missing.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ expression: "&query_execution_results"
"span_begin_line": Uint64(7),
"span_filename": String("src/lib.rs"),
},
{
"name": String("became_doc_hidden"),
"span_begin_line": Uint64(16),
"span_filename": String("src/lib.rs"),
},
],
}
5 changes: 5 additions & 0 deletions test_outputs/witnesses/declarative_macro_missing.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ hint = 'will_be_removed!(...);'
filename = 'src/lib.rs'
begin_line = 7
hint = 'will_no_longer_be_exported!(...);'

[["./test_crates/declarative_macro_missing/"]]
filename = 'src/lib.rs'
begin_line = 16
hint = 'became_doc_hidden!(...);'

0 comments on commit 885d709

Please sign in to comment.