Skip to content
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
1 change: 1 addition & 0 deletions compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#![allow(internal_features)]
#![cfg_attr(target_arch = "loongarch64", feature(stdarch_loongarch))]
#![feature(core_io_borrowed_buf)]
#![feature(diagnostic_on_unknown)]
#![feature(map_try_insert)]
#![feature(negative_impls)]
#![feature(read_buf)]
Expand Down
6 changes: 5 additions & 1 deletion compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2928,9 +2928,13 @@ pub mod kw {
///
/// Given that `sym` is imported, use them like `sym::symbol_name`.
/// For example `sym::rustfmt` or `sym::u8`.
#[diagnostic::on_unknown(
label = "`{Unresolved}` is not a pre-interned symbol",
note = "consider adding `{Unresolved}` to the `symbols!` invocation in compiler/rustc_span/src/symbol.rs"
)]
pub mod sym {
// Used from a macro in `librustc_feature/accepted.rs`
use super::Symbol;
// Used from a macro in `librustc_feature/accepted.rs`
pub use super::kw::MacroRules as macro_rules;
#[doc(inline)]
pub use super::sym_generated::*;
Expand Down
14 changes: 7 additions & 7 deletions library/core/src/intrinsics/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ impl_disjoint_bitor! {
pub const trait FunnelShift: Copy + 'static {
/// See [`super::unchecked_funnel_shl`]; we just need the trait indirection to handle
/// different types since calling intrinsics with generics doesn't work.
unsafe fn unchecked_funnel_shl(self, rhs: Self, shift: u32) -> Self;
unsafe fn unchecked_funnel_shl(self, right: Self, shift: u32) -> Self;

/// See [`super::unchecked_funnel_shr`]; we just need the trait indirection to handle
/// different types since calling intrinsics with generics doesn't work.
unsafe fn unchecked_funnel_shr(self, rhs: Self, shift: u32) -> Self;
unsafe fn unchecked_funnel_shr(self, right: Self, shift: u32) -> Self;
}

macro_rules! impl_funnel_shifts {
Expand All @@ -164,7 +164,7 @@ macro_rules! impl_funnel_shifts {
const impl FunnelShift for $type {
#[cfg_attr(miri, track_caller)]
#[inline]
unsafe fn unchecked_funnel_shl(self, rhs: Self, shift: u32) -> Self {
unsafe fn unchecked_funnel_shl(self, right: Self, shift: u32) -> Self {
// This implementation is also used by Miri so we have to check the precondition.
// SAFETY: this is guaranteed by the caller
unsafe { super::assume(shift < $type::BITS) };
Expand All @@ -181,20 +181,20 @@ macro_rules! impl_funnel_shifts {
unsafe {
super::disjoint_bitor(
super::unchecked_shl(self, shift),
super::unchecked_shr(rhs, $type::BITS - shift),
super::unchecked_shr(right, $type::BITS - shift),
)
}
}
}

#[cfg_attr(miri, track_caller)]
#[inline]
unsafe fn unchecked_funnel_shr(self, rhs: Self, shift: u32) -> Self {
unsafe fn unchecked_funnel_shr(self, right: Self, shift: u32) -> Self {
// This implementation is also used by Miri so we have to check the precondition.
// SAFETY: this is guaranteed by the caller
unsafe { super::assume(shift < $type::BITS) };
if shift == 0 {
rhs
right
} else {
// SAFETY:
// - `shift < T::BITS`, which satisfies `unchecked_shr`
Expand All @@ -206,7 +206,7 @@ macro_rules! impl_funnel_shifts {
unsafe {
super::disjoint_bitor(
super::unchecked_shl(self, $type::BITS - shift),
super::unchecked_shr(rhs, shift),
super::unchecked_shr(right, shift),
)
}
}
Expand Down
Loading
Loading