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

Rollup of 11 pull requests #122236

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c3954b3
Add a tidy check that checks whether the fluent slugs only appear once
mu001999 Mar 2, 2024
d88c7ff
Remove unused fluent messages
mu001999 Mar 2, 2024
489dcf2
skip sanity check for non-host targets in `check` builds
onur-ozkan Mar 2, 2024
fbb97ed
Avoid some interning in bootstrap
Noratrieb Feb 24, 2024
5c87ca2
Add some weird test cases to the non_local_definitions lint tests
Urgau Feb 29, 2024
20200f6
Remove useless smallvec dependency in rustc_lint::non_local_def
Urgau Feb 29, 2024
6c4eadd
Add early-return when checking if a path is local
Urgau Feb 29, 2024
98dbe9a
Use was_invoked_from_cargo method instead of hand-written one
Urgau Feb 29, 2024
4663fbb
Eagerly translate HelpUseLatestEdition in parser diagnostics
jieyouxu Mar 7, 2024
bef1cd8
ci: add a runner for vanilla LLVM 18
cuviper Mar 8, 2024
446708b
Remove a workaround for a bug
bjorn3 Sep 19, 2021
fdff4d7
Move metadata header and version checks together
bjorn3 Mar 8, 2024
87ab9e8
Some tweaks to the parallel query cycle handler
Zoxc Mar 8, 2024
564837e
Fix typo in `VisitorResult`
Jarcho Mar 9, 2024
6aff1ca
fix warning when building libcore for Miri
RalfJung Mar 9, 2024
1082c36
fn is_align_to: move some comments closer to the cast they refer to
RalfJung Mar 9, 2024
f1f28a2
Rollup merge of #121567 - Nilstrieb:less-interning, r=albertlarsan68
matthiaskrgr Mar 9, 2024
36bf8bb
Rollup merge of #121813 - Urgau:misc-non_local_defs-lint, r=cjgillot
matthiaskrgr Mar 9, 2024
3f4e877
Rollup merge of #121860 - mu001999:master, r=Nilstrieb
matthiaskrgr Mar 9, 2024
36edf0f
Rollup merge of #121907 - onur-ozkan:better-target-sanity-check, r=al…
matthiaskrgr Mar 9, 2024
63d1607
Rollup merge of #122160 - jieyouxu:eager-translate-help-use-latest-ed…
matthiaskrgr Mar 9, 2024
1404734
Rollup merge of #122178 - cuviper:ci-llvm-18, r=Kobzol
matthiaskrgr Mar 9, 2024
be4523b
Rollup merge of #122186 - bjorn3:remove_bug_workaround, r=petrochenkov
matthiaskrgr Mar 9, 2024
572cf4a
Rollup merge of #122187 - bjorn3:merge_header_version_checks, r=petro…
matthiaskrgr Mar 9, 2024
ad76f1b
Rollup merge of #122215 - Zoxc:cycle-detect-names, r=oli-obk
matthiaskrgr Mar 9, 2024
23898d8
Rollup merge of #122223 - Jarcho:visit_fix, r=oli-obk
matthiaskrgr Mar 9, 2024
28fca59
Rollup merge of #122232 - RalfJung:misc, r=jhpratt
matthiaskrgr Mar 9, 2024
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
Prev Previous commit
Next Next commit
fn is_align_to: move some comments closer to the cast they refer to
  • Loading branch information
RalfJung committed Mar 9, 2024
commit 1082c36a4c734972a13734c7e9565a5f2b9fc79a
6 changes: 3 additions & 3 deletions library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1628,12 +1628,12 @@ impl<T: ?Sized> *const T {
#[inline]
const fn const_impl(ptr: *const (), align: usize) -> bool {
// We can't use the address of `self` in a `const fn`, so we use `align_offset` instead.
// The cast to `()` is used to
// 1. deal with fat pointers; and
// 2. ensure that `align_offset` doesn't actually try to compute an offset.
ptr.align_offset(align) == 0
}

// The cast to `()` is used to
// 1. deal with fat pointers; and
// 2. ensure that `align_offset` (in `const_impl`) doesn't actually try to compute an offset.
#[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block
// SAFETY: The two versions are equivalent at runtime.
unsafe {
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1900,12 +1900,12 @@ impl<T: ?Sized> *mut T {
#[inline]
const fn const_impl(ptr: *mut (), align: usize) -> bool {
// We can't use the address of `self` in a `const fn`, so we use `align_offset` instead.
// The cast to `()` is used to
// 1. deal with fat pointers; and
// 2. ensure that `align_offset` doesn't actually try to compute an offset.
ptr.align_offset(align) == 0
}

// The cast to `()` is used to
// 1. deal with fat pointers; and
// 2. ensure that `align_offset` (in `const_impl`) doesn't actually try to compute an offset.
#[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block
// SAFETY: The two versions are equivalent at runtime.
unsafe {
Expand Down
Loading