We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cc8087 commit 8f184b3Copy full SHA for 8f184b3
src/librustc_mir/transform/qualify_consts.rs
@@ -1714,20 +1714,16 @@ impl<'tcx> MirPass<'tcx> for QualifyAndPromoteConstants<'tcx> {
1714
},
1715
target,
1716
..
1717
- } => {
1718
- if promoted_temps.contains(index) {
1719
- terminator.kind = TerminatorKind::Goto {
1720
- target,
1721
- };
1722
- }
+ } if promoted_temps.contains(index) => {
+ terminator.kind = TerminatorKind::Goto { target };
1723
}
1724
_ => {}
1725
1726
1727
1728
1729
// Statics must be Sync.
1730
- if mode == Mode::Static {
+ if let Mode::Static = mode {
1731
// `#[thread_local]` statics don't have to be `Sync`.
1732
for attr in &tcx.get_attrs(def_id)[..] {
1733
if attr.check_name(sym::thread_local) {
0 commit comments