Skip to content
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

Rollup of 13 pull requests #89530

Merged
merged 30 commits into from
Oct 4, 2021
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dec7fc3
Fix an ICE caused by type mismatch errors being ignored
theo-lw Aug 29, 2021
2ab73cf
add benchmark for From<[T; N]> in VecDeque
xu-cheng Aug 29, 2021
c3cff0a
VecDeque: improve performance for From<[T; N]>
xu-cheng Aug 29, 2021
09d55d5
Remove special checks to is_assign_to_bool
theo-lw Sep 17, 2021
35b0015
Improve wording of `map_or_else` docs
Nitepone Sep 30, 2021
7ed75ce
Recommend running `cargo clean` in E0514 output
pierwill Sep 30, 2021
2c6e671
implement advance_(back_)_by on more iterators
the8472 Jul 12, 2021
6654a0b
from review: code style
the8472 Jul 13, 2021
ffd7ade
fix issues pointed out in review
the8472 Jul 13, 2021
0f9f241
[aarch64] add target feature outline-atomics
Apr 5, 2021
d6fde80
Include the length in BTree hashes
cuviper Oct 1, 2021
d92c683
Improve error message for missing angle brackets in `[_]::method`
FabianWolff Oct 1, 2021
277a018
rustdoc: use slice::contains instead of open-coding it
notriddle Oct 1, 2021
058a21d
Consistently use 'supertrait'.
waywardmonkeys Oct 2, 2021
3818981
Practice diagnostic message convention
hkmatsumoto Oct 3, 2021
a28a78f
Fix ICE with buffered lint referring to AST node deleted by everybody…
FabianWolff Oct 3, 2021
bce8621
Stabilize `const_panic`
jhpratt Oct 4, 2021
4e9cf04
Rollup merge of #83655 - sebpop:arm64-outline-atomics, r=workingjubilee
workingjubilee Oct 4, 2021
ca8a108
Rollup merge of #87091 - the8472:more-advance-by-impls, r=joshtriplett
workingjubilee Oct 4, 2021
a2c6075
Rollup merge of #88451 - theo-lw:issue-87771, r=jackh726
workingjubilee Oct 4, 2021
19d9a14
Rollup merge of #88452 - xu-cheng:vecdeque-from-array, r=m-ou-se
workingjubilee Oct 4, 2021
9e387cf
Rollup merge of #89400 - Nitepone:nitepone/map-or-else-docfix, r=dtolnay
workingjubilee Oct 4, 2021
9381d7a
Rollup merge of #89407 - pierwill:recommend-clean-E0514, r=davidtwco
workingjubilee Oct 4, 2021
e1478d6
Rollup merge of #89443 - cuviper:btree-hash-len, r=dtolnay
workingjubilee Oct 4, 2021
b115a16
Rollup merge of #89444 - notriddle:notriddle/contains-str, r=jyn514
workingjubilee Oct 4, 2021
08dd414
Rollup merge of #89447 - FabianWolff:issue-89388, r=davidtwco
workingjubilee Oct 4, 2021
2bc89ce
Rollup merge of #89453 - waywardmonkeys:consistent-supertrait-usage, …
workingjubilee Oct 4, 2021
5352e17
Rollup merge of #89483 - hkmatsumoto:patch-diagnostics-2, r=estebank
workingjubilee Oct 4, 2021
3d4467d
Rollup merge of #89500 - FabianWolff:issue-87308, r=petrochenkov
workingjubilee Oct 4, 2021
9866b09
Rollup merge of #89508 - jhpratt:stabilize-const_panic, r=joshtriplett
workingjubilee Oct 4, 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
Fix ICE with buffered lint referring to AST node deleted by everybody…
…_loops
FabianWolff committed Oct 3, 2021
commit a28a78f247a0f02521e97eabf98e790085a4a753
18 changes: 12 additions & 6 deletions compiler/rustc_interface/src/passes.rs
Original file line number Diff line number Diff line change
@@ -437,12 +437,18 @@ pub fn configure_and_expand(
});

// Add all buffered lints from the `ParseSess` to the `Session`.
sess.parse_sess.buffered_lints.with_lock(|buffered_lints| {
info!("{} parse sess buffered_lints", buffered_lints.len());
for early_lint in buffered_lints.drain(..) {
resolver.lint_buffer().add_early_lint(early_lint);
}
});
// The ReplaceBodyWithLoop pass may have deleted some AST nodes, potentially
// causing a delay_span_bug later if a buffered lint refers to such a deleted
// AST node (issue #87308). Since everybody_loops is for pretty-printing only,
// anyway, we simply skip all buffered lints here.
if !matches!(sess.opts.pretty, Some(PpMode::Source(PpSourceMode::EveryBodyLoops))) {
sess.parse_sess.buffered_lints.with_lock(|buffered_lints| {
info!("{} parse sess buffered_lints", buffered_lints.len());
for early_lint in buffered_lints.drain(..) {
resolver.lint_buffer().add_early_lint(early_lint);
}
});
}

Ok(krate)
}
12 changes: 12 additions & 0 deletions src/test/ui/lint/issue-87308.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Regression test for issue #87308.

// compile-flags: -Zunpretty=everybody_loops
// check-pass

macro_rules! foo {
() => { break 'x; }
}

pub fn main() {
'x: loop { foo!() }
}
14 changes: 14 additions & 0 deletions src/test/ui/lint/issue-87308.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
// Regression test for issue #87308.

// compile-flags: -Zunpretty=everybody_loops
// check-pass

macro_rules! foo { () => { break 'x ; } }

pub fn main() { loop { } }