Skip to content

Commit eaf5ee6

Browse files
committed
fix test errors
1 parent 3ad4a0e commit eaf5ee6

File tree

8 files changed

+77
-8
lines changed

8 files changed

+77
-8
lines changed

compiler/rustc_const_eval/src/interpret/memory.rs

+25
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,21 @@ pub struct AllocRef<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes = Box<[
121121
tcx: TyCtxt<'tcx>,
122122
alloc_id: AllocId,
123123
}
124+
125+
// FIXME: More information in <https://github.com/rust-lang/rust/pull/106930>.
126+
unsafe impl<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes> Send
127+
for AllocRef<'a, 'tcx, Prov, Extra, Bytes>
128+
where
129+
Allocation<Prov, Extra, Bytes>: Sync,
130+
{
131+
}
132+
unsafe impl<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes> Sync
133+
for AllocRef<'a, 'tcx, Prov, Extra, Bytes>
134+
where
135+
Allocation<Prov, Extra, Bytes>: Sync,
136+
{
137+
}
138+
124139
/// A reference to some allocation that was already bounds-checked for the given region
125140
/// and had the on-access machine hooks run.
126141
pub struct AllocRefMut<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes = Box<[u8]>> {
@@ -130,6 +145,16 @@ pub struct AllocRefMut<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes = Bo
130145
alloc_id: AllocId,
131146
}
132147

148+
// FIXME: More information in <https://github.com/rust-lang/rust/pull/106930>.
149+
impl<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes> !Send
150+
for AllocRefMut<'a, 'tcx, Prov, Extra, Bytes>
151+
{
152+
}
153+
impl<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes> !Sync
154+
for AllocRefMut<'a, 'tcx, Prov, Extra, Bytes>
155+
{
156+
}
157+
133158
impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
134159
pub fn new() -> Self {
135160
Memory {

compiler/rustc_const_eval/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Rust MIR: a lowered representation of Rust.
2020
#![feature(try_blocks)]
2121
#![feature(yeet_expr)]
2222
#![feature(if_let_guard)]
23+
#![feature(negative_impls)]
2324
#![recursion_limit = "256"]
2425

2526
#[macro_use]

compiler/rustc_log/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ pub fn init_env_logger(env: &str) -> Result<(), Error> {
8282
.with_verbose_exit(verbose_entry_exit)
8383
.with_verbose_entry(verbose_entry_exit)
8484
.with_indent_amount(2);
85-
#[cfg(all(parallel_compiler, debug_assertions))]
86-
let layer = layer.with_thread_ids(true).with_thread_names(true);
8785

8886
let subscriber = tracing_subscriber::Registry::default().with(filter).with(layer);
8987
match env::var(format!("{env}_BACKTRACE")) {

compiler/rustc_middle/src/ty/fold.rs

+16
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@ where
2121
pub ct_op: H,
2222
}
2323

24+
// FIXME: More information in <https://github.com/rust-lang/rust/pull/106930>.
25+
impl<'tcx, F, G, H> !Send for BottomUpFolder<'tcx, F, G, H>
26+
where
27+
F: FnMut(Ty<'tcx>) -> Ty<'tcx>,
28+
G: FnMut(ty::Region<'tcx>) -> ty::Region<'tcx>,
29+
H: FnMut(ty::Const<'tcx>) -> ty::Const<'tcx>,
30+
{
31+
}
32+
impl<'tcx, F, G, H> !Sync for BottomUpFolder<'tcx, F, G, H>
33+
where
34+
F: FnMut(Ty<'tcx>) -> Ty<'tcx>,
35+
G: FnMut(ty::Region<'tcx>) -> ty::Region<'tcx>,
36+
H: FnMut(ty::Const<'tcx>) -> ty::Const<'tcx>,
37+
{
38+
}
39+
2440
impl<'tcx, F, G, H> TypeFolder<TyCtxt<'tcx>> for BottomUpFolder<'tcx, F, G, H>
2541
where
2642
F: FnMut(Ty<'tcx>) -> Ty<'tcx>,

src/librustdoc/clean/utils.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,7 @@ pub(crate) fn get_auto_trait_and_blanket_impls(
470470
cx: &mut DocContext<'_>,
471471
item_def_id: DefId,
472472
) -> impl Iterator<Item = Item> {
473-
// FIXME: To be removed once `parallel_compiler` bugs are fixed!
474-
// More information in <https://github.com/rust-lang/rust/pull/106930>.
475-
if cfg!(parallel_compiler) {
476-
return vec![].into_iter().chain(vec![].into_iter());
477-
}
473+
// FIXME: More information in <https://github.com/rust-lang/rust/pull/106930>.
478474

479475
let auto_impls = cx
480476
.sess()

src/tools/clippy/clippy_utils/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![feature(box_patterns)]
33
#![feature(let_chains)]
44
#![feature(lint_reasons)]
5+
#![feature(negative_impls)]
56
#![feature(never_type)]
67
#![feature(rustc_private)]
78
#![recursion_limit = "512"]

src/tools/clippy/clippy_utils/src/visitors.rs

+12
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ pub fn for_each_expr_with_closures<'tcx, B, C: Continue>(
113113
f: F,
114114
res: Option<B>,
115115
}
116+
// FIXME: more details in #106930
117+
impl<'tcx, B, F> !Send for V<'tcx, B, F> {}
118+
impl<'tcx, B, F> !Sync for V<'tcx, B, F> {}
119+
116120
impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow<B, C>> Visitor<'tcx> for V<'tcx, B, F> {
117121
type NestedFilter = nested_filter::OnlyBodies;
118122
fn nested_visit_map(&mut self) -> Self::Map {
@@ -513,6 +517,10 @@ pub fn for_each_local_use_after_expr<'tcx, B>(
513517
res: ControlFlow<B>,
514518
f: F,
515519
}
520+
// FIXME: more details in #106930
521+
impl<'cx, 'tcx, B, F> !Send for V<'cx, 'tcx, B, F> {}
522+
impl<'cx, 'tcx, B, F> !Sync for V<'cx, 'tcx, B, F> {}
523+
516524
impl<'cx, 'tcx, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow<B>, B> Visitor<'tcx> for V<'cx, 'tcx, F, B> {
517525
type NestedFilter = nested_filter::OnlyBodies;
518526
fn nested_visit_map(&mut self) -> Self::Map {
@@ -694,6 +702,10 @@ pub fn for_each_local_assignment<'tcx, B>(
694702
res: ControlFlow<B>,
695703
f: F,
696704
}
705+
// FIXME: more details in #106930
706+
impl<'cx, 'tcx, F, B> !Send for V<'cx, 'tcx, F, B> {}
707+
impl<'cx, 'tcx, F, B> !Sync for V<'cx, 'tcx, F, B> {}
708+
697709
impl<'cx, 'tcx, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow<B>, B> Visitor<'tcx> for V<'cx, 'tcx, F, B> {
698710
type NestedFilter = nested_filter::OnlyBodies;
699711
fn nested_visit_map(&mut self) -> Self::Map {

tests/ui-fulldeps/missing-rustc-driver-error.stderr

+21-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,25 @@ error: crate `cfg_if` required to be available in rlib format, but was not found
2020

2121
error: crate `libc` required to be available in rlib format, but was not found in this form
2222

23-
error: aborting due to 10 previous errors
23+
error: crate `rayon` required to be available in rlib format, but was not found in this form
24+
25+
error: crate `either` required to be available in rlib format, but was not found in this form
26+
27+
error: crate `rayon_core` required to be available in rlib format, but was not found in this form
28+
29+
error: crate `crossbeam_channel` required to be available in rlib format, but was not found in this form
30+
31+
error: crate `crossbeam_utils` required to be available in rlib format, but was not found in this form
32+
33+
error: crate `crossbeam_deque` required to be available in rlib format, but was not found in this form
34+
35+
error: crate `crossbeam_epoch` required to be available in rlib format, but was not found in this form
36+
37+
error: crate `scopeguard` required to be available in rlib format, but was not found in this form
38+
39+
error: crate `memoffset` required to be available in rlib format, but was not found in this form
40+
41+
error: crate `num_cpus` required to be available in rlib format, but was not found in this form
42+
43+
error: aborting due to 20 previous errors
2444

0 commit comments

Comments
 (0)