Skip to content
Closed
Changes from 2 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0e6f7c6
Add AsyncFn family of traits
compiler-errors Dec 20, 2023
fde86e5
We do not need impl_trait_in_assoc_ty
compiler-errors Dec 20, 2023
17b4333
select AsyncFn traits during overloaded call op
compiler-errors Dec 20, 2023
46652dd
llvm: simplify data layout check
davidtwco Jan 17, 2024
2c2f3ed
Provide more context on recursive `impl` evaluation overflow
estebank Dec 28, 2023
c85bb27
Account for trailing comma in removal suggestion
estebank Dec 28, 2023
56bc552
Bump `object` version
clubby789 Jan 21, 2024
b50b333
Bump `uniq-langid` version
clubby789 Jan 21, 2024
29bdf9e
Account for single `where` bound being removed
estebank Jan 4, 2024
849d884
Remove --fatal-warnings on wasm targets
djkoloski Jan 23, 2024
50501c6
linker: Refactor APIs for linking dynamic libraries
petrochenkov Jan 17, 2024
0e38a65
linker: Refactor APIs for linking static libraries
petrochenkov Jan 17, 2024
14cd3fd
linker: Group library linking methods together and sort them consiste…
petrochenkov Jan 18, 2024
859f37a
linker: Do not collect search paths unless necessary
petrochenkov Jan 18, 2024
d15db6b
linker: Merge `link_staticlib_*` and `link_whole_staticlib_*`
petrochenkov Jan 18, 2024
1b8e871
linker: Cleanup implementations of `link_staticlib_*`
petrochenkov Jan 18, 2024
03f23c1
linker: Fix Rust dylib crate extension on windows-msvc
petrochenkov Jan 23, 2024
83ef18c
coverage: Dismantle `Instrumentor` into ordinary functions
Zalathar Jan 24, 2024
572d7e9
coverage: Flatten the functions for extracting/refining coverage spans
Zalathar Jan 24, 2024
64f590a
Assert that a single scope is passed to `for_scope`
Urgau Jan 22, 2024
c61bc71
Rollup merge of #119305 - compiler-errors:async-fn-traits, r=oli-obk
fmease Jan 24, 2024
d21fdf6
Rollup merge of #119389 - estebank:issue-116925, r=TaKO8Ki
fmease Jan 24, 2024
afb79a8
Rollup merge of #120062 - davidtwco:llvm-data-layout-check, r=wesleyw…
fmease Jan 24, 2024
14f4645
Rollup merge of #120099 - petrochenkov:linkapi, r=WaffleLapkin
fmease Jan 24, 2024
83f83d3
Rollup merge of #120201 - clubby789:dep-update, r=dtolnay
fmease Jan 24, 2024
8193116
Rollup merge of #120230 - Urgau:for_scope-single-scope, r=michaelwoer…
fmease Jan 24, 2024
7c1523f
Rollup merge of #120278 - djkoloski:remove_fatal_warnings_wasm, r=oli…
fmease Jan 24, 2024
bc241fd
Rollup merge of #120292 - Zalathar:dismantle, r=oli-obk
fmease Jan 24, 2024
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
23 changes: 18 additions & 5 deletions compiler/rustc_session/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,16 +1524,25 @@ pub trait RemapFileNameExt {
where
Self: 'a;

fn for_scope(&self, sess: &Session, scopes: RemapPathScopeComponents) -> Self::Output<'_>;
/// Returns a possibly remapped filename based on the passed scope and remap cli options.
///
/// One and only one scope should be passed to this method. For anything related to
/// "codegen" see the [`RemapFileNameExt::for_codegen`] method.
fn for_scope(&self, sess: &Session, scope: RemapPathScopeComponents) -> Self::Output<'_>;

/// Return a possibly remapped filename, to be used in "codegen" related parts.
fn for_codegen(&self, sess: &Session) -> Self::Output<'_>;
}

impl RemapFileNameExt for rustc_span::FileName {
type Output<'a> = rustc_span::FileNameDisplay<'a>;

fn for_scope(&self, sess: &Session, scopes: RemapPathScopeComponents) -> Self::Output<'_> {
if sess.opts.unstable_opts.remap_path_scope.contains(scopes) {
fn for_scope(&self, sess: &Session, scope: RemapPathScopeComponents) -> Self::Output<'_> {
assert!(
scope.bits().count_ones() == 1,
"one and only one scope should be passed to for_scope"
);
if sess.opts.unstable_opts.remap_path_scope.contains(scope) {
self.prefer_remapped_unconditionaly()
} else {
self.prefer_local()
Expand All @@ -1552,8 +1561,12 @@ impl RemapFileNameExt for rustc_span::FileName {
impl RemapFileNameExt for rustc_span::RealFileName {
type Output<'a> = &'a Path;

fn for_scope(&self, sess: &Session, scopes: RemapPathScopeComponents) -> Self::Output<'_> {
if sess.opts.unstable_opts.remap_path_scope.contains(scopes) {
fn for_scope(&self, sess: &Session, scope: RemapPathScopeComponents) -> Self::Output<'_> {
assert!(
scope.bits().count_ones() == 1,
"one and only one scope should be passed to for_scope"
);
if sess.opts.unstable_opts.remap_path_scope.contains(scope) {
self.remapped_path_if_available()
} else {
self.local_path_if_available()
Expand Down