Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7cd081e
make the safety documentation consistent in Ptr module
yilin0518 Oct 13, 2026
5fbbf47
std: Use getexecpath() for current_exe() on OpenBSD
brad0 Oct 15, 2026
09026e0
avoid building a region map when erasing bound regions
TaKO8Ki Oct 29, 2026
380fd0d
Reuse CanonicalVarKinds if no new variables were added
Randl Nov 2, 2026
bec2190
inline and cold attributes on async fn and async closures affect the …
xacrimon Sep 26, 2026
1c517b2
Don't keep #[rustc_force_inline] on async/gen fn constructors
xacrimon Nov 2, 2026
2caedab
Adapt async fn inline attrs to #[inline(always)] + #[target_feature] …
xacrimon Nov 2, 2026
9b1ceff
Reenable the cg_gcc tests that were disabled by accident
antoyo Nov 2, 2026
86fd101
rename sizedness_fast_path to implicit_fast_path
jdonszelmann Nov 2, 2026
1b8ce17
refactor implicit bounds addition
jdonszelmann Nov 2, 2026
7eb4e44
Implement AIX TLS destructor guard in std and update dynamic-loading-…
xingxue-ibm Oct 30, 2026
f0767bb
add is_implicit_trait to tcx
jdonszelmann Nov 2, 2026
aff3637
Don't use `llvm_type` as the type of `static`s.
beetrees Nov 2, 2026
79520af
Avoid oscillating line wrapping due to symbol indices
aytey Sep 10, 2026
be89a22
Replace `builtin # field_of` with `k#field_of`
fmease Sep 3, 2026
f2f5592
Replace `builtin # deref` with `k#deref`
fmease Sep 3, 2026
c9e0b0a
Replace `builtin # offset_of` with `k#offset_of`
fmease Sep 3, 2026
be1070c
Replace `builtin # type_ascribe` with `k#type_ascribe`
fmease Sep 3, 2026
ee888ba
Replace `builtin # {,un}wrap_binder` with `k#{,un}wrap_binder`
fmease Sep 3, 2026
2a9fdf5
Rename feature `builtin_syntax` to `internal_syntax`
fmease Sep 3, 2026
a72068e
Fix rigidity assertion ICE
lsunsi Nov 3, 2026
dedfa67
Make `ExpectedLint` more general
JonathanBrouwer Oct 26, 2026
58c0988
Use `ExpectedLint` in more places
JonathanBrouwer Oct 27, 2026
cdc3205
Make diagnostic title consistent with other attributes
JonathanBrouwer Nov 3, 2026
a8308b5
Rollup merge of #149245 - xacrimon:acrimon/async-fn-inline-attr, r=sa…
JonathanBrouwer Nov 3, 2026
8a947ee
Rollup merge of #164304 - Randl:perf-reuse, r=ShoyuVanilla
JonathanBrouwer Nov 3, 2026
d9d901c
Rollup merge of #165109 - TaKO8Ki:avoid-erased-region-map, r=lcnr
JonathanBrouwer Nov 3, 2026
035cc07
Rollup merge of #163393 - brad0:std_src_sys_paths_unix, r=JohnTitor
JonathanBrouwer Nov 3, 2026
a2db2db
Rollup merge of #165358 - antoyo:fix/reenable-cg_gcc-tests, r=Guillau…
JonathanBrouwer Nov 3, 2026
b85d4fb
Rollup merge of #165371 - beetrees:global-llvm-type, r=folkertdev
JonathanBrouwer Nov 3, 2026
fa0cc7f
Rollup merge of #162232 - fmease:yeet-builtin-hash, r=JohnTitor
JonathanBrouwer Nov 3, 2026
9c14e39
Rollup merge of #162608 - aytey:unpretty-hygiene-test-churn, r=fmease
JonathanBrouwer Nov 3, 2026
b5eabe4
Rollup merge of #164241 - yilin0518:fix_ptr_unsafe, r=JohnTitor
JonathanBrouwer Nov 3, 2026
9092f82
Rollup merge of #165029 - JonathanBrouwer:expected-lint, r=fmease
JonathanBrouwer Nov 3, 2026
70fcbd1
Rollup merge of #165203 - xingxue-ibm:aix-disable-test-dynamic-loadin…
JonathanBrouwer Nov 3, 2026
81b955f
Rollup merge of #165230 - lsunsi:issue158773, r=adwinwhite
JonathanBrouwer Nov 3, 2026
de0ed49
Rollup merge of #165374 - jdonszelmann:move-trait-splitouts, r=ShoyuV…
JonathanBrouwer 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
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
23 changes: 14 additions & 9 deletions compiler/rustc_attr_parsing/src/attributes/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use thin_vec::ThinVec;

use crate::attributes::{AcceptMapping, AttributeParser, AttributeStability};
use crate::context::{AcceptContext, ExpectStringLiteral, FinalizeContext};
use crate::diagnostics::{MalformedLintAttributeInput, MalformedLintAttributeInputHelp};
use crate::parser::{ArgParser, MetaItemOrLitParser};
use crate::target_checking::AllowedTargets;
use crate::target_checking::Policy::{Allow, Warn};
Expand Down Expand Up @@ -36,9 +37,11 @@ impl LintParser {
let p = parsers.last()?.meta_item()?;
let nv = p.args().as_name_value()?;
if !p.path().word_is(sym::reason) {
cx.emit_err(diagnostics::MalformedAttribute {
// FIXME: We should recommend `reason` here
cx.emit_err(MalformedLintAttributeInput {
span: p.span(),
kind: diagnostics::MalformedAttributeKind::BadAttributeArgument(p.span()),
help: MalformedLintAttributeInputHelp::Other { kind: kind.sym() },
kind: kind.sym(),
});
} else {
parsers = &parsers[..(parsers.len() - 1)];
Expand Down Expand Up @@ -78,26 +81,28 @@ impl LintParser {
nv.expect_string_literal(cx);
}
ArgParser::NameValue(_) | ArgParser::List(_) => {
cx.emit_err(diagnostics::MalformedAttribute {
cx.emit_err(MalformedLintAttributeInput {
span: p.span(),
kind: diagnostics::MalformedAttributeKind::BadAttributeArgument(
item.span(),
),
help: MalformedLintAttributeInputHelp::Other {
kind: kind.sym(),
},
kind: kind.sym(),
});
}
}
}
MetaItemOrLitParser::Lit(lit) => {
cx.emit_err(diagnostics::BadAttributeLit {
cx.emit_err(MalformedLintAttributeInput {
span: item.span(),
help: if lit.kind.is_str() {
diagnostics::BadAttributeLitHelp::StrLit {
MalformedLintAttributeInputHelp::StrLit {
sym: lit.symbol,
kind: kind.sym(),
}
} else {
diagnostics::BadAttributeLitHelp::Other { kind: kind.sym() }
MalformedLintAttributeInputHelp::Other { kind: kind.sym() }
},
kind: kind.sym(),
});
}
}
Expand Down
11 changes: 5 additions & 6 deletions compiler/rustc_attr_parsing/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2196,24 +2196,23 @@ pub(crate) struct MalformedAttribute {

#[derive(Subdiagnostic)]
pub(crate) enum MalformedAttributeKind {
#[label("bad attribute argument")]
BadAttributeArgument(#[primary_span] Span),
#[label("reason in lint attribute must come last")]
ReasonMustComeLast(#[primary_span] Span),
}

#[derive(Diagnostic)]
#[diag("expected a lint, found literal")]
pub(crate) struct BadAttributeLit {
#[diag("malformed `{$kind}` attribute input")]
pub(crate) struct MalformedLintAttributeInput {
#[primary_span]
#[label("not the name of a lint")]
pub span: Span,
pub kind: Symbol,
#[subdiagnostic]
pub help: BadAttributeLitHelp,
pub help: MalformedLintAttributeInputHelp,
}

#[derive(Subdiagnostic)]
pub(crate) enum BadAttributeLitHelp {
pub(crate) enum MalformedLintAttributeInputHelp {
#[help("try using `#[{$kind}({$sym})]`")]
StrLit { sym: Symbol, kind: Symbol },
#[help("for example, write `#[{$kind}(dead_code)]` for `dead_code`")]
Expand Down
54 changes: 27 additions & 27 deletions compiler/rustc_codegen_llvm/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use tracing::{debug, instrument, trace};
use crate::common::CodegenCx;
use crate::diagnostics::SymbolAlreadyDefined;
use crate::llvm::{self, Type, Value, const_ptr_auth};
use crate::type_of::LayoutLlvmExt;
use crate::{base, debuginfo};

/// Indicates whether a value originates from a `static`.
Expand Down Expand Up @@ -200,7 +199,7 @@ fn check_and_apply_linkage<'ll, 'tcx>(
let mut should_sign = false;
// Declare a symbol `foo`. If `foo` is an extern_weak symbol, we declare
// an extern_weak function, otherwise a global with the desired linkage.
let g1 = if matches!(attrs.import_linkage, Some(Linkage::ExternalWeak)) {
let actual_global = if matches!(attrs.import_linkage, Some(Linkage::ExternalWeak)) {
// An `extern_weak` function is represented as an `Option<unsafe extern ...>`,
// we extract the function signature and declare it as an extern_weak function
// instead of an extern_weak i8.
Expand All @@ -224,28 +223,11 @@ fn check_and_apply_linkage<'ll, 'tcx>(
} else {
cx.declare_global(sym, cx.type_i8())
};
llvm::set_linkage(g1, base::linkage_to_llvm(linkage));
llvm::set_linkage(actual_global, base::linkage_to_llvm(linkage));

// Normally this is done in `get_static_inner`, but when as we generate an internal global,
// it will apply the dso_local to the internal global instead, so do it here, too.
cx.assume_dso_local(g1, true);

// Declare an internal global `extern_with_linkage_foo` which
// is initialized with the address of `foo`. If `foo` is
// discarded during linking (for example, if `foo` has weak
// linkage and there are no definitions), then
// `extern_with_linkage_foo` will instead be initialized to
// zero.
let real_name =
format!("_rust_extern_with_linkage_{:016x}_{sym}", cx.tcx.stable_crate_id(LOCAL_CRATE));
let g2 = cx.define_global(&real_name, llty).unwrap_or_else(|| {
cx.sess().dcx().emit_fatal(SymbolAlreadyDefined {
span: cx.tcx.def_span(def_id),
symbol_name: sym,
})
});
llvm::set_linkage(g2, llvm::Linkage::InternalLinkage);
llvm::set_unnamed_address(g2, llvm::UnnamedAddr::Global);
cx.assume_dso_local(actual_global, true);

// Sign the function pointer that is used to initialize the global
let initializer = if should_sign {
Expand All @@ -256,18 +238,36 @@ fn check_and_apply_linkage<'ll, 'tcx>(
.expect("pointer authentication functions must be available when signing");

const_ptr_auth(
cx.const_bitcast(g1, llty),
actual_global,
schema.key as u32,
schema.constant_discriminator as u64,
None, /* address_diversity */
)
} else {
g1
actual_global
};

llvm::set_initializer(g2, initializer);

g2
// Declare an internal global `extern_with_linkage_foo` which
// is initialized with the address of `foo`. If `foo` is
// discarded during linking (for example, if `foo` has weak
// linkage and there are no definitions), then
// `extern_with_linkage_foo` will instead be initialized to
// zero.
let real_name =
format!("_rust_extern_with_linkage_{:016x}_{sym}", cx.tcx.stable_crate_id(LOCAL_CRATE));
let pointer_global =
cx.define_global(&real_name, cx.val_ty(initializer)).unwrap_or_else(|| {
cx.sess().dcx().emit_fatal(SymbolAlreadyDefined {
span: cx.tcx.def_span(def_id),
symbol_name: sym,
})
});
llvm::set_linkage(pointer_global, llvm::Linkage::InternalLinkage);
llvm::set_unnamed_address(pointer_global, llvm::UnnamedAddr::Global);

llvm::set_initializer(pointer_global, initializer);

pointer_global
} else if cx.tcx.sess.target.arch == Arch::X86
&& common::is_using_dlltool(&cx.tcx.sess.target)
&& let Some(dllimport) = crate::common::get_dllimport(cx.tcx, def_id, sym)
Expand Down Expand Up @@ -358,7 +358,7 @@ impl<'ll> CodegenCx<'ll, '_> {
} else {
let ty = instance.ty(self.tcx, self.typing_env());
trace!(?ty);
self.layout_of(ty).llvm_type(self)
self.type_array(self.type_i8(), self.layout_of(ty).size.bytes())
};
self.get_static_inner(def_id, llty)
}
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_codegen_llvm/src/llvm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ pub(crate) fn add_global<'ll>(llmod: Module<'ll>, ty: &'ll Type, name_cstr: &CSt
}

pub(crate) fn set_initializer(llglobal: &Value, constant_val: &Value) {
unsafe {
assert_eq!(
crate::llvm::LLVMGlobalGetValueType(llglobal),
crate::llvm::LLVMTypeOf(constant_val)
);
}
unsafe {
LLVMSetInitializer(llglobal, constant_val);
}
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_llvm/src/mono_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use crate::abi::FnAbiLlvmExt;
use crate::builder::Builder;
use crate::context::CodegenCx;
use crate::diagnostics::SymbolAlreadyDefined;
use crate::type_of::LayoutLlvmExt;
use crate::{base, llvm};

impl<'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
Expand All @@ -37,7 +36,7 @@ impl<'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
// out the llvm type from the actual evaluated initializer.
let ty =
if nested { self.tcx.types.unit } else { instance.ty(self.tcx, self.typing_env()) };
let llty = self.layout_of(ty).llvm_type(self);
let llty = self.type_array(self.type_i8(), self.layout_of(ty).size.bytes());

let g = self.define_global(symbol_name, llty).unwrap_or_else(|| {
self.sess()
Expand Down
Loading
Loading