Skip to content

Rollup of 8 pull requests #119557

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 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
af44e71
Switch from using `//~ERROR` annotations with `--error-format` to `er…
Rajveer100 Dec 21, 2023
0f9baa8
custom mir: make it clear what the return block is
RalfJung Dec 26, 2023
4bf2794
custom mir: better type-checking
RalfJung Dec 26, 2023
7e3f5f8
Use Result::flatten in catch_with_exit_code
DaniPopes Dec 28, 2023
786e0bb
bootstrap: Move -Clto= setting from Rustc::run to rustc_cargo
xry111 Dec 29, 2023
5a08ba6
No need to record movability in deferred_coroutine_interiors
compiler-errors Dec 29, 2023
71dacdf
Don't create interior type variable in check_closure
compiler-errors Dec 29, 2023
7eeaaa2
Compute yield and return types outside of check_fn
compiler-errors Dec 29, 2023
c21cfe8
don't reexport atomic::ordering via rustc_data_structures, use std im…
klensy Jan 2, 2024
695a02e
Don't synthesize host effect args inside trait object types
fmease Jan 3, 2024
4e0badd
Recover parentheses in range patterns
ShE3py Jan 3, 2024
7aaa1eb
Rollup merge of #119184 - Rajveer100:branch-for-issue-118752, r=david…
matthiaskrgr Jan 3, 2024
2d62db7
Rollup merge of #119325 - RalfJung:custom-mir, r=compiler-errors
matthiaskrgr Jan 3, 2024
5903e6a
Rollup merge of #119391 - DaniPopes:catch-flatten, r=davidtwco
matthiaskrgr Jan 3, 2024
39b4731
Rollup merge of #119397 - ShE3py:pat-range-paren-recovery, r=fmease
matthiaskrgr Jan 3, 2024
048081c
Rollup merge of #119414 - xry111:xry111/lto-test, r=Mark-Simulacrum
matthiaskrgr Jan 3, 2024
83a3441
Rollup merge of #119417 - compiler-errors:closure-checking, r=davidtwco
matthiaskrgr Jan 3, 2024
82ec223
Rollup merge of #119527 - klensy:ordering, r=compiler-errors
matthiaskrgr Jan 3, 2024
c5e375c
Rollup merge of #119540 - fmease:no-effect-args-inside-dyn-trait, r=c…
matthiaskrgr Jan 3, 2024
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: 1 addition & 5 deletions compiler/rustc_data_structures/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ mod parallel;
pub use parallel::scope;
pub use parallel::{join, par_for_each_in, par_map, parallel_guard, try_par_for_each_in};

pub use std::sync::atomic::Ordering;
pub use std::sync::atomic::Ordering::SeqCst;

pub use vec::{AppendOnlyIndexVec, AppendOnlyVec};

mod vec;
Expand All @@ -67,8 +64,7 @@ mod freeze;
pub use freeze::{FreezeLock, FreezeReadGuard, FreezeWriteGuard};

mod mode {
use super::Ordering;
use std::sync::atomic::AtomicU8;
use std::sync::atomic::{AtomicU8, Ordering};

const UNINITIALIZED: u8 = 0;
const DYN_NOT_THREAD_SAFE: u8 = 1;
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use rustc_codegen_ssa::{traits::CodegenBackend, CodegenErrors, CodegenResults};
use rustc_data_structures::profiling::{
get_resident_set_size, print_time_passes_entry, TimePassesFormat,
};
use rustc_data_structures::sync::SeqCst;
use rustc_errors::registry::{InvalidErrorCode, Registry};
use rustc_errors::{markdown, ColorConfig};
use rustc_errors::{DiagCtxt, ErrorGuaranteed, PResult};
Expand Down Expand Up @@ -476,7 +475,7 @@ fn run_compiler(
eprintln!(
"Fuel used by {}: {}",
sess.opts.unstable_opts.print_fuel.as_ref().unwrap(),
sess.print_fuel.load(SeqCst)
sess.print_fuel.load(Ordering::SeqCst)
);
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_query_impl/src/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl QueryContext for QueryCtxt<'_> {
fn next_job_id(self) -> QueryJobId {
QueryJobId(
NonZeroU64::new(
self.query_system.jobs.fetch_add(1, rustc_data_structures::sync::Ordering::Relaxed),
self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed),
)
.unwrap(),
)
Expand Down
14 changes: 7 additions & 7 deletions compiler/rustc_query_system/src/dep_graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rustc_data_structures::profiling::{EventId, QueryInvocationId, SelfProfilerR
use rustc_data_structures::sharded::{self, Sharded};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::steal::Steal;
use rustc_data_structures::sync::{AtomicU32, AtomicU64, Lock, Lrc, Ordering};
use rustc_data_structures::sync::{AtomicU32, AtomicU64, Lock, Lrc};
use rustc_data_structures::unord::UnordMap;
use rustc_index::IndexVec;
use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
Expand All @@ -13,7 +13,7 @@ use std::collections::hash_map::Entry;
use std::fmt::Debug;
use std::hash::Hash;
use std::marker::PhantomData;
use std::sync::atomic::Ordering::Relaxed;
use std::sync::atomic::Ordering;

use super::query::DepGraphQuery;
use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex};
Expand Down Expand Up @@ -476,7 +476,7 @@ impl<D: Deps> DepGraph<D> {
let task_deps = &mut *task_deps;

if cfg!(debug_assertions) {
data.current.total_read_count.fetch_add(1, Relaxed);
data.current.total_read_count.fetch_add(1, Ordering::Relaxed);
}

// As long as we only have a low number of reads we can avoid doing a hash
Expand Down Expand Up @@ -506,7 +506,7 @@ impl<D: Deps> DepGraph<D> {
}
}
} else if cfg!(debug_assertions) {
data.current.total_duplicate_read_count.fetch_add(1, Relaxed);
data.current.total_duplicate_read_count.fetch_add(1, Ordering::Relaxed);
}
})
}
Expand Down Expand Up @@ -976,8 +976,8 @@ impl<D: Deps> DepGraph<D> {
pub fn print_incremental_info(&self) {
if let Some(data) = &self.data {
data.current.encoder.borrow().print_incremental_info(
data.current.total_read_count.load(Relaxed),
data.current.total_duplicate_read_count.load(Relaxed),
data.current.total_read_count.load(Ordering::Relaxed),
data.current.total_duplicate_read_count.load(Ordering::Relaxed),
)
}
}
Expand All @@ -992,7 +992,7 @@ impl<D: Deps> DepGraph<D> {

pub(crate) fn next_virtual_depnode_index(&self) -> DepNodeIndex {
debug_assert!(self.data.is_none());
let index = self.virtual_dep_node_index.fetch_add(1, Relaxed);
let index = self.virtual_dep_node_index.fetch_add(1, Ordering::Relaxed);
DepNodeIndex::from_u32(index)
}
}
Expand Down
6 changes: 2 additions & 4 deletions compiler/rustc_session/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ use rustc_data_structures::flock;
use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
use rustc_data_structures::jobserver::{self, Client};
use rustc_data_structures::profiling::{SelfProfiler, SelfProfilerRef};
use rustc_data_structures::sync::{
AtomicU64, DynSend, DynSync, Lock, Lrc, OneThread, Ordering::SeqCst,
};
use rustc_data_structures::sync::{AtomicU64, DynSend, DynSync, Lock, Lrc, OneThread};
use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitterWriter;
use rustc_errors::emitter::{DynEmitter, EmitterWriter, HumanReadableErrorType};
use rustc_errors::json::JsonEmitter;
Expand Down Expand Up @@ -44,7 +42,7 @@ use std::fmt;
use std::ops::{Div, Mul};
use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::sync::{atomic::AtomicBool, Arc};
use std::sync::{atomic::AtomicBool, atomic::Ordering::SeqCst, Arc};

struct OptimizationFuel {
/// If `-zfuel=crate=n` is specified, initially set to `n`, otherwise `0`.
Expand Down