Skip to content

Commit b3e3d56

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

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

clippy_dev/src/update_lints.rs

+2-1
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

+2-2
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn eval_is_nightly_run(sess: &Session) {
3333
///
3434
/// See [`Session::is_nightly_build(&self)`] if you want to check if the current build is a nightly
3535
/// build.
36-
#[inline]
36+
#[inline(always)]
3737
pub fn is_nightly_run() -> bool {
3838
*IS_NIGHTLY_RUN.get().unwrap_or(&false)
3939
}
@@ -60,7 +60,7 @@ pub fn set_nightly_lints<const N: usize>(lints: [LintId; N]) {
6060
///
6161
/// Please use [`is_nightly_run`] to determine if Clippy's nightly features
6262
/// should be enabled.
63-
#[inline]
63+
#[inline(always)]
6464
pub fn is_nightly_lint(lint: &'static Lint) -> bool {
6565
NIGHTLY_LINTS
6666
.get()

0 commit comments

Comments
 (0)