Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
4586a31
Fix not complete after inner-attr in source-file
A4-Tacks Nov 6, 2025
c031184
Fix not complete type alias in pattern
A4-Tacks Nov 12, 2025
0234d7c
Fix skipiter not applicable in autoderef
A4-Tacks Nov 22, 2025
9bf3695
Add multiple generate for enum generate is, as, try_into
A4-Tacks Sep 18, 2025
83edf8f
make postcard first class member of proc-macro-srv-cli
Shourya742 Nov 7, 2025
4284804
add postcard related methods to proc-macro-apo
Shourya742 Nov 7, 2025
aea45c3
add postcard abstraction inside Message trait
Shourya742 Nov 22, 2025
c3708c7
add review suggestions
Shourya742 Nov 23, 2025
35e056e
Inline macro sub-namespace lookup into `sub_namespace_match`
Zalathar Nov 23, 2025
0ce6a06
Basic support for declarative attribute/derive macros
Zalathar Nov 23, 2025
09cf067
Record inferred type for type placeholders
nicolas-guichard Jun 26, 2025
eb5401e
Use inferred type in SourceAnalyzer::type_of_type
nicolas-guichard Jun 26, 2025
b331c52
extract_type_alias assist extracts inferred type when possible
nicolas-guichard Jun 26, 2025
93de020
Show inlay hints for type placeholders
nicolas-guichard Jun 30, 2025
af36027
Merge pull request #20125 from nicolas-guichard/push-pypzwzspzznu
ChayimFriedman2 Nov 24, 2025
d73c941
add regression tests for add_missing_impl_members
Natural-selection1 Nov 24, 2025
84d774c
Merge pull request #21123 from Natural-selection1/test
ChayimFriedman2 Nov 24, 2025
ddefc4b
add codec and framing to abstract encoding and decoding logic from run
Shourya742 Nov 24, 2025
8a19d58
Merge pull request #20986 from Shourya742/2025-11-07-add-support-for-…
Veykril Nov 24, 2025
16f4c86
Merge pull request #21121 from Zalathar/derive-macro
ChayimFriedman2 Nov 24, 2025
a54b195
Fix invalid completion arg nr
A4-Tacks Nov 25, 2025
416d88b
Build releases with static CRT for `-windows-msvc` targets.
ColinFinck Nov 12, 2025
ad952c0
Merge pull request #21126 from A4-Tacks/arglist-nr-error-comma
lnicola Nov 25, 2025
5c82106
Merge pull request #21027 from ColinFinck/msvc-crt-static
lnicola Nov 25, 2025
b0d1c9a
completions: Fix completions disregarding snippet capabilities
Veykril Nov 26, 2025
20fa8ab
Merge pull request #21131 from Veykril/push-rxrmsylwoowm
Veykril Nov 26, 2025
e5058c4
minor: Rename proc-macro-srv protocol flags
Veykril Nov 26, 2025
c414fc5
fix: Do not try to connect via postcard to proc-macro-srv
Veykril Nov 26, 2025
6eb6936
return Some(T) and not T in read method Message trait
Shourya742 Nov 26, 2025
c076ef3
Revert to spawning proc-macro-srv without format flag
Veykril Nov 26, 2025
c460a72
Merge pull request #21133 from Veykril/push-olvztmtwzmvv
Veykril Nov 26, 2025
98fffb4
Merge pull request #21135 from Shourya742/2025-11-26-default-json
Veykril Nov 26, 2025
c18ec02
Gate spawning proc-macro-srv with --format on toolchain version
Veykril Nov 26, 2025
f7970fd
Merge pull request #21139 from Veykril/push-wmxmrovmrrxx
Veykril Nov 26, 2025
2ab2090
Port the `#![windows_subsystem]` attribute to the new attribute system
scrabsha Nov 26, 2025
8c5f7a3
Prepare for merging from rust-lang/rust
invalid-email-address Nov 27, 2025
fc4db45
Merge ref '1be6b13be73d' from rust-lang/rust
invalid-email-address Nov 27, 2025
a60d5fa
Merge pull request #21143 from rust-lang/rustc-pull
lnicola Nov 27, 2025
b8191e6
Merge pull request #20685 from A4-Tacks/enum-multi-gen-is-as
ShoyuVanilla Nov 27, 2025
e958534
Merge pull request #21028 from A4-Tacks/comp-pattern-alias
ShoyuVanilla Nov 27, 2025
32555af
Merge pull request #20976 from A4-Tacks/comp-after-top-inner-attr
ShoyuVanilla Nov 27, 2025
41a2df5
Merge pull request #21095 from A4-Tacks/autoderef-skipiter
Veykril Nov 27, 2025
71b97d2
make run-make tests use 2024 edition by default
tshepang Nov 27, 2025
6d05636
Add `impl TrustedLen` on `BTree{Map,Set}` iterators
yotamofek Nov 27, 2025
2578d40
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl producing tr…
Veykril Nov 27, 2025
7f93ba5
Merge pull request #21145 from Veykril/push-prwwrlwmoxzx
Veykril Nov 27, 2025
eddf2f8
tests
bend-n Sep 26, 2025
1d718e2
constify from_fn, try_from_fn, try_map, map
bend-n Oct 12, 2025
e3a2c23
redo the drain
bend-n Nov 24, 2025
d09726b
tweak helix config
WaffleLapkin Sep 26, 2025
dd58ee3
synchronize helix/zed/vscode settings
WaffleLapkin Nov 13, 2025
e399091
remove session+blob decoder construction
jdonszelmann Nov 27, 2025
bea0d68
update editor config hashes
WaffleLapkin Nov 14, 2025
19f7faa
-Znext-solver: normalize expected function input types when fudging
ShoyuVanilla Nov 25, 2025
9f584ff
Mention issue 149379 and add tests for it
ShoyuVanilla Nov 27, 2025
6bbdb1f
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl rendering pu…
Veykril Nov 27, 2025
ac118f9
Merge pull request #21146 from Veykril/push-kwupvlsnstrx
Veykril Nov 27, 2025
b1b3e5e
Rollup merge of #147071 - bend-n:const_array-ops, r=oli-obk
matthiaskrgr Nov 27, 2025
725d8bd
Rollup merge of #148930 - WaffleLapkin:config-tweaks2, r=mati865
matthiaskrgr Nov 27, 2025
12d7202
Rollup merge of #149320 - ShoyuVanilla:normalized-fudge, r=lcnr
matthiaskrgr Nov 27, 2025
267fe55
Rollup merge of #149363 - scrabsha:rust/sasha/vkknqylzvzlu, r=jdonsze…
matthiaskrgr Nov 27, 2025
c83f8b6
Rollup merge of #149378 - tshepang:patch-2, r=clubby789
matthiaskrgr Nov 27, 2025
66c0e1c
Rollup merge of #149381 - yotamofek:pr/library/btree-iter-trustedlen,…
matthiaskrgr Nov 27, 2025
4912d12
Rollup merge of #149388 - jdonszelmann:rm-sess-blob, r=jieyouxu
matthiaskrgr Nov 27, 2025
b2f8c16
Rollup merge of #149390 - lnicola:sync-from-ra, r=lnicola
matthiaskrgr Nov 27, 2025
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
33 changes: 33 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/crate_level.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use rustc_hir::attrs::WindowsSubsystemKind;

use super::prelude::*;

pub(crate) struct CrateNameParser;
Expand Down Expand Up @@ -142,3 +144,34 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcCoherenceIsCoreParser {
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcCoherenceIsCore;
}

pub(crate) struct WindowsSubsystemParser;

impl<S: Stage> SingleAttributeParser<S> for WindowsSubsystemParser {
const PATH: &[Symbol] = &[sym::windows_subsystem];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;
const TEMPLATE: AttributeTemplate = template!(NameValueStr: ["windows", "console"], "https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute");

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
let Some(nv) = args.name_value() else {
cx.expected_name_value(
args.span().unwrap_or(cx.inner_span),
Some(sym::windows_subsystem),
);
return None;
};

let kind = match nv.value_as_str() {
Some(sym::console) => WindowsSubsystemKind::Console,
Some(sym::windows) => WindowsSubsystemKind::Windows,
Some(_) | None => {
cx.expected_specific_argument_strings(nv.value_span, &[sym::console, sym::windows]);
return None;
}
};

Some(AttributeKind::WindowsSubsystem(kind, cx.attr_span))
}
}
2 changes: 2 additions & 0 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use crate::attributes::confusables::ConfusablesParser;
use crate::attributes::crate_level::{
CrateNameParser, MoveSizeLimitParser, NoCoreParser, NoStdParser, PatternComplexityLimitParser,
RecursionLimitParser, RustcCoherenceIsCoreParser, TypeLengthLimitParser,
WindowsSubsystemParser,
};
use crate::attributes::debugger::DebuggerViualizerParser;
use crate::attributes::deprecation::DeprecationParser;
Expand Down Expand Up @@ -211,6 +212,7 @@ attribute_parsers!(
Single<SkipDuringMethodDispatchParser>,
Single<TransparencyParser>,
Single<TypeLengthLimitParser>,
Single<WindowsSubsystemParser>,
Single<WithoutArgs<AllowIncoherentImplParser>>,
Single<WithoutArgs<AllowInternalUnsafeParser>>,
Single<WithoutArgs<AsPtrParser>>,
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_codegen_ssa/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ codegen_ssa_invalid_monomorphization_unsupported_symbol = invalid monomorphizati

codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size = invalid monomorphization of `{$name}` intrinsic: unsupported {$symbol} from `{$in_ty}` with element `{$in_elem}` of size `{$size}` to `{$ret_ty}`

codegen_ssa_invalid_windows_subsystem = invalid windows subsystem `{$subsystem}`, only `windows` and `console` are allowed

codegen_ssa_ld64_unimplemented_modifier = `as-needed` modifier not implemented yet for ld64

codegen_ssa_lib_def_write_failure = failed to write lib.def file: {$error}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ fn add_order_independent_options(
&& sess.target.is_like_windows
&& let Some(s) = &codegen_results.crate_info.windows_subsystem
{
cmd.subsystem(s);
cmd.windows_subsystem(*s);
}

// Try to strip as much out of the generated object by removing unused
Expand Down
27 changes: 14 additions & 13 deletions compiler/rustc_codegen_ssa/src/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
use std::{env, io, iter, mem, str};

use find_msvc_tools;
use rustc_hir::attrs::WindowsSubsystemKind;
use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
use rustc_metadata::{
find_native_static_library, try_find_native_dynamic_library, try_find_native_static_library,
Expand Down Expand Up @@ -345,7 +346,7 @@ pub(crate) trait Linker {
crate_type: CrateType,
symbols: &[(String, SymbolExportKind)],
);
fn subsystem(&mut self, subsystem: &str);
fn windows_subsystem(&mut self, subsystem: WindowsSubsystemKind);
fn linker_plugin_lto(&mut self);
fn add_eh_frame_header(&mut self) {}
fn add_no_exec(&mut self) {}
Expand Down Expand Up @@ -884,8 +885,8 @@ impl<'a> Linker for GccLinker<'a> {
}
}

fn subsystem(&mut self, subsystem: &str) {
self.link_args(&["--subsystem", subsystem]);
fn windows_subsystem(&mut self, subsystem: WindowsSubsystemKind) {
self.link_args(&["--subsystem", subsystem.as_str()]);
}

fn reset_per_library_state(&mut self) {
Expand Down Expand Up @@ -1159,9 +1160,8 @@ impl<'a> Linker for MsvcLinker<'a> {
self.link_arg(&arg);
}

fn subsystem(&mut self, subsystem: &str) {
// Note that previous passes of the compiler validated this subsystem,
// so we just blindly pass it to the linker.
fn windows_subsystem(&mut self, subsystem: WindowsSubsystemKind) {
let subsystem = subsystem.as_str();
self.link_arg(&format!("/SUBSYSTEM:{subsystem}"));

// Windows has two subsystems we're interested in right now, the console
Expand Down Expand Up @@ -1307,7 +1307,7 @@ impl<'a> Linker for EmLinker<'a> {
self.cc_arg(arg);
}

fn subsystem(&mut self, _subsystem: &str) {
fn windows_subsystem(&mut self, _subsystem: WindowsSubsystemKind) {
// noop
}

Expand Down Expand Up @@ -1444,7 +1444,7 @@ impl<'a> Linker for WasmLd<'a> {
}
}

fn subsystem(&mut self, _subsystem: &str) {}
fn windows_subsystem(&mut self, _subsystem: WindowsSubsystemKind) {}

fn linker_plugin_lto(&mut self) {
match self.sess.opts.cg.linker_plugin_lto {
Expand Down Expand Up @@ -1566,7 +1566,8 @@ impl<'a> Linker for L4Bender<'a> {
self.sess.dcx().emit_warn(errors::L4BenderExportingSymbolsUnimplemented);
}

fn subsystem(&mut self, subsystem: &str) {
fn windows_subsystem(&mut self, subsystem: WindowsSubsystemKind) {
let subsystem = subsystem.as_str();
self.link_arg(&format!("--subsystem {subsystem}"));
}

Expand Down Expand Up @@ -1735,7 +1736,7 @@ impl<'a> Linker for AixLinker<'a> {
self.link_arg(format!("-bE:{}", path.to_str().unwrap()));
}

fn subsystem(&mut self, _subsystem: &str) {}
fn windows_subsystem(&mut self, _subsystem: WindowsSubsystemKind) {}

fn reset_per_library_state(&mut self) {
self.hint_dynamic();
Expand Down Expand Up @@ -1969,7 +1970,7 @@ impl<'a> Linker for PtxLinker<'a> {
) {
}

fn subsystem(&mut self, _subsystem: &str) {}
fn windows_subsystem(&mut self, _subsystem: WindowsSubsystemKind) {}

fn linker_plugin_lto(&mut self) {}
}
Expand Down Expand Up @@ -2050,7 +2051,7 @@ impl<'a> Linker for LlbcLinker<'a> {
}
}

fn subsystem(&mut self, _subsystem: &str) {}
fn windows_subsystem(&mut self, _subsystem: WindowsSubsystemKind) {}

fn linker_plugin_lto(&mut self) {}
}
Expand Down Expand Up @@ -2134,7 +2135,7 @@ impl<'a> Linker for BpfLinker<'a> {
}
}

fn subsystem(&mut self, _subsystem: &str) {}
fn windows_subsystem(&mut self, _subsystem: WindowsSubsystemKind) {}

fn linker_plugin_lto(&mut self) {}
}
19 changes: 5 additions & 14 deletions compiler/rustc_codegen_ssa/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ use std::time::{Duration, Instant};

use itertools::Itertools;
use rustc_abi::FIRST_VARIANT;
use rustc_ast as ast;
use rustc_ast::expand::allocator::{
ALLOC_ERROR_HANDLER, ALLOCATOR_METHODS, AllocatorKind, AllocatorMethod, AllocatorTy,
};
use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
use rustc_data_structures::profiling::{get_resident_set_size, print_time_passes_entry};
use rustc_data_structures::sync::{IntoDynSyncSend, par_map};
use rustc_data_structures::unord::UnordMap;
use rustc_hir::attrs::{DebuggerVisualizerType, OptimizeAttr};
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
use rustc_hir::attrs::{AttributeKind, DebuggerVisualizerType, OptimizeAttr};
use rustc_hir::def_id::{CRATE_DEF_ID, DefId, LOCAL_CRATE};
use rustc_hir::lang_items::LangItem;
use rustc_hir::{ItemId, Target};
use rustc_hir::{ItemId, Target, find_attr};
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerFile;
use rustc_middle::middle::dependency_format::Dependencies;
Expand All @@ -31,7 +30,7 @@ use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
use rustc_middle::{bug, span_bug};
use rustc_session::Session;
use rustc_session::config::{self, CrateType, EntryFnType};
use rustc_span::{DUMMY_SP, Symbol, sym};
use rustc_span::{DUMMY_SP, Symbol};
use rustc_symbol_mangling::mangle_internal_symbol;
use rustc_target::spec::{Arch, Os};
use rustc_trait_selection::infer::{BoundRegionConversionTime, TyCtxtInferExt};
Expand Down Expand Up @@ -896,15 +895,7 @@ impl CrateInfo {
let linked_symbols =
crate_types.iter().map(|&c| (c, crate::back::linker::linked_symbols(tcx, c))).collect();
let local_crate_name = tcx.crate_name(LOCAL_CRATE);
let crate_attrs = tcx.hir_attrs(rustc_hir::CRATE_HIR_ID);
let subsystem =
ast::attr::first_attr_value_str_by_name(crate_attrs, sym::windows_subsystem);
let windows_subsystem = subsystem.map(|subsystem| {
if subsystem != sym::windows && subsystem != sym::console {
tcx.dcx().emit_fatal(errors::InvalidWindowsSubsystem { subsystem });
}
subsystem.to_string()
});
let windows_subsystem = find_attr!(tcx.get_all_attrs(CRATE_DEF_ID), AttributeKind::WindowsSubsystem(kind, _) => *kind);

// This list is used when generating the command line to pass through to
// system linker. The linker expects undefined symbols on the left of the
Expand Down
6 changes: 0 additions & 6 deletions compiler/rustc_codegen_ssa/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,12 +749,6 @@ pub(crate) struct MultipleMainFunctions {
pub span: Span,
}

#[derive(Diagnostic)]
#[diag(codegen_ssa_invalid_windows_subsystem)]
pub(crate) struct InvalidWindowsSubsystem {
pub subsystem: Symbol,
}

#[derive(Diagnostic)]
#[diag(codegen_ssa_shuffle_indices_evaluation)]
pub(crate) struct ShuffleIndicesEvaluation {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::sync::Arc;
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
use rustc_data_structures::unord::UnordMap;
use rustc_hir::CRATE_HIR_ID;
use rustc_hir::attrs::{CfgEntry, NativeLibKind};
use rustc_hir::attrs::{CfgEntry, NativeLibKind, WindowsSubsystemKind};
use rustc_hir::def_id::CrateNum;
use rustc_macros::{Decodable, Encodable, HashStable};
use rustc_metadata::EncodedMetadata;
Expand Down Expand Up @@ -225,7 +225,7 @@ pub struct CrateInfo {
pub used_crate_source: UnordMap<CrateNum, Arc<CrateSource>>,
pub used_crates: Vec<CrateNum>,
pub dependency_formats: Arc<Dependencies>,
pub windows_subsystem: Option<String>,
pub windows_subsystem: Option<WindowsSubsystemKind>,
pub natvis_debugger_visualizers: BTreeSet<DebuggerVisualizerFile>,
pub lint_levels: CodegenLintLevels,
pub metadata_symbol: String,
Expand Down
19 changes: 19 additions & 0 deletions compiler/rustc_hir/src/attrs/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,22 @@ pub enum RtsanSetting {
Caller,
}

#[derive(Eq, PartialEq, Debug, Copy, Clone)]
#[derive(Encodable, Decodable, HashStable_Generic, PrintAttribute)]
pub enum WindowsSubsystemKind {
Console,
Windows,
}

impl WindowsSubsystemKind {
pub fn as_str(&self) -> &'static str {
match self {
WindowsSubsystemKind::Console => "console",
WindowsSubsystemKind::Windows => "windows",
}
}
}

/// Represents parsed *built-in* inert attributes.
///
/// ## Overview
Expand Down Expand Up @@ -759,5 +775,8 @@ pub enum AttributeKind {

/// Represents `#[used]`
Used { used_by: UsedBy, span: Span },

/// Represents `#[windows_subsystem]`.
WindowsSubsystem(WindowsSubsystemKind, Span),
// tidy-alphabetical-end
}
1 change: 1 addition & 0 deletions compiler/rustc_hir/src/attrs/encode_cross_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ impl AttributeKind {
UnsafeSpecializationMarker(..) => No,
UnstableFeatureBound(..) => No,
Used { .. } => No,
WindowsSubsystem(..) => No,
// tidy-alphabetical-end
}
}
Expand Down
38 changes: 38 additions & 0 deletions compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let expected_input_tys: Option<Vec<_>> = expectation
.only_has_type(self)
.and_then(|expected_output| {
// FIXME(#149379): This operation results in expected input
// types which are potentially not well-formed or for whom the
// function where-bounds don't actually hold. This results
// in weird bugs when later treating these expectations as if
// they were actually correct.
self.fudge_inference_if_ok(|| {
let ocx = ObligationCtxt::new(self);

Expand All @@ -252,6 +257,39 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// No argument expectations are produced if unification fails.
let origin = self.misc(call_span);
ocx.sup(&origin, self.param_env, expected_output, formal_output)?;

let formal_input_tys_ns;
let formal_input_tys = if self.next_trait_solver() {
// In the new solver, the normalizations are done lazily.
// Because of this, if we encounter unnormalized alias types inside this
// fudge scope, we might lose the relationships between them and other vars
// when fudging inference variables created here.
// So, we utilize generalization to normalize aliases by adding a new
// inference var and equating it with the type we want to pull out of the
// fudge scope.
formal_input_tys_ns = formal_input_tys
.iter()
.map(|&ty| {
// If we replace a (unresolved) inference var with a new inference
// var, it will be eventually resolved to itself and this will
// weaken type inferences as the new inference var will be fudged
// out and lose all relationships with other vars while the former
// will not be fudged.
if ty.is_ty_var() {
return ty;
}

let generalized_ty = self.next_ty_var(call_span);
ocx.eq(&origin, self.param_env, ty, generalized_ty).unwrap();
generalized_ty
})
.collect_vec();

formal_input_tys_ns.as_slice()
} else {
formal_input_tys
};

if !ocx.try_evaluate_obligations().is_empty() {
return Err(TypeError::Mismatch);
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_metadata/src/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,6 @@ impl CStore {
};

let crate_metadata = CrateMetadata::new(
tcx.sess,
self,
metadata,
crate_root,
Expand Down
16 changes: 1 addition & 15 deletions compiler/rustc_metadata/src/rmeta/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,19 +211,6 @@ impl<'a, 'tcx> Metadata<'a, 'tcx> for &'a MetadataBlob {
}
}

impl<'a, 'tcx> Metadata<'a, 'tcx> for (&'a MetadataBlob, &'tcx Session) {
#[inline]
fn blob(self) -> &'a MetadataBlob {
self.0
}

#[inline]
fn sess(self) -> Option<&'tcx Session> {
let (_, sess) = self;
Some(sess)
}
}

impl<'a, 'tcx> Metadata<'a, 'tcx> for CrateMetadataRef<'a> {
#[inline]
fn blob(self) -> &'a MetadataBlob {
Expand Down Expand Up @@ -1862,7 +1849,6 @@ impl<'a> CrateMetadataRef<'a> {

impl CrateMetadata {
pub(crate) fn new(
sess: &Session,
cstore: &CStore,
blob: MetadataBlob,
root: CrateRoot,
Expand All @@ -1876,7 +1862,7 @@ impl CrateMetadata {
) -> CrateMetadata {
let trait_impls = root
.impls
.decode((&blob, sess))
.decode(&blob)
.map(|trait_impls| (trait_impls.trait_id, trait_impls.impls))
.collect();
let alloc_decoding_state =
Expand Down
Loading
Loading