Skip to content

Rollup of 19 pull requests #82153

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

Merged
merged 45 commits into from
Feb 16, 2021
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c2e849c
added a suggestion to create a `const` item if the `fn` in the array …
henryboisdequin Jan 29, 2021
bfd1ccf
Seal the CommandExt, OsStrExt and OsStringExt traits
Amanieu Feb 10, 2021
5fe8490
Add match pattern diagnostics regression test
vandenheuvel Feb 8, 2021
dd9db23
Fix typos in BTreeSet::{first, last} docs
taiki-e Feb 13, 2021
d6dcb3d
CTFE validation: catch ReadPointerAsBytes and better error
RalfJung Feb 13, 2021
a3e0795
Heat up the ICE-y error reporting
BoxyUwU Feb 13, 2021
ee9709f
Fixed minor typo in catch_unwind docs
Feb 13, 2021
68405fd
debug!("paramenv={}paramenv={}paramenv={}paramenv={}")
BoxyUwU Feb 13, 2021
b6144e7
yeet ya fixme into the void
BoxyUwU Feb 13, 2021
a419e11
a wild test has appeared uwu
BoxyUwU Feb 13, 2021
1c3841e
Edit `rustc_arena::DropArena` docs
pierwill Feb 13, 2021
64fe2c1
update message
henryboisdequin Feb 14, 2021
7bd7126
param_env debugs are instrumental to rustc's success
BoxyUwU Feb 14, 2021
ba72bc9
fix typo
TaKO8Ki Feb 14, 2021
c583860
Remove unnecessary `Option` in `default_doc`
jyn514 Feb 14, 2021
0038eae
rustc_span: Remove obsolete `allow_internal_unstable_backcompat_hack`
petrochenkov Feb 14, 2021
18c94b3
expand: Remove obsolete `ExpansionConfig::keep_macs`
petrochenkov Feb 14, 2021
6e11a8b
expand: Remove redundant calls to configure
petrochenkov Feb 14, 2021
dee5424
Add missing env!-decl variant
lukaslueg Feb 14, 2021
1aa9651
Fix typo in link to CreateSymbolicLinkW documentation.
m-ou-se Feb 14, 2021
3d7fcff
Update library/core/src/macros/mod.rs
lukaslueg Feb 14, 2021
4613b37
Stabilize Arguments::as_str
sfackler Feb 14, 2021
63806cc
Remove redundant bool_to_option feature gate
est31 Feb 15, 2021
ec77574
Update link for extern prelude.
ehuss Feb 15, 2021
fd21eb1
32-bit ARM: Emit `lr` instead of `r14` when specified as an `asm!` ou…
Feb 15, 2021
6931027
:arrow_up: rust-analyzer
lnicola Feb 15, 2021
f02f7b0
Rollup merge of #81503 - henryboisdequin:fix-const-fn-arr-err-msg, r=…
jonas-schievink Feb 15, 2021
cd27820
Rollup merge of #81897 - vandenheuvel:match_exhaustive_diagnostics_re…
jonas-schievink Feb 15, 2021
bd0e8a5
Rollup merge of #81975 - Amanieu:seal2, r=m-ou-se
jonas-schievink Feb 15, 2021
6fde3c5
Rollup merge of #82009 - BoxyUwU:idontknooow, r=varkor
jonas-schievink Feb 15, 2021
c7ebc59
Rollup merge of #82060 - taiki-e:typo, r=m-ou-se
jonas-schievink Feb 15, 2021
5e8435a
Rollup merge of #82061 - RalfJung:ctfe-read-pointer-as-bytes, r=oli-obk
jonas-schievink Feb 15, 2021
7842b5d
Rollup merge of #82063 - NULLx76:fix-minor-typo, r=jonas-schievink
jonas-schievink Feb 15, 2021
665bf9e
Rollup merge of #82067 - BoxyUwU:hahaicantthinkofabadpun, r=oli-obk
jonas-schievink Feb 15, 2021
493c6c9
Rollup merge of #82077 - pierwill:edit-droparena, r=lcnr
jonas-schievink Feb 15, 2021
db5ae6a
Rollup merge of #82096 - TaKO8Ki:fix-typo, r=GuillaumeGomez
jonas-schievink Feb 15, 2021
40d85a5
Rollup merge of #82106 - jyn514:cleanup-bootstrap, r=Mark-Simulacrum
jonas-schievink Feb 15, 2021
285ea2f
Rollup merge of #82107 - petrochenkov:minexpclean, r=Aaron1011
jonas-schievink Feb 15, 2021
b0bd056
Rollup merge of #82118 - lukaslueg:env_decl, r=m-ou-se
jonas-schievink Feb 15, 2021
2030a54
Rollup merge of #82119 - m-ou-se:typo, r=dtolnay
jonas-schievink Feb 15, 2021
c87ef21
Rollup merge of #82120 - sfackler:arguments-as-str, r=dtolnay
jonas-schievink Feb 15, 2021
1c75dfb
Rollup merge of #82129 - est31:master, r=jyn514
jonas-schievink Feb 15, 2021
1ee4a7b
Rollup merge of #82133 - ehuss:extern-prelude-link, r=jyn514
jonas-schievink Feb 15, 2021
1a2675f
Rollup merge of #82141 - jrvanwhy:issue-82052, r=sanxiyn
jonas-schievink Feb 15, 2021
a105280
Rollup merge of #82147 - lnicola:rust-analyzer-2021-02-15, r=jonas-sc…
jonas-schievink Feb 15, 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
Prev Previous commit
Next Next commit
expand: Remove redundant calls to configure
Starting from #63468 cfg attributes on variants, fields, fn params etc. are processed together with other attributes (via `configure!`).
  • Loading branch information
petrochenkov committed Feb 14, 2021
commit 6e11a8b66a5e390f94e6d96b652e25e31fafc0c0
24 changes: 3 additions & 21 deletions compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,6 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
fn visit_expr(&mut self, expr: &mut P<ast::Expr>) {
self.cfg.configure_expr(expr);
visit_clobber(expr.deref_mut(), |mut expr| {
self.cfg.configure_expr_kind(&mut expr.kind);

if let Some(attr) = self.take_first_attr(&mut expr) {
// Collect the invoc regardless of whether or not attributes are permitted here
// expansion will eat the attribute so it won't error later.
Expand Down Expand Up @@ -1166,8 +1164,6 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
fn filter_map_expr(&mut self, expr: P<ast::Expr>) -> Option<P<ast::Expr>> {
let expr = configure!(self, expr);
expr.filter_map(|mut expr| {
self.cfg.configure_expr_kind(&mut expr.kind);

if let Some(attr) = self.take_first_attr(&mut expr) {
self.cfg.maybe_emit_expr_attr_err(&attr.0);

Expand All @@ -1192,7 +1188,6 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
}

fn visit_pat(&mut self, pat: &mut P<ast::Pat>) {
self.cfg.configure_pat(pat);
match pat.kind {
PatKind::MacCall(_) => {}
_ => return noop_visit_pat(pat, self),
Expand Down Expand Up @@ -1406,15 +1401,12 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
});
}

fn visit_foreign_mod(&mut self, foreign_mod: &mut ast::ForeignMod) {
self.cfg.configure_foreign_mod(foreign_mod);
noop_visit_foreign_mod(foreign_mod, self);
}

fn flat_map_foreign_item(
&mut self,
mut foreign_item: P<ast::ForeignItem>,
foreign_item: P<ast::ForeignItem>,
) -> SmallVec<[P<ast::ForeignItem>; 1]> {
let mut foreign_item = configure!(self, foreign_item);

if let Some(attr) = self.take_first_attr(&mut foreign_item) {
return self
.collect_attr(
Expand All @@ -1439,11 +1431,6 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
}
}

fn visit_item_kind(&mut self, item: &mut ast::ItemKind) {
self.cfg.configure_item_kind(item);
noop_visit_item_kind(item, self);
}

fn flat_map_generic_param(
&mut self,
param: ast::GenericParam,
Expand Down Expand Up @@ -1602,11 +1589,6 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
*id = self.cx.resolver.next_node_id()
}
}

fn visit_fn_decl(&mut self, mut fn_decl: &mut P<ast::FnDecl>) {
self.cfg.configure_fn_decl(&mut fn_decl);
noop_visit_fn_decl(fn_decl, self);
}
}

pub struct ExpansionConfig<'feat> {
Expand Down