Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
05a72d2
Rewrite `--print-config` integration tests
matthewhughes934 Oct 16, 2026
d7ecf4d
Update config discovery integration tests
matthewhughes934 Oct 17, 2026
a50d9a9
Allow `llm-assisted` label to be set by users without write access
jieyouxu Oct 22, 2026
fad0b13
Add test demonstrating current error leak formatting
jieyouxu Oct 16, 2026
b1c0b19
Properly reset error count for `cfg_if!`
jieyouxu Oct 16, 2026
44a8861
Merge pull request #7196 from matthewhughes934/integration-test-updates
jieyouxu Oct 22, 2026
28968c5
Merge pull request #7195 from jieyouxu/jieyouxu/cfg-if
jieyouxu Oct 22, 2026
ba09f12
Integration tests: also capture exit code
matthewhughes934 Oct 19, 2026
0772c1d
Merge pull request #7207 from jieyouxu/jieyouxu/triagebot-label
ytmimi Oct 22, 2026
4689345
test: rename multi-file `cfg_select!` tests subfolder
jieyouxu Oct 23, 2026
49c47fc
test: group `cfg_select!` related tests under subfolder
jieyouxu Oct 23, 2026
04d74ce
test: add regression test for miri between-block comment
jieyouxu Oct 23, 2026
44541eb
fix(cfg_select): don't use concise format when in-between comments exist
jieyouxu Oct 23, 2026
018f54c
fix(cfg_select): don't lose comments/attrs between `=>` and arm expr
jieyouxu Oct 23, 2026
0aff56c
fix(cfg_select): don't lose comments between predicate and `=>`
jieyouxu Oct 23, 2026
0dd546a
fix(cfg_select): don't lose comment between body and trailing comma
jieyouxu Oct 23, 2026
9ab72ab
Merge pull request #7211 from jieyouxu/jieyouxu/cfg-select-comments
jieyouxu Oct 24, 2026
a5198eb
test(cfg_select): snapshot current `control_brace_style` behavior
jieyouxu Oct 24, 2026
19cdcb6
refactor: exhaustively match on `token::LitKind`
ytmimi Oct 26, 2026
e5ad9ad
fix(cfg_select): respect `control_brace_style` config
jieyouxu Oct 24, 2026
3d87f59
test(cfg_select): add coverage for `control_brace_style` with comment…
jieyouxu Oct 25, 2026
67bfa44
test(cfg_select): add coverage for long comment before arrow
jieyouxu Oct 25, 2026
fe7d957
Merge pull request #7214 from jieyouxu/jieyouxu/cfg-select-control-br…
jieyouxu Oct 27, 2026
ecc66a8
ci: Disable credential persistence
hashcatHitman Oct 23, 2026
a754ca9
ci: Expand `github.event.inputs.commit_hash` in `env`
hashcatHitman Oct 23, 2026
2c9df22
ci: Expand `github.event.inputs.rustfmt_configs` in `env`
hashcatHitman Oct 23, 2026
ad47c3e
ci: Expand `github.event.inputs.clone_url` in `env`
hashcatHitman Oct 23, 2026
e2e3160
ci: Expand `github.event.inputs.branch_name` in `env`
hashcatHitman Oct 23, 2026
ce40bba
ci: Expand `github.event.inputs.language_edition` in `env`
hashcatHitman Oct 23, 2026
52d6915
ci: Expand `github.event.inputs.style_edition` in `env`
hashcatHitman Oct 23, 2026
9cda3d3
ci: Expand `github.event.release.tag_name` in `env`
hashcatHitman Oct 23, 2026
a16fdd3
ci: Prefer shell expansion over template expansion
hashcatHitman Oct 23, 2026
e6c6acb
ci: Expand `matrix.target` in `env`
hashcatHitman Oct 23, 2026
c136f96
ci: Expand `matrix.os` in `env`
hashcatHitman Oct 23, 2026
c47f1f6
ci: Expand `matrix.build` in `env`
hashcatHitman Oct 23, 2026
905157b
ci: Expand `matrix.integration` in `env`
hashcatHitman Oct 23, 2026
6c0248d
ci: Expand `matrix.package` in `env`
hashcatHitman Oct 23, 2026
febf7c1
ci: Expand `toJson(needs)` in `env`
hashcatHitman Oct 23, 2026
17a6414
ci: Disable all permissions by default
hashcatHitman Oct 24, 2026
1dde57f
ci: Grant minimum required permissions
hashcatHitman Oct 24, 2026
865b76d
Merge pull request #7216 from ytmimi/refactor_rewrite_literal
ytmimi Oct 27, 2026
f39d517
Integration test: assert on exit codes
matthewhughes934 Oct 19, 2026
302895a
Error on `--print-config minimal` with no output path
matthewhughes934 Oct 19, 2026
a7e179a
Remove test that writes within the repo
matthewhughes934 Oct 20, 2026
72ea442
Merge pull request #7208 from matthewhughes934/more-integration-tests
matthewhughes934 Oct 27, 2026
12839e8
Merge pull request #7212 from hashcatHitman/zizmor
ytmimi Oct 30, 2026
b7e097e
Revert "Use saturating arithmetics for `adjust_max_width`"
jieyouxu Nov 2, 2026
bfd66ed
Revert "Fixes adjustment of max_width within macros"
jieyouxu Nov 2, 2026
3db5134
Merge pull request #7222 from jieyouxu/jieyouxu/revert-macro-fmt
jieyouxu Nov 2, 2026
107a661
Prepare for merging from rust-lang/rust
jieyouxu Nov 2, 2026
977efa3
Merge ref '3e92e1a2d20b' (nightly-2026-11-02) from rust-lang/rust
jieyouxu Nov 2, 2026
0e44319
chore: prepare changelog for v1.12.0
jieyouxu Nov 2, 2026
3512466
chore: remove changelog entry that's intended to be reverted in beta
jieyouxu Nov 2, 2026
f237e20
chore: bump rustfmt version to v1.12.0
jieyouxu Nov 2, 2026
003a893
ci: remove no longer used `upload-assets` workflow
jieyouxu Nov 2, 2026
fb78ede
Merge pull request #7229 from jieyouxu/jieyouxu/remove-upload-assets
ytmimi Nov 2, 2026
0f763a0
Merge pull request #7226 from jieyouxu/subtree-pull-20261102
ytmimi Nov 3, 2026
fd17c29
Merge pull request #7227 from jieyouxu/jieyouxu/release/1.12.0
ytmimi Nov 3, 2026
bb2e461
chore: bump rustfmt version to v1.12.0 in the r-l/r workspace
ytmimi Nov 3, 2026
ebb4a8b
Replace `builtin # field_of` with `k#field_of`
fmease Sep 3, 2026
c5bab76
Replace `builtin # deref` with `k#deref`
fmease Sep 3, 2026
44d0732
Replace `builtin # offset_of` with `k#offset_of`
fmease Sep 3, 2026
33bb9b0
Replace `builtin # type_ascribe` with `k#type_ascribe`
fmease Sep 3, 2026
247b8c1
Replace `builtin # {,un}wrap_binder` with `k#{,un}wrap_binder`
fmease Sep 3, 2026
c9a2797
Rename feature `builtin_syntax` to `internal_syntax`
fmease Sep 3, 2026
6da7b55
test(rustfmt): specify edition 2021 for test involving `forced_keywords`
jieyouxu Nov 3, 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
2 changes: 1 addition & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5178,7 +5178,7 @@ dependencies = [

[[package]]
name = "rustfmt-nightly"
version = "1.11.0"
version = "1.12.0"
dependencies = [
"annotate-snippets 0.12.16",
"anyhow",
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,7 @@ pub enum ExprKind {
Lit(token::Lit),
/// A cast (e.g., `foo as f64`).
Cast(Box<Expr>, Box<Ty>),
/// A type ascription (e.g., `builtin # type_ascribe(42, usize)`).
/// A type ascription (e.g., `k#type_ascribe(42, usize)`).
///
/// Usually not written directly in user code but
/// indirectly via the macro `type_ascribe!(...)`.
Expand Down Expand Up @@ -1871,7 +1871,7 @@ pub enum ExprKind {
/// Output of the `asm!()` macro.
InlineAsm(Box<InlineAsm>),

/// An `offset_of` expression (e.g., `builtin # offset_of(Struct, field)`).
/// An `offset_of` expression (e.g., `k#offset_of(Struct, field)`).
///
/// Usually not written directly in user code but
/// indirectly via the macro `core::mem::offset_of!(...)`.
Expand Down Expand Up @@ -2570,7 +2570,7 @@ pub enum TyKind {
/// Pattern types like `pattern_type!(u32 is 1..=)`, which is the same as `NonZero<u32>`,
/// just as part of the type system.
Pat(Box<Ty>, Box<TyPat>),
/// A `field_of` expression (e.g., `builtin # field_of(Struct, field)`).
/// A `field_of` expression (e.g., `k#field_of(Struct, field)`).
///
/// Usually not written directly in user code but indirectly via the macro
/// `core::field::field_of!(...)`.
Expand Down
8 changes: 8 additions & 0 deletions compiler/rustc_ast/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ pub fn ident_can_begin_expr(name: Symbol, span: Span, kind: IdentKind) -> bool {
// WARNING: Take care when modifying this function! It will change the stable(!) set of
// tokens that are allowed to match an `expr` nonterminal which is user observable.

// NOTE: We don't care about forced keywords that are gated behind `internal_syntax`.

let ident_token = Token::new(Ident(name, kind), span);

// FIXME: Remove `box` from this list given we officially no longer support box expressions
Expand Down Expand Up @@ -350,6 +352,8 @@ fn ident_can_begin_type(name: Symbol, span: Span, kind: IdentKind) -> bool {
// WARNING: Take care when modifying this function! It will change the stable(!) set of
// tokens that are allowed to match an `ty` nonterminal which is user observable.

// NOTE: We don't care about forced keywords that are gated behind `internal_syntax`.

let ident_token = Token::new(Ident(name, kind), span);

!ident_token.is_reserved_ident()
Expand Down Expand Up @@ -936,6 +940,10 @@ impl Token {
self.non_raw_ident().is_some_and(|id| id.name == kw)
}

pub fn is_forced_keyword(&self, kw: Symbol) -> bool {
self.ident().is_some_and(|(id, kind)| kind == IdentKind::ForcedKeyword && id.name == kw)
}

/// Returns `true` if the token is a given keyword, `kw` or if `case` is `Insensitive` and this
/// token is an identifier equal to `kw` ignoring the case.
pub fn is_keyword_case(&self, kw: Symbol, case: Case) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {

// tidy-alphabetical-start
gate_all!(async_for_loop, "`for await` loops are experimental");
gate_all!(builtin_syntax, "`builtin #` syntax is unstable");
gate_all!(const_block_items, "const block items are experimental");
gate_all!(const_closures, "const closures are experimental");
gate_all!(const_trait_impl, "const trait impls are experimental");
Expand All @@ -452,6 +451,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
gate_all!(global_registration, "global registration is experimental");
gate_all!(guard_patterns, "guard patterns are experimental", "consider using match arm guards");
gate_all!(impl_restriction, "`impl` restrictions are experimental");
gate_all!(internal_syntax, "this syntax is internal");
gate_all!(more_qualified_paths, "usage of qualified paths in this context is experimental");
gate_all!(move_expr, "`move(expr)` syntax is experimental");
gate_all!(mut_ref, "mutable by-reference bindings are experimental");
Expand Down
7 changes: 6 additions & 1 deletion compiler/rustc_ast_pretty/src/pprust/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ impl<'a> State<'a> {
self.print_ty_pat(pat);
}
ast::TyKind::FieldOf(ty, variant, field) => {
self.word("builtin # field_of");
self.word("k#field_of");
self.popen();
let ib = self.ibox(0);
self.print_type(ty);
Expand Down Expand Up @@ -2012,6 +2012,11 @@ impl<'a> State<'a> {
self.pclose();
}
PatKind::Deref(inner) => {
// FIXME(deref_patterns, internal_syntax, forced_keywords, clippy):
// This should render `k#deref(...)` but unfortunately Clippy uses `pat_to_string`
// for the suggestions of its lint `unnested_or_patterns`. Smh fix Clippy to not
// rely on AST pretty printing `deref!(…)` for `Deref` patterns and please don't
// think about adding a flag to AST pretty to control the output.
self.word("deref!");
self.popen();
self.print_pat(inner);
Expand Down
13 changes: 6 additions & 7 deletions compiler/rustc_ast_pretty/src/pprust/state/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ impl<'a> State<'a> {
self.print_type(ty);
}
ast::ExprKind::Type(expr, ty) => {
self.word("builtin # type_ascribe");
self.word("k#type_ascribe");
self.popen();
let ib = self.ibox(0);
self.print_expr(expr, FixupContext::default());
Expand Down Expand Up @@ -777,12 +777,12 @@ impl<'a> State<'a> {
self.print_expr(result, fixup.rightmost_subexpression());
}
ast::ExprKind::InlineAsm(a) => {
// FIXME: Print `builtin # asm` once macro `asm` uses `builtin_syntax`.
// FIXME: Print `k#asm` once macro `asm` uses `internal_syntax`.
self.word(format!("{}!", a.asm_macro.macro_name()));
self.print_inline_asm(a);
}
ast::ExprKind::FormatArgs(fmt) => {
// FIXME: Print `builtin # format_args` once macro `format_args` uses `builtin_syntax`.
// FIXME: Print `k#format_args` once macro `format_args` uses `internal_syntax`.
self.word("format_args!");
self.popen();
let ib = self.ibox(0);
Expand All @@ -795,7 +795,7 @@ impl<'a> State<'a> {
self.pclose();
}
ast::ExprKind::OffsetOf(container, fields) => {
self.word("builtin # offset_of");
self.word("k#offset_of");
self.popen();
let ib = self.ibox(0);
self.print_type(container);
Expand Down Expand Up @@ -855,10 +855,9 @@ impl<'a> State<'a> {
self.print_block_with_attrs(blk, attrs, cb, ib)
}
ast::ExprKind::UnsafeBinderCast(kind, expr, ty) => {
self.word("builtin # ");
match kind {
ast::UnsafeBinderCastKind::Wrap => self.word("wrap_binder"),
ast::UnsafeBinderCastKind::Unwrap => self.word("unwrap_binder"),
ast::UnsafeBinderCastKind::Wrap => self.word("k#wrap_binder"),
ast::UnsafeBinderCastKind::Unwrap => self.word("k#unwrap_binder"),
}
self.popen();
let ib = self.ibox(0);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_pretty/src/pprust/state/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl<'a> State<'a> {
self.bclose(item.span, empty, cb);
}
ast::ItemKind::GlobalAsm(asm) => {
// FIXME: Print `builtin # global_asm` once macro `global_asm` uses `builtin_syntax`.
// FIXME: Print `k#global_asm` once macro `global_asm` uses `internal_syntax`.
let (cb, ib) = self.head(visibility_qualified(&item.vis, "global_asm!"));
self.print_inline_asm(asm);
self.word(";");
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_ir/src/lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ language_item_table! {
Unsize, sym::unsize, unsize_trait, Target::Trait, GenericRequirement::Minimum(1);
AlignOf, sym::mem_align_const, align_const, Target::AssocConst(AssocCtxt::Trait), GenericRequirement::Exact(0);
SizeOf, sym::mem_size_const, size_const, Target::AssocConst(AssocCtxt::Trait), GenericRequirement::Exact(0);
OffsetOf, sym::offset_of, offset_of, Target::Fn, GenericRequirement::Exact(1);
OffsetOf, kw::OffsetOf, offset_of, Target::Fn, GenericRequirement::Exact(1);
/// Trait injected by `#[derive(PartialEq)]`, (i.e. "Partial EQ").
StructuralPeq, sym::structural_peq, structural_peq_trait, Target::Trait, GenericRequirement::None;
Copy, sym::copy, copy_trait, Target::Trait, GenericRequirement::Exact(0);
Expand Down Expand Up @@ -239,7 +239,7 @@ language_item_table! {
Complex, sym::complex, complex, Target::Struct, GenericRequirement::Exact(1);
PpcF128, sym::ppcf128, ppcf128, Target::Struct, GenericRequirement::None;

Deref, sym::deref, deref_trait, Target::Trait, GenericRequirement::Exact(0);
Deref, kw::Deref, deref_trait, Target::Trait, GenericRequirement::Exact(0);
DerefMut, sym::deref_mut, deref_mut_trait, Target::Trait, GenericRequirement::Exact(0);
DerefPure, sym::deref_pure, deref_pure_trait, Target::Trait, GenericRequirement::Exact(0);
DerefTarget, sym::deref_target, deref_target, Target::AssocTy(AssocCtxt::Trait), GenericRequirement::None;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_const_eval/src/interpret/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use rustc_middle::mir::interpret::{CTFE_ALLOC_SALT, read_target_uint, write_targ
use rustc_middle::mir::{self, BinOp, ConstValue, NonDivergingIntrinsic};
use rustc_middle::ty::layout::TyAndLayout;
use rustc_middle::ty::{self, FloatTy, ScalarInt, Ty, TyCtxt, TypeVisitableExt};
use rustc_span::{Symbol, bug, span_bug, sym};
use rustc_span::{Symbol, bug, kw, span_bug, sym};
use tracing::trace;

use super::memory::MemoryKind;
Expand Down Expand Up @@ -231,7 +231,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
let val = layout.align.bytes();
self.write_scalar(Scalar::from_target_usize(val, self), dest)?;
}
sym::offset_of => {
kw::OffsetOf => {
let tp_ty = instance.args.type_at(0);

let variant = self.read_scalar(&args[0])?.to_u32()?;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,15 @@ declare_features! (
/// Allows features specific to auto traits.
/// Renamed from `optin_builtin_traits`.
(unstable, auto_traits, "1.50.0", Some(13231)),
/// Allows builtin # foo() syntax
(internal, builtin_syntax, "1.71.0", Some(110680)),
/// Allows `#[doc(notable_trait)]`.
/// Renamed from `doc_spotlight`.
(unstable, doc_notable_trait, "1.52.0", Some(45040)),
/// Allows using the `may_dangle` attribute (RFC 1327).
(unstable, dropck_eyepatch, "1.10.0", Some(34761)),
/// Allows using the `#[fundamental]` attribute.
(unstable, fundamental, "1.0.0", Some(29635)),
/// Allows internal syntax.
(internal, internal_syntax, "CURRENT_RUSTC_VERSION", Some(110680)),
/// Allows using `#[link_name="llvm.*"]`.
(internal, link_llvm_intrinsics, "1.0.0", Some(29602)),
/// Allows using the `#[linkage = ".."]` attribute.
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_hir_analysis/src/check/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rustc_hir as hir;
use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
use rustc_middle::ty::{self, Const, Ty, TyCtxt};
use rustc_span::def_id::LocalDefId;
use rustc_span::{Span, Symbol, sym};
use rustc_span::{Span, Symbol, kw, sym};

use crate::check::check_function_signature;
use crate::diagnostics::{UnrecognizedIntrinsicFunction, WrongNumberOfGenericArgumentsToIntrinsic};
Expand Down Expand Up @@ -66,6 +66,7 @@ fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hi
// safe extern fns are otherwise unprecedented.

// tidy-alphabetical-start
| kw::OffsetOf
| sym::abort_immediate
| sym::add_with_overflow
| sym::aggregate_raw_ptr
Expand Down Expand Up @@ -141,7 +142,6 @@ fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hi
| sym::needs_drop
| sym::offload
| sym::offload_get_num_devices
| sym::offset_of
| sym::overflow_checks
| sym::powf
| sym::powi
Expand Down Expand Up @@ -271,7 +271,7 @@ pub(crate) fn check_intrinsic_type(
(1, 0, vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize)
}
sym::type_id_size_of => (0, 0, vec![type_id_ty()], Ty::new_option(tcx, tcx.types.usize)),
sym::offset_of => (1, 0, vec![tcx.types.u32, tcx.types.u32], tcx.types.usize),
kw::OffsetOf => (1, 0, vec![tcx.types.u32, tcx.types.u32], tcx.types.usize),
sym::field_offset => (1, 0, vec![], tcx.types.usize),
sym::rustc_peek => (1, 0, vec![param(0)], param(0)),
sym::caller_location => (0, 0, vec![], tcx.caller_location_ty()),
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir_typeck/src/place_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rustc_middle::ty::adjustment::{
OverloadedDeref, PointerCoercion,
};
use rustc_middle::ty::{self, Ty};
use rustc_span::{Span, span_bug, sym};
use rustc_span::{Span, kw, span_bug, sym};
use tracing::debug;

use crate::method::{MethodCallee, TreatNotYetDefinedOpaques};
Expand Down Expand Up @@ -203,7 +203,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
debug!("try_overloaded_place_op({:?},{:?},{:?})", span, base_ty, op);

let (Some(imm_tr), imm_op) = (match op {
PlaceOp::Deref => (self.tcx.lang_items().deref_trait(), sym::deref),
PlaceOp::Deref => (self.tcx.lang_items().deref_trait(), kw::Deref),
PlaceOp::Index => (self.tcx.lang_items().index_trait(), sym::index),
}) else {
// Bail if `Deref` or `Index` isn't defined.
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_mir_build/src/builder/matches/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use rustc_middle::mir::*;
use rustc_middle::ty::util::IntTypeExt;
use rustc_middle::ty::{self, GenericArg, Ty, TyCtxt};
use rustc_span::def_id::DefId;
use rustc_span::{DUMMY_SP, Span, Spanned, Symbol, bug, sym};
use rustc_span::{DUMMY_SP, Span, Spanned, Symbol, bug, kw, sym};
use tracing::{debug, instrument};

use crate::builder::Builder;
Expand Down Expand Up @@ -343,7 +343,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
span: Span,
) {
let (trait_item, method) = match mutability {
Mutability::Not => (LangItem::Deref, sym::deref),
Mutability::Not => (LangItem::Deref, kw::Deref),
Mutability::Mut => (LangItem::DerefMut, sym::deref_mut),
};
let borrow_kind = super::util::ref_pat_borrow_kind(mutability);
Expand Down
15 changes: 0 additions & 15 deletions compiler/rustc_parse/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4079,21 +4079,6 @@ impl IntoDiagArg for Case {
}
}

#[derive(Diagnostic)]
#[diag("unknown `builtin #` construct `{$name}`")]
pub(crate) struct UnknownBuiltinConstruct {
#[primary_span]
pub span: Span,
pub name: Ident,
}

#[derive(Diagnostic)]
#[diag("expected identifier after `builtin #`")]
pub(crate) struct ExpectedBuiltinIdent {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag("static items may not have generic parameters")]
pub(crate) struct StaticWithGenerics {
Expand Down
Loading
Loading