Skip to content

Commit 0c7e481

Browse files
committed
Fix CI and force inline for nightly functions
1 parent fc36a7c commit 0c7e481

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

clippy_dev/src/update_lints.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,13 @@ fn gen_nightly_lint_list<'a>(
329329
internal_lints: impl Iterator<Item = &'a Lint>,
330330
usable_lints: impl Iterator<Item = &'a Lint>,
331331
) -> String {
332-
let details: Vec<_> = internal_lints
332+
let mut details: Vec<_> = internal_lints
333333
.map(|l| (false, l))
334334
.chain(usable_lints.map(|l| (true, l)))
335335
.filter(|(_, l)| l.version.as_ref().map_or(false, |v| v == "nightly"))
336336
.map(|(p, l)| (p, &l.module, l.name.to_uppercase()))
337337
.collect();
338+
details.sort_unstable();
338339

339340
let mut output = GENERATED_FILE_COMMENT.to_string();
340341
output.push_str("clippy_utils::nightly::set_nightly_lints([\n");

clippy_lints/src/lib.nightly_lints.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
clippy_utils::nightly::set_nightly_lints([
66
#[cfg(feature = "internal")]
77
LintId::of(utils::internal_lints::FOREVER_NIGHTLY_LINT),
8-
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
98
LintId::of(borrow_as_ptr::BORROW_AS_PTR),
10-
LintId::of(manual_bits::MANUAL_BITS),
119
LintId::of(default_union_representation::DEFAULT_UNION_REPRESENTATION),
10+
LintId::of(manual_bits::MANUAL_BITS),
11+
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
1212
])

clippy_utils/src/nightly.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ pub fn is_nightly_lint(lint: &'static Lint) -> bool {
6969

7070
/// This function checks if the given lint is a nightly lint and should be suppressed in the current
7171
/// context.
72+
#[inline]
7273
pub fn suppress_lint<T: LintLevelProvider>(cx: &T, lint: &'static Lint) -> bool {
7374
if !is_nightly_run() && is_nightly_lint(lint) {
7475
let (_, level_src) = cx.get_lint_level(lint);

0 commit comments

Comments
 (0)