Skip to content

Rollup of 19 pull requests #81449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
b43aa96
Print failure message on all tests that should panic, but don't
johanngan Jan 10, 2021
63a1eee
Reset LateContext enclosing body in nested items
camsteffen Jan 18, 2021
21fb586
Query for TypeckResults in LateContext::qpath_res
camsteffen Jan 18, 2021
0724573
Move a few more types to `rustc_type_ir`
LeSeulArtichaut Dec 12, 2020
933bb18
Use `rustc_type_ir::{IntTy,UintTy,FloatTy} instead of the `rustc_ast`…
LeSeulArtichaut Dec 12, 2020
50e1ae1
Use ty::{IntTy,UintTy,FloatTy} in rustc
LeSeulArtichaut Dec 12, 2020
e0d64b9
Use ty::{IntTy,UintTy,FloatTy} in rustdoc and clippy
LeSeulArtichaut Dec 12, 2020
eaba3da
Remove qpath_res util function
camsteffen Jan 18, 2021
e25959b
Make more traits of the From/Into family diagnostic items
flip1995 Jan 22, 2021
3b8f1b7
Make `-Z time-passes` less noisy
jyn514 Jan 22, 2021
f241c10
Improve flatten-fuse tests
SkiFire13 Jan 23, 2021
5aa625b
Manually fuse the inner iterator in FlattenCompat
SkiFire13 Jan 23, 2021
8a18fb0
Stabilize `Seek::stream_position` & change feature of `Seek::stream_len`
LukasKalbertodt Dec 19, 2020
48f9dbf
clean up some const error reporting around promoteds
RalfJung Jan 24, 2021
6d4e03a
codegen: assume constants cannot fail to evaluate
RalfJung Jan 24, 2021
77a9e3e
combine: stop eagerly evaluating consts
lcnr Jan 24, 2021
26b4baf
Point to span of upvar making closure FnMut
sledgehammervampire Jan 18, 2021
ef3127d
Completely remove search query parameter when clearing search input
GuillaumeGomez Jan 25, 2021
09518db
Improve URL handling when clicking on a menu link while being on the …
GuillaumeGomez Jan 25, 2021
d00c850
BTreeMap: correct tests for alternative choices of B
ssomers Jan 20, 2021
b0625eb
boop, ur abstract consts are now expanded
BoxyUwU Jan 27, 2021
dea8a16
Avoid describing a method as 'not found' when bounds are unsatisfied
Aaron1011 Sep 26, 2020
a7625f8
compiletest: Add two more unit tests
phansch Jan 27, 2021
582a171
add const_evaluatable_checked test
lcnr Jan 27, 2021
b519deb
const_evaluatable: stop looking into type aliases
lcnr Jan 27, 2021
f426177
comments
BoxyUwU Jan 27, 2021
ab421a1
fix tidy errors
BoxyUwU Jan 27, 2021
45484ec
Update cargo
ehuss Jan 27, 2021
25951a7
Rollup merge of #70904 - LukasKalbertodt:stabilize-seek-convenience, …
jonas-schievink Jan 27, 2021
514f8f3
Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis
jonas-schievink Jan 27, 2021
1997b0a
Rollup merge of #80868 - johanngan:should-panic-msg-with-expected, r=…
jonas-schievink Jan 27, 2021
827e974
Rollup merge of #81149 - Aaron1011:feature/better-no-method-found-err…
jonas-schievink Jan 27, 2021
ae41df4
Rollup merge of #81158 - 1000teslas:issue-80313-fix, r=Aaron1011
jonas-schievink Jan 27, 2021
ef0740c
Rollup merge of #81176 - camsteffen:qpath-res, r=oli-obk
jonas-schievink Jan 27, 2021
73e40af
Rollup merge of #81210 - ssomers:btree_fix_node_size_test, r=Mark-Sim…
jonas-schievink Jan 27, 2021
f7f8f8f
Rollup merge of #81277 - flip1995:from_diag_items, r=matthewjasper
jonas-schievink Jan 27, 2021
e56322f
Rollup merge of #81284 - jyn514:impl-times, r=wesleywiser
jonas-schievink Jan 27, 2021
d6834ec
Rollup merge of #81306 - SkiFire13:fuse-flatten, r=cuviper
jonas-schievink Jan 27, 2021
7b90b1c
Rollup merge of #81327 - RalfJung:codegen-no-const-fail, r=oli-obk
jonas-schievink Jan 27, 2021
428209e
Rollup merge of #81333 - RalfJung:const-err-simplify, r=oli-obk
jonas-schievink Jan 27, 2021
03692ce
Rollup merge of #81351 - lcnr:big-money-big-prices, r=oli-obk
jonas-schievink Jan 27, 2021
6942495
Rollup merge of #81379 - GuillaumeGomez:improve-urls, r=Nemo157
jonas-schievink Jan 27, 2021
c80ad24
Rollup merge of #81426 - BoxyUwU:boxychangesv2, r=oli-obk
jonas-schievink Jan 27, 2021
6743a3d
Rollup merge of #81428 - phansch:compiletest-tests, r=Mark-Simulacrum
jonas-schievink Jan 27, 2021
b33b5f4
Rollup merge of #81430 - lcnr:elaborate-const-eval, r=oli-obk
jonas-schievink Jan 27, 2021
1a8eca8
Rollup merge of #81433 - lcnr:stop-looking-into-ty-alias, r=oli-obk
jonas-schievink Jan 27, 2021
69a946a
Rollup merge of #81445 - ehuss:update-cargo, r=ehuss
jonas-schievink Jan 27, 2021
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: 4 additions & 2 deletions compiler/rustc_expand/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,15 +929,17 @@ pub struct ExtCtxt<'a> {
pub force_mode: bool,
pub expansions: FxHashMap<Span, Vec<String>>,
/// Called directly after having parsed an external `mod foo;` in expansion.
pub(super) extern_mod_loaded: Option<&'a dyn Fn(&ast::Crate)>,
///
/// `Ident` is the module name.
pub(super) extern_mod_loaded: Option<&'a dyn Fn(&ast::Crate, Ident)>,
}

impl<'a> ExtCtxt<'a> {
pub fn new(
sess: &'a Session,
ecfg: expand::ExpansionConfig<'a>,
resolver: &'a mut dyn ResolverExpand,
extern_mod_loaded: Option<&'a dyn Fn(&ast::Crate)>,
extern_mod_loaded: Option<&'a dyn Fn(&ast::Crate, Ident)>,
) -> ExtCtxt<'a> {
ExtCtxt {
sess,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
proc_macros: vec![],
};
if let Some(extern_mod_loaded) = self.cx.extern_mod_loaded {
extern_mod_loaded(&krate);
extern_mod_loaded(&krate, ident);
}

*old_mod = krate.module;
Expand Down
17 changes: 12 additions & 5 deletions compiler/rustc_interface/src/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use rustc_session::lint;
use rustc_session::output::{filename_for_input, filename_for_metadata};
use rustc_session::search_paths::PathKind;
use rustc_session::Session;
use rustc_span::symbol::Symbol;
use rustc_span::symbol::{Ident, Symbol};
use rustc_span::{FileName, RealFileName};
use rustc_trait_selection::traits;
use rustc_typeck as typeck;
Expand Down Expand Up @@ -211,8 +211,13 @@ pub fn register_plugins<'a>(
Ok((krate, lint_store))
}

fn pre_expansion_lint(sess: &Session, lint_store: &LintStore, krate: &ast::Crate) {
sess.time("pre_AST_expansion_lint_checks", || {
fn pre_expansion_lint(
sess: &Session,
lint_store: &LintStore,
krate: &ast::Crate,
crate_name: &str,
) {
sess.prof.generic_activity_with_arg("pre_AST_expansion_lint_checks", crate_name).run(|| {
rustc_lint::check_ast_crate(
sess,
lint_store,
Expand All @@ -233,7 +238,7 @@ fn configure_and_expand_inner<'a>(
metadata_loader: &'a MetadataLoaderDyn,
) -> Result<(ast::Crate, Resolver<'a>)> {
tracing::trace!("configure_and_expand_inner");
pre_expansion_lint(sess, lint_store, &krate);
pre_expansion_lint(sess, lint_store, &krate, crate_name);

let mut resolver = Resolver::new(sess, &krate, crate_name, metadata_loader, &resolver_arenas);
rustc_builtin_macros::register_builtin_macros(&mut resolver);
Expand Down Expand Up @@ -295,7 +300,9 @@ fn configure_and_expand_inner<'a>(
..rustc_expand::expand::ExpansionConfig::default(crate_name.to_string())
};

let extern_mod_loaded = |k: &ast::Crate| pre_expansion_lint(sess, lint_store, k);
let extern_mod_loaded = |k: &ast::Crate, ident: Ident| {
pre_expansion_lint(sess, lint_store, k, &*ident.name.as_str())
};
let mut ecx = ExtCtxt::new(&sess, cfg, &mut resolver, Some(&extern_mod_loaded));

// Expand macros now!
Expand Down
16 changes: 10 additions & 6 deletions src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,16 @@ crate fn get_auto_trait_and_blanket_impls(
ty: Ty<'tcx>,
param_env_def_id: DefId,
) -> impl Iterator<Item = Item> {
let auto_impls = cx.sess().time("get_auto_trait_impls", || {
AutoTraitFinder::new(cx).get_auto_trait_impls(ty, param_env_def_id)
});
let blanket_impls = cx.sess().time("get_blanket_impls", || {
BlanketImplFinder::new(cx).get_blanket_impls(ty, param_env_def_id)
});
let auto_impls = cx
.sess()
.prof
.generic_activity("get_auto_trait_impls")
.run(|| AutoTraitFinder::new(cx).get_auto_trait_impls(ty, param_env_def_id));
let blanket_impls = cx
.sess()
.prof
.generic_activity("get_blanket_impls")
.run(|| BlanketImplFinder::new(cx).get_blanket_impls(ty, param_env_def_id));
auto_impls.into_iter().chain(blanket_impls)
}

Expand Down
18 changes: 8 additions & 10 deletions src/librustdoc/passes/collect_trait_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ crate fn collect_trait_impls(krate: Crate, cx: &DocContext<'_>) -> Crate {

for &cnum in cx.tcx.crates().iter() {
for &(did, _) in cx.tcx.all_trait_implementations(cnum).iter() {
cx.tcx.sess.time("build_extern_trait_impl", || {
cx.tcx.sess.prof.generic_activity("build_extern_trait_impl").run(|| {
inline::build_impl(cx, None, did, None, &mut new_items);
});
}
Expand All @@ -39,7 +39,7 @@ crate fn collect_trait_impls(krate: Crate, cx: &DocContext<'_>) -> Crate {
// Also try to inline primitive impls from other crates.
for &def_id in PrimitiveType::all_impls(cx.tcx).values().flatten() {
if !def_id.is_local() {
cx.sess().time("build_primitive_trait_impl", || {
cx.tcx.sess.prof.generic_activity("build_primitive_trait_impls").run(|| {
inline::build_impl(cx, None, def_id, None, &mut new_items);

// FIXME(eddyb) is this `doc(hidden)` check needed?
Expand All @@ -59,7 +59,7 @@ crate fn collect_trait_impls(krate: Crate, cx: &DocContext<'_>) -> Crate {
for &trait_did in cx.tcx.all_traits(LOCAL_CRATE).iter() {
for &impl_node in cx.tcx.hir().trait_impls(trait_did) {
let impl_did = cx.tcx.hir().local_def_id(impl_node);
cx.tcx.sess.time("build_local_trait_impl", || {
cx.tcx.sess.prof.generic_activity("build_local_trait_impl").run(|| {
let mut extra_attrs = Vec::new();
let mut parent = cx.tcx.parent(impl_did.to_def_id());
while let Some(did) = parent {
Expand Down Expand Up @@ -177,13 +177,11 @@ impl<'a, 'tcx> DocFolder for SyntheticImplCollector<'a, 'tcx> {
if i.is_struct() || i.is_enum() || i.is_union() {
// FIXME(eddyb) is this `doc(hidden)` check needed?
if !self.cx.tcx.get_attrs(i.def_id).lists(sym::doc).has_word(sym::hidden) {
self.cx.sess().time("get_auto_trait_and_blanket_synthetic_impls", || {
self.impls.extend(get_auto_trait_and_blanket_impls(
self.cx,
self.cx.tcx.type_of(i.def_id),
i.def_id,
));
});
self.impls.extend(get_auto_trait_and_blanket_impls(
self.cx,
self.cx.tcx.type_of(i.def_id),
i.def_id,
));
}
}

Expand Down