Auto merge of #117630 - matthiaskrgr:rollup-v0d5p3f, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #117592 (Use the correct span when emitting the `env!` result) - #117613 (Remove from vacation and compiler review group) - #117615 (Couple of small changes) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
e1fcecb1b9
7 changed files with 25 additions and 26 deletions
|
@ -108,7 +108,7 @@ pub fn expand_env<'cx>(
|
||||||
|
|
||||||
return DummyResult::any(sp);
|
return DummyResult::any(sp);
|
||||||
}
|
}
|
||||||
Some(value) => cx.expr_str(sp, value),
|
Some(value) => cx.expr_str(span, value),
|
||||||
};
|
};
|
||||||
MacEager::expr(e)
|
MacEager::expr(e)
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,11 +104,7 @@ pub trait CodegenBackend {
|
||||||
outputs: &OutputFilenames,
|
outputs: &OutputFilenames,
|
||||||
) -> Result<(CodegenResults, FxIndexMap<WorkProductId, WorkProduct>), ErrorGuaranteed>;
|
) -> Result<(CodegenResults, FxIndexMap<WorkProductId, WorkProduct>), ErrorGuaranteed>;
|
||||||
|
|
||||||
/// This is called on the returned `Box<dyn Any>` from `join_codegen`
|
/// This is called on the returned `CodegenResults` from `join_codegen`
|
||||||
///
|
|
||||||
/// # Panics
|
|
||||||
///
|
|
||||||
/// Panics when the passed `Box<dyn Any>` was not returned by `join_codegen`.
|
|
||||||
fn link(
|
fn link(
|
||||||
&self,
|
&self,
|
||||||
sess: &Session,
|
sess: &Session,
|
||||||
|
|
|
@ -41,6 +41,7 @@ use rustc_session::cstore::MetadataLoader;
|
||||||
use rustc_session::getopts::{self, Matches};
|
use rustc_session::getopts::{self, Matches};
|
||||||
use rustc_session::lint::{Lint, LintId};
|
use rustc_session::lint::{Lint, LintId};
|
||||||
use rustc_session::{config, EarlyErrorHandler, Session};
|
use rustc_session::{config, EarlyErrorHandler, Session};
|
||||||
|
use rustc_span::def_id::LOCAL_CRATE;
|
||||||
use rustc_span::source_map::FileLoader;
|
use rustc_span::source_map::FileLoader;
|
||||||
use rustc_span::symbol::sym;
|
use rustc_span::symbol::sym;
|
||||||
use rustc_span::FileName;
|
use rustc_span::FileName;
|
||||||
|
@ -421,8 +422,12 @@ fn run_compiler(
|
||||||
// effects of writing the dep-info and reporting errors.
|
// effects of writing the dep-info and reporting errors.
|
||||||
queries.global_ctxt()?.enter(|tcx| tcx.output_filenames(()));
|
queries.global_ctxt()?.enter(|tcx| tcx.output_filenames(()));
|
||||||
} else {
|
} else {
|
||||||
let krate = queries.parse()?.steal();
|
let krate = queries.parse()?;
|
||||||
pretty::print(sess, *ppm, pretty::PrintExtra::AfterParsing { krate });
|
pretty::print(
|
||||||
|
sess,
|
||||||
|
*ppm,
|
||||||
|
pretty::PrintExtra::AfterParsing { krate: &*krate.borrow() },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
trace!("finished pretty-printing");
|
trace!("finished pretty-printing");
|
||||||
return early_exit();
|
return early_exit();
|
||||||
|
@ -477,8 +482,7 @@ fn run_compiler(
|
||||||
}
|
}
|
||||||
|
|
||||||
if sess.opts.unstable_opts.print_vtable_sizes {
|
if sess.opts.unstable_opts.print_vtable_sizes {
|
||||||
let crate_name =
|
let crate_name = queries.global_ctxt()?.enter(|tcx| tcx.crate_name(LOCAL_CRATE));
|
||||||
compiler.session().opts.crate_name.as_deref().unwrap_or("<UNKNOWN_CRATE>");
|
|
||||||
|
|
||||||
sess.code_stats.print_vtable_sizes(crate_name);
|
sess.code_stats.print_vtable_sizes(crate_name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ fn write_or_print(out: &str, sess: &Session) {
|
||||||
// Extra data for pretty-printing, the form of which depends on what kind of
|
// Extra data for pretty-printing, the form of which depends on what kind of
|
||||||
// pretty-printing we are doing.
|
// pretty-printing we are doing.
|
||||||
pub enum PrintExtra<'tcx> {
|
pub enum PrintExtra<'tcx> {
|
||||||
AfterParsing { krate: ast::Crate },
|
AfterParsing { krate: &'tcx ast::Crate },
|
||||||
NeedsAstMap { tcx: TyCtxt<'tcx> },
|
NeedsAstMap { tcx: TyCtxt<'tcx> },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ impl CodeStats {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn print_vtable_sizes(&self, crate_name: &str) {
|
pub fn print_vtable_sizes(&self, crate_name: Symbol) {
|
||||||
let mut infos =
|
let mut infos =
|
||||||
std::mem::take(&mut *self.vtable_sizes.lock()).into_values().collect::<Vec<_>>();
|
std::mem::take(&mut *self.vtable_sizes.lock()).into_values().collect::<Vec<_>>();
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "E", "entries": "6", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "2", "upcasting_cost_percent": "50" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "E", "entries": "6", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "2", "upcasting_cost_percent": "50" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "G", "entries": "14", "entries_ignoring_upcasting": "11", "entries_for_upcasting": "3", "upcasting_cost_percent": "27.27272727272727" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "G", "entries": "14", "entries_ignoring_upcasting": "11", "entries_for_upcasting": "3", "upcasting_cost_percent": "27.27272727272727" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "A", "entries": "6", "entries_ignoring_upcasting": "5", "entries_for_upcasting": "1", "upcasting_cost_percent": "20" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "A", "entries": "6", "entries_ignoring_upcasting": "5", "entries_for_upcasting": "1", "upcasting_cost_percent": "20" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "B", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "B", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "D", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "D", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "F", "entries": "6", "entries_ignoring_upcasting": "6", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "F", "entries": "6", "entries_ignoring_upcasting": "6", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "_::S", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "_::S", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "_::S", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "_::S", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "help::MarkerWithSuper", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "help::MarkerWithSuper", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "help::Super", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "help::Super", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
||||||
print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "help::V", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "help::V", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
|
||||||
|
|
|
@ -608,19 +608,18 @@ cc = ["@nnethercote"]
|
||||||
[assign]
|
[assign]
|
||||||
warn_non_default_branch = true
|
warn_non_default_branch = true
|
||||||
contributing_url = "https://rustc-dev-guide.rust-lang.org/getting-started.html"
|
contributing_url = "https://rustc-dev-guide.rust-lang.org/getting-started.html"
|
||||||
users_on_vacation = ["jyn514", "jackh726", "WaffleLapkin", "oli-obk"]
|
users_on_vacation = ["jyn514", "WaffleLapkin", "oli-obk"]
|
||||||
|
|
||||||
[assign.adhoc_groups]
|
[assign.adhoc_groups]
|
||||||
compiler-team = [
|
compiler-team = [
|
||||||
"@cjgillot",
|
"@cjgillot",
|
||||||
|
"@compiler-errors",
|
||||||
"@petrochenkov",
|
"@petrochenkov",
|
||||||
"@davidtwco",
|
"@davidtwco",
|
||||||
"@oli-obk",
|
"@oli-obk",
|
||||||
"@wesleywiser",
|
"@wesleywiser",
|
||||||
]
|
]
|
||||||
compiler-team-contributors = [
|
compiler-team-contributors = [
|
||||||
"@compiler-errors",
|
|
||||||
"@jackh726",
|
|
||||||
"@TaKO8Ki",
|
"@TaKO8Ki",
|
||||||
"@WaffleLapkin",
|
"@WaffleLapkin",
|
||||||
"@b-naber",
|
"@b-naber",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue