Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
299213f
PassWrapper: handle LLVM 24 change in function types
durin42 Aug 14, 2026
50b867f
PassWrapper: clang-format
durin42 Aug 14, 2026
226b175
Check for missing rustfmt in the stdarch intrinsic test step sooner
Kobzol Aug 24, 2026
77f2a34
remove `box_patterns` feature
cyrgani May 19, 2026
405d95b
remove `box_patterns` from remaining tests
cyrgani May 18, 2026
ca0cb94
clippy: replace `box_patterns` usage with `deref_patterns`
cyrgani Aug 24, 2026
0a78bac
also remove `hir::PatKind::Box`
cyrgani Aug 24, 2026
afcb367
Don't treat slashes as path seps after drive letters in verbatim paths
maxdexh Aug 24, 2026
7eaf48c
Pass LargeDataThreshold to LLVM module IR
jakos-sec Aug 21, 2026
97967de
Add new `unescaped_pipe_in_table_cell` rustdoc lint
GuillaumeGomez Jul 19, 2026
dbe2c8e
Add ui regression test for new rustdoc `unescaped_pipe_in_table_cell`…
GuillaumeGomez Jul 19, 2026
f74d66c
Add documentation for rustdoc `unescaped_pipe_in_table_cell` lint
GuillaumeGomez Jul 19, 2026
fe90bb2
Rename lint `unescaped_pipe_in_table_cell` into `invalid_markdown_table`
GuillaumeGomez Jul 24, 2026
67bfe3a
Also warn in case there is content after the last table cell
GuillaumeGomez Jul 24, 2026
df734af
rustdoc: clean up some unneeded table lint code
notriddle Jul 24, 2026
aeb0d4a
Update lint to new rustdoc table lint
GuillaumeGomez Aug 24, 2026
1f7f241
Fix whitespace.
durin42 Aug 24, 2026
eb1aebf
rustdoc: fix issue preventing "read more" links from generating.
lolbinarycat Aug 22, 2026
a83329a
rustdoc: Nuke `--passes=list`
fmease Aug 24, 2026
f1acecf
rustdoc: Defossilize the passes infrastructure
fmease Sep 27, 2025
b1f7d8e
bootstrap: don't LTO C dependencies on aarch64
RalfJung Aug 24, 2026
1f5e36d
rustdoc: check redundant explicit links against generated URLs
qaijuang Aug 24, 2026
e6bae81
Simply check if the large_data_threshold is set instead of unwrapping
jakos-sec Aug 24, 2026
54745fa
Rollup merge of #161689 - RalfJung:aarch64-no-lto, r=Kobzol
GuillaumeGomez Aug 24, 2026
78aae48
Rollup merge of #161553 - lolbinarycat:rustdoc-fix-read-more, r=Guill…
GuillaumeGomez Aug 24, 2026
be8cb79
Rollup merge of #161670 - jakos-sec:large-data-threshold, r=nagisa
GuillaumeGomez Aug 24, 2026
67f8c34
Rollup merge of #146529 - fmease:rustdoc-nuke-passes-list, r=Guillaum…
GuillaumeGomez Aug 24, 2026
2f05820
Rollup merge of #156009 - qaijuang:rustdoc-redundant-explicit-links-u…
GuillaumeGomez Aug 24, 2026
68f03ff
Rollup merge of #156749 - cyrgani:unbox-full, r=Kivooeo,fmease
GuillaumeGomez Aug 24, 2026
e5e2b50
Rollup merge of #159583 - GuillaumeGomez:unescaped_pipe_in_table_cell…
GuillaumeGomez Aug 24, 2026
7b85a3f
Rollup merge of #161098 - durin42:llvm-24-llvm-any-change, r=cuviper
GuillaumeGomez Aug 24, 2026
30df946
Rollup merge of #161641 - Kobzol:intrinsic-test-rustfmt-check-fix, r=…
GuillaumeGomez Aug 24, 2026
ff895cf
Rollup merge of #161661 - maxdexh:least-cursed-windows-feature, r=Chr…
GuillaumeGomez Aug 24, 2026
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
6 changes: 1 addition & 5 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,7 @@ impl Pat {
| PatKind::Or(s) => s.iter().for_each(|p| p.walk(it)),

// Trivial wrappers over inner patterns.
PatKind::Box(s)
| PatKind::Deref(s)
PatKind::Deref(s)
| PatKind::Ref(s, _, _)
| PatKind::Paren(s)
| PatKind::Guard(s, _) => s.walk(it),
Expand Down Expand Up @@ -901,9 +900,6 @@ pub enum PatKind {
/// A tuple pattern (`(a, b)`).
Tuple(ThinVec<Pat>),

/// A `box` pattern.
Box(Box<Pat>),

/// A `deref` pattern (currently `deref!()` macro-based syntax).
Deref(Box<Pat>),

Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_lowering/src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
let (pats, ddpos) = self.lower_pat_tuple(pats, "tuple");
break hir::PatKind::Tuple(pats, ddpos);
}
PatKind::Box(inner) => {
break hir::PatKind::Box(self.lower_pat(inner));
}
PatKind::Deref(inner) => {
break hir::PatKind::Deref(self.lower_pat(inner));
}
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
}
}
}
PatKind::Box(..) => {
gate!(self, box_patterns, pattern.span, "box pattern syntax is experimental");
}
_ => {}
}
visit::walk_pat(self, pattern)
Expand Down Expand Up @@ -608,7 +605,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {

// tidy-alphabetical-start
soft_gate_all_legacy_dont_use!(auto_traits, "`auto` traits are unstable");
soft_gate_all_legacy_dont_use!(box_patterns, "box pattern syntax is experimental");
soft_gate_all_legacy_dont_use!(decl_macro, "`macro` is experimental");
soft_gate_all_legacy_dont_use!(negative_impls, "negative impls are experimental");
soft_gate_all_legacy_dont_use!(specialization, "specialization is experimental");
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_ast_pretty/src/pprust/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2011,10 +2011,6 @@ impl<'a> State<'a> {
}
self.pclose();
}
PatKind::Box(inner) => {
self.word("box ");
self.print_pat_paren_if_or(inner);
}
PatKind::Deref(inner) => {
self.word("deref!");
self.popen();
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_codegen_llvm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ pub(crate) unsafe fn create_module<'ll>(
llvm::LLVMRustSetModuleCodeModel(llmod, to_llvm_code_model(sess.code_model()));
}

if let Some(large_data_threshold) = sess.opts.unstable_opts.large_data_threshold {
unsafe {
llvm::LLVMRustSetModuleLargeDataThreshold(llmod, large_data_threshold);
}
}

// If skipping the PLT is enabled, we need to add some module metadata
// to ensure intrinsic calls don't use it.
if !sess.needs_plt() {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_llvm/src/llvm/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2508,6 +2508,7 @@ unsafe extern "C" {
pub(crate) fn LLVMRustSetModulePICLevel(M: &Module);
pub(crate) fn LLVMRustSetModulePIELevel(M: &Module);
pub(crate) fn LLVMRustSetModuleCodeModel(M: &Module, Model: CodeModel);
pub(crate) fn LLVMRustSetModuleLargeDataThreshold(M: &Module, Threshold: u64);
pub(crate) fn LLVMRustBufferPtr(p: &Buffer) -> *const u8;
pub(crate) fn LLVMRustBufferLen(p: &Buffer) -> usize;
pub(crate) fn LLVMRustBufferFree(p: &'static mut Buffer);
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ declare_features! (
Some("merged into `min_generic_const_args`")),
(removed, await_macro, "1.38.0", Some(50547),
Some("subsumed by `.await` syntax"), 62293),
/// Allows using `box` in patterns (RFC 469).
(removed, box_patterns, "CURRENT_RUSTC_VERSION", Some(29641), Some("superseded by `deref_patterns`")),
/// Allows using the `box $expr` syntax.
(removed, box_syntax, "1.70.0", Some(49733), Some("replaced with `#[rustc_box]`"), 108471),
/// Allows capturing disjoint fields in a closure/coroutine (RFC 2229).
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ declare_features! (
/// Allows features specific to auto traits.
/// Renamed from `optin_builtin_traits`.
(unstable, auto_traits, "1.50.0", Some(13231)),
/// Allows using `box` in patterns (RFC 469).
(unstable, box_patterns, "1.0.0", Some(29641)),
/// Allows builtin # foo() syntax
(internal, builtin_syntax, "1.71.0", Some(110680)),
/// Allows `#[doc(notable_trait)]`.
Expand Down
10 changes: 2 additions & 8 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1535,9 +1535,7 @@ impl<'hir> Pat<'hir> {
match self.kind {
Missing => unreachable!(),
Wild | Never | Expr(_) | Range(..) | Binding(.., None) | Err(_) => true,
Box(s) | Deref(s) | Ref(s, _, _) | Binding(.., Some(s)) | Guard(s, _) => {
s.walk_short_(it)
}
Deref(s) | Ref(s, _, _) | Binding(.., Some(s)) | Guard(s, _) => s.walk_short_(it),
Struct(_, fields, _) => fields.iter().all(|field| field.pat.walk_short_(it)),
TupleStruct(_, s, _) | Tuple(s, _) | Or(s) => s.iter().all(|p| p.walk_short_(it)),
Slice(before, slice, after) => {
Expand All @@ -1564,7 +1562,7 @@ impl<'hir> Pat<'hir> {
use PatKind::*;
match self.kind {
Missing | Wild | Never | Expr(_) | Range(..) | Binding(.., None) | Err(_) => {}
Box(s) | Deref(s) | Ref(s, _, _) | Binding(.., Some(s)) | Guard(s, _) => s.walk_(it),
Deref(s) | Ref(s, _, _) | Binding(.., Some(s)) | Guard(s, _) => s.walk_(it),
Struct(_, fields, _) => fields.iter().for_each(|field| field.pat.walk_(it)),
TupleStruct(_, s, _) | Tuple(s, _) | Or(s) => s.iter().for_each(|p| p.walk_(it)),
Slice(before, slice, after) => {
Expand Down Expand Up @@ -1646,7 +1644,6 @@ impl<'hir> Pat<'hir> {
| PatKind::Struct(_, _, _)
| PatKind::TupleStruct(_, _, _)
| PatKind::Tuple(_, _)
| PatKind::Box(_)
| PatKind::Ref(_, _, _)
| PatKind::Deref(_)
| PatKind::Expr(_)
Expand Down Expand Up @@ -1792,9 +1789,6 @@ pub enum PatKind<'hir> {
/// `0 <= position <= subpats.len()`
Tuple(&'hir [Pat<'hir>], DotDotPos),

/// A `box` pattern.
Box(&'hir Pat<'hir>),

/// A `deref` pattern (currently `deref!()` macro-based syntax).
Deref(&'hir Pat<'hir>),

Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,9 +746,7 @@ pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat<'v>) -> V:
PatKind::Tuple(tuple_elements, _) => {
walk_list!(visitor, visit_pat, tuple_elements);
}
PatKind::Box(ref subpattern)
| PatKind::Deref(ref subpattern)
| PatKind::Ref(ref subpattern, _, _) => {
PatKind::Deref(ref subpattern) | PatKind::Ref(ref subpattern, _, _) => {
try_visit!(visitor.visit_pat(subpattern));
}
PatKind::Binding(_, _hir_id, ident, ref optional_subpattern) => {
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_hir_analysis/src/check/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,7 @@ fn resolve_local<'tcx>(
| PatKind::TupleStruct(_, subpats, _)
| PatKind::Tuple(subpats, _) => subpats.iter().any(|p| is_binding_pat(p)),

PatKind::Box(subpat) | PatKind::Deref(subpat) | PatKind::Guard(subpat, _) => {
is_binding_pat(subpat)
}
PatKind::Deref(subpat) | PatKind::Guard(subpat, _) => is_binding_pat(subpat),

PatKind::Ref(_, _, _)
| PatKind::Binding(hir::BindingMode(hir::ByRef::No, _), ..)
Expand Down
11 changes: 0 additions & 11 deletions compiler/rustc_hir_pretty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2088,17 +2088,6 @@ impl<'a> State<'a> {
}
self.pclose();
}
PatKind::Box(inner) => {
let is_range_inner = matches!(inner.kind, PatKind::Range(..));
self.word("box ");
if is_range_inner {
self.popen();
}
self.print_pat(inner);
if is_range_inner {
self.pclose();
}
}
PatKind::Deref(inner) => {
self.word("deref!");
self.popen();
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_hir_typeck/src/expr_use_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,6 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
}
}
PatKind::Or(_)
| PatKind::Box(_)
| PatKind::Ref(..)
| PatKind::Guard(..)
| PatKind::Tuple(..)
Expand Down Expand Up @@ -1763,8 +1762,8 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
self.cat_pattern(place_with_id, subpat, op)?;
}

PatKind::Box(subpat) | PatKind::Ref(subpat, _, _) => {
// box p1, &p1, &mut p1. we can ignore the mutability of
PatKind::Ref(subpat, _, _) => {
// &p1, &mut p1. we can ignore the mutability of
// PatKind::Ref since that information is already contained
// in the type.
let subplace = self.cat_deref(pat.hir_id, place_with_id)?;
Expand Down
32 changes: 1 addition & 31 deletions compiler/rustc_hir_typeck/src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
PatKind::Tuple(elements, ddpos) => {
self.check_pat_tuple(pat.span, elements, ddpos, expected, pat_info)
}
PatKind::Box(inner) => self.check_pat_box(pat.span, inner, expected, pat_info),
PatKind::Deref(inner) => self.check_pat_deref(pat.span, inner, expected, pat_info),
PatKind::Ref(inner, pinned, mutbl) => {
self.check_pat_ref(pat, inner, pinned, mutbl, expected, pat_info)
Expand Down Expand Up @@ -762,9 +761,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// that the expected type be of those types and not reference types.
PatKind::Tuple(..) | PatKind::Range(..) | PatKind::Slice(..) => AdjustMode::peel_all(),
// When checking an explicit deref pattern, only peel reference types.
// FIXME(deref_patterns): If box patterns and deref patterns need to coexist, box
// patterns may want `PeelKind::Implicit`, stopping on encountering a box.
PatKind::Box(_) | PatKind::Deref(_) => {
PatKind::Deref(_) => {
AdjustMode::Peel { kind: PeelKind::ExplicitDerefPat }
}
// A never pattern behaves somewhat like a literal or unit variant.
Expand Down Expand Up @@ -1386,7 +1383,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
| PatKind::Wild
| PatKind::Never
| PatKind::Binding(..)
| PatKind::Box(..)
| PatKind::Deref(_)
| PatKind::Ref(..)
| PatKind::Expr(..)
Expand Down Expand Up @@ -2709,32 +2705,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
err
}

fn check_pat_box(
&self,
span: Span,
inner: &'tcx Pat<'tcx>,
expected: Ty<'tcx>,
pat_info: PatInfo<'tcx>,
) -> Ty<'tcx> {
let tcx = self.tcx;
let (box_ty, inner_ty) = self
.check_dereferenceable(span, expected, inner)
.and_then(|()| {
// Here, `demand::subtype` is good enough, but I don't
// think any errors can be introduced by using `demand::eqtype`.
let inner_ty = self.next_ty_var(inner.span);
let box_ty = Ty::new_box(tcx, inner_ty);
self.demand_eqtype_pat(span, expected, box_ty, &pat_info.top_info)?;
Ok((box_ty, inner_ty))
})
.unwrap_or_else(|guar| {
let err = Ty::new_error(tcx, guar);
(err, err)
});
self.check_pat(inner, inner_ty, pat_info);
box_ty
}

fn check_pat_deref(
&self,
span: Span,
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_lint/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,6 @@ impl EarlyLintPass for BadUseOfFindAttr {
find_attr_kind_in_pat(cx, pat);
}
}
PatKind::Box(pat) => {
find_attr_kind_in_pat(cx, pat);
}
PatKind::Deref(pat) => {
find_attr_kind_in_pat(cx, pat);
}
Expand Down Expand Up @@ -763,7 +760,6 @@ fn pat_is_not_exhaustive_heuristic(pat: &hir::Pat<'_>) -> Option<(Span, &'static
hir::PatKind::Or(..) => None,
hir::PatKind::Never => None,
hir::PatKind::Tuple(..) => None,
hir::PatKind::Box(pat) => pat_is_not_exhaustive_heuristic(&*pat),
hir::PatKind::Deref(pat) => pat_is_not_exhaustive_heuristic(&*pat),
hir::PatKind::Ref(pat, _, _) => pat_is_not_exhaustive_heuristic(&*pat),
hir::PatKind::Expr(..) => None,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_lint/src/unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,8 @@ impl EarlyLintPass for UnusedParens {
self.check_unused_parens_pat(cx, &f.pat, false, false, keep_space);
}
}
// Avoid linting on `i @ (p0 | .. | pn)` and `box (p0 | .. | pn)`, #64106.
Ident(.., Some(p)) | Box(p) | Deref(p) | Guard(p, _) => {
// Avoid linting on `i @ (p0 | .. | pn)`, #64106.
Ident(.., Some(p)) | Deref(p) | Guard(p, _) => {
self.check_unused_parens_pat(cx, p, true, false, keep_space)
}
// Avoid linting on `&(mut x)` as `&mut x` has a different meaning, #55342.
Expand Down
50 changes: 44 additions & 6 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,17 @@ extern "C" typedef void (*LLVMRustSelfProfileBeforePassCallback)(
extern "C" typedef void (*LLVMRustSelfProfileAfterPassCallback)(
void *); // LlvmSelfProfiler

#if LLVM_VERSION_GE(24, 0)
std::string LLVMRustwrappedIrGetName(const llvm::IRUnitRef &WrappedIr) {
if (const auto *Cast = dyn_cast<Module>(WrappedIr))
return Cast->getName().str();
if (const auto *Cast = dyn_cast<Function>(WrappedIr))
return Cast->getName().str();
if (const auto *Cast = dyn_cast<Loop>(WrappedIr))
return Cast->getName().str();
if (const auto *Cast = dyn_cast<LazyCallGraph::SCC>(WrappedIr))
return Cast->getName();
#else
std::string LLVMRustwrappedIrGetName(const llvm::Any &WrappedIr) {
if (const auto *Cast = any_cast<const Module *>(&WrappedIr))
return (*Cast)->getName().str();
Expand All @@ -538,6 +549,7 @@ std::string LLVMRustwrappedIrGetName(const llvm::Any &WrappedIr) {
return (*Cast)->getName().str();
if (const auto *Cast = any_cast<const LazyCallGraph::SCC *>(&WrappedIr))
return (*Cast)->getName();
#endif
return "<UNKNOWN>";
}

Expand All @@ -546,15 +558,26 @@ void LLVMSelfProfileInitializeCallbacks(
LLVMRustSelfProfileBeforePassCallback BeforePassCallback,
LLVMRustSelfProfileAfterPassCallback AfterPassCallback) {
PIC.registerBeforeNonSkippedPassCallback(
#if LLVM_VERSION_GE(24, 0)
[LlvmSelfProfiler, BeforePassCallback](StringRef Pass,
llvm::IRUnitRef Ir) {
#else
[LlvmSelfProfiler, BeforePassCallback](StringRef Pass, llvm::Any Ir) {
#endif
std::string PassName = Pass.str();
std::string IrName = LLVMRustwrappedIrGetName(Ir);
BeforePassCallback(LlvmSelfProfiler, PassName.c_str(), IrName.c_str());
});

PIC.registerAfterPassCallback(
#if LLVM_VERSION_GE(24, 0)
[LlvmSelfProfiler,
AfterPassCallback](StringRef Pass, llvm::IRUnitRef IR,
const PreservedAnalyses &Preserved) {
#else
[LlvmSelfProfiler, AfterPassCallback](
StringRef Pass, llvm::Any IR, const PreservedAnalyses &Preserved) {
#endif
AfterPassCallback(LlvmSelfProfiler);
});

Expand All @@ -564,17 +587,27 @@ void LLVMSelfProfileInitializeCallbacks(
AfterPassCallback(LlvmSelfProfiler);
});

#if LLVM_VERSION_GE(24, 0)
PIC.registerBeforeAnalysisCallback([LlvmSelfProfiler, BeforePassCallback](
StringRef Pass, llvm::IRUnitRef Ir) {
#else
PIC.registerBeforeAnalysisCallback(
[LlvmSelfProfiler, BeforePassCallback](StringRef Pass, llvm::Any Ir) {
std::string PassName = Pass.str();
std::string IrName = LLVMRustwrappedIrGetName(Ir);
BeforePassCallback(LlvmSelfProfiler, PassName.c_str(), IrName.c_str());
});
#endif
std::string PassName = Pass.str();
std::string IrName = LLVMRustwrappedIrGetName(Ir);
BeforePassCallback(LlvmSelfProfiler, PassName.c_str(), IrName.c_str());
});

#if LLVM_VERSION_GE(24, 0)
PIC.registerAfterAnalysisCallback([LlvmSelfProfiler, AfterPassCallback](
StringRef Pass, llvm::IRUnitRef Ir) {
#else
PIC.registerAfterAnalysisCallback(
[LlvmSelfProfiler, AfterPassCallback](StringRef Pass, llvm::Any Ir) {
AfterPassCallback(LlvmSelfProfiler);
});
#endif
AfterPassCallback(LlvmSelfProfiler);
});
}

enum class LLVMRustOptStage {
Expand Down Expand Up @@ -1185,6 +1218,11 @@ extern "C" void LLVMRustSetModuleCodeModel(LLVMModuleRef M,
unwrap(M)->setCodeModel(*CM);
}

extern "C" void LLVMRustSetModuleLargeDataThreshold(LLVMModuleRef M,
uint64_t Threshold) {
unwrap(M)->setLargeDataThreshold(Threshold);
}

// Here you'll find an implementation of ThinLTO as used by the Rust compiler
// right now. This ThinLTO support is only enabled on "recent ish" versions of
// LLVM, and otherwise it's just blanket rejected from other compilers.
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_middle/src/thir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,6 @@ pub enum PatKind<'tcx> {

/// Explicit or implicit `deref!(..)` pattern, under `feature(deref_patterns)`.
/// Represents a call to `Deref` or `DerefMut`, or a deref-move of `Box`.
///
/// `box P` patterns also lower to this, under `feature(box_patterns)`.
DerefPattern {
subpattern: Box<Pat<'tcx>>,
/// Whether the pattern scrutinee needs to be borrowed in order to call `Deref::deref` or
Expand Down
Loading
Loading