Skip to content

Commit c4ec606

Browse files
committed
Auto merge of #85734 - Dylan-DPC:rollup-q6iiees, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - #84221 (E0599 suggestions and elision of generic argument if no canditate is found) - #84701 (stabilize member constraints) - #85564 ( readd capture disjoint fields gate) - #85583 (Get rid of PreviousDepGraph.) - #85649 (Update cc) - #85689 (Remove Iterator #[rustc_on_unimplemented]s that no longer apply.) - #85719 (Add inline attr to CString::into_inner so it can optimize out NonNull checks) - #85725 (Remove unneeded workaround) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 86ac0b4 + 85a408a commit c4ec606

File tree

55 files changed

+447
-388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+447
-388
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ version = "0.1.0"
441441

442442
[[package]]
443443
name = "cc"
444-
version = "1.0.67"
444+
version = "1.0.68"
445445
source = "registry+https://github.com/rust-lang/crates.io-index"
446-
checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
446+
checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787"
447447
dependencies = [
448448
"jobserver",
449449
]

compiler/rustc_codegen_ssa/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test = false
99

1010
[dependencies]
1111
bitflags = "1.2.1"
12-
cc = "1.0.67"
12+
cc = "1.0.68"
1313
itertools = "0.9"
1414
tracing = "0.1"
1515
libc = "0.2.50"
@@ -24,7 +24,7 @@ rustc_middle = { path = "../rustc_middle" }
2424
rustc_apfloat = { path = "../rustc_apfloat" }
2525
rustc_attr = { path = "../rustc_attr" }
2626
rustc_symbol_mangling = { path = "../rustc_symbol_mangling" }
27-
rustc_data_structures = { path = "../rustc_data_structures"}
27+
rustc_data_structures = { path = "../rustc_data_structures" }
2828
rustc_errors = { path = "../rustc_errors" }
2929
rustc_fs_util = { path = "../rustc_fs_util" }
3030
rustc_hir = { path = "../rustc_hir" }

compiler/rustc_feature/src/accepted.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ declare_features! (
285285
(accepted, extended_key_value_attributes, "1.54.0", Some(78835), None),
286286
/// Allows unsizing coercions in `const fn`.
287287
(accepted, const_fn_unsize, "1.54.0", Some(64992), None),
288+
/// Allows `impl Trait` with multiple unrelated lifetimes.
289+
(accepted, member_constraints, "1.54.0", Some(61997), None),
288290

289291
// -------------------------------------------------------------------------
290292
// feature-group-end: accepted features

compiler/rustc_feature/src/active.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,6 @@ declare_features! (
472472
/// Allows explicit discriminants on non-unit enum variants.
473473
(active, arbitrary_enum_discriminant, "1.37.0", Some(60553), None),
474474

475-
/// Allows `impl Trait` with multiple unrelated lifetimes.
476-
(active, member_constraints, "1.37.0", Some(61997), None),
477-
478475
/// Allows `async || body` closures.
479476
(active, async_closure, "1.37.0", Some(62290), None),
480477

compiler/rustc_incremental/src/persist/load.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use rustc_data_structures::fx::FxHashMap;
44
use rustc_hir::definitions::DefPathTable;
5-
use rustc_middle::dep_graph::{PreviousDepGraph, SerializedDepGraph, WorkProduct, WorkProductId};
5+
use rustc_middle::dep_graph::{SerializedDepGraph, WorkProduct, WorkProductId};
66
use rustc_middle::ty::query::OnDiskCache;
77
use rustc_serialize::opaque::Decoder;
88
use rustc_serialize::Decodable;
@@ -22,8 +22,8 @@ pub enum LoadResult<T> {
2222
Error { message: String },
2323
}
2424

25-
impl LoadResult<(PreviousDepGraph, WorkProductMap)> {
26-
pub fn open(self, sess: &Session) -> (PreviousDepGraph, WorkProductMap) {
25+
impl LoadResult<(SerializedDepGraph, WorkProductMap)> {
26+
pub fn open(self, sess: &Session) -> (SerializedDepGraph, WorkProductMap) {
2727
match self {
2828
LoadResult::Error { message } => {
2929
sess.warn(&message);
@@ -84,7 +84,7 @@ impl<T> MaybeAsync<T> {
8484
}
8585
}
8686

87-
pub type DepGraphFuture = MaybeAsync<LoadResult<(PreviousDepGraph, WorkProductMap)>>;
87+
pub type DepGraphFuture = MaybeAsync<LoadResult<(SerializedDepGraph, WorkProductMap)>>;
8888

8989
/// Launch a thread and load the dependency graph in the background.
9090
pub fn load_dep_graph(sess: &Session) -> DepGraphFuture {
@@ -185,7 +185,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture {
185185
let dep_graph = SerializedDepGraph::decode(&mut decoder)
186186
.expect("Error reading cached dep-graph");
187187

188-
LoadResult::Ok { data: (PreviousDepGraph::new(dep_graph), prev_work_products) }
188+
LoadResult::Ok { data: (dep_graph, prev_work_products) }
189189
}
190190
}
191191
}))

compiler/rustc_incremental/src/persist/save.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc_data_structures::fx::FxHashMap;
22
use rustc_data_structures::sync::join;
3-
use rustc_middle::dep_graph::{DepGraph, PreviousDepGraph, WorkProduct, WorkProductId};
3+
use rustc_middle::dep_graph::{DepGraph, SerializedDepGraph, WorkProduct, WorkProductId};
44
use rustc_middle::ty::TyCtxt;
55
use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
66
use rustc_serialize::Encodable as RustcEncodable;
@@ -186,7 +186,7 @@ fn encode_query_cache(tcx: TyCtxt<'_>, encoder: &mut FileEncoder) -> FileEncodeR
186186

187187
pub fn build_dep_graph(
188188
sess: &Session,
189-
prev_graph: PreviousDepGraph,
189+
prev_graph: SerializedDepGraph,
190190
prev_work_products: FxHashMap<WorkProductId, WorkProduct>,
191191
) -> Option<DepGraph> {
192192
if sess.opts.incremental.is_none() {

compiler/rustc_llvm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ libc = "0.2.73"
1313

1414
[build-dependencies]
1515
build_helper = { path = "../../src/build_helper" }
16-
cc = "1.0.67"
16+
cc = "1.0.68"

compiler/rustc_middle/src/dep_graph/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ crate use dep_node::{make_compile_codegen_unit, make_compile_mono_item};
1818
pub type DepGraph = rustc_query_system::dep_graph::DepGraph<DepKind>;
1919
pub type TaskDeps = rustc_query_system::dep_graph::TaskDeps<DepKind>;
2020
pub type DepGraphQuery = rustc_query_system::dep_graph::DepGraphQuery<DepKind>;
21-
pub type PreviousDepGraph = rustc_query_system::dep_graph::PreviousDepGraph<DepKind>;
2221
pub type SerializedDepGraph = rustc_query_system::dep_graph::SerializedDepGraph<DepKind>;
2322
pub type EdgeFilter = rustc_query_system::dep_graph::debug::EdgeFilter<DepKind>;
2423

compiler/rustc_mir/src/interpret/place.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use rustc_target::abi::{Abi, Align, FieldsShape, TagEncoding};
1515
use rustc_target::abi::{HasDataLayout, LayoutOf, Size, VariantIdx, Variants};
1616

1717
use super::{
18-
alloc_range, mir_assign_valid_types, AllocId, AllocMap, AllocRef, AllocRefMut, Allocation,
19-
ConstAlloc, ImmTy, Immediate, InterpCx, InterpResult, LocalValue, Machine, MemoryKind, OpTy,
20-
Operand, Pointer, PointerArithmetic, Scalar, ScalarMaybeUninit,
18+
alloc_range, mir_assign_valid_types, AllocRef, AllocRefMut, ConstAlloc, ImmTy, Immediate,
19+
InterpCx, InterpResult, LocalValue, Machine, MemoryKind, OpTy, Operand, Pointer,
20+
PointerArithmetic, Scalar, ScalarMaybeUninit,
2121
};
2222

2323
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable)]
@@ -292,8 +292,6 @@ where
292292
// FIXME: Working around https://github.com/rust-lang/rust/issues/54385
293293
Tag: Debug + Copy + Eq + Hash + 'static,
294294
M: Machine<'mir, 'tcx, PointerTag = Tag>,
295-
// FIXME: Working around https://github.com/rust-lang/rust/issues/24159
296-
M::MemoryMap: AllocMap<AllocId, (MemoryKind<M::MemoryKind>, Allocation<Tag, M::AllocExtra>)>,
297295
{
298296
/// Take a value, which represents a (thin or wide) reference, and make it a place.
299297
/// Alignment is just based on the type. This is the inverse of `MemPlace::to_ref()`.

compiler/rustc_mir_build/src/build/expr/as_rvalue.rs

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -185,21 +185,26 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
185185
// match x { _ => () } // fake read of `x`
186186
// };
187187
// ```
188-
for (thir_place, cause, hir_id) in fake_reads.into_iter() {
189-
let place_builder =
190-
unpack!(block = this.as_place_builder(block, &this.thir[*thir_place]));
191-
192-
if let Ok(place_builder_resolved) =
193-
place_builder.try_upvars_resolved(this.tcx, this.typeck_results)
194-
{
195-
let mir_place =
196-
place_builder_resolved.into_place(this.tcx, this.typeck_results);
197-
this.cfg.push_fake_read(
198-
block,
199-
this.source_info(this.tcx.hir().span(*hir_id)),
200-
*cause,
201-
mir_place,
202-
);
188+
//
189+
// FIXME(RFC2229, rust#85435): Remove feature gate once diagnostics are
190+
// improved and unsafe checking works properly in closure bodies again.
191+
if this.tcx.features().capture_disjoint_fields {
192+
for (thir_place, cause, hir_id) in fake_reads.into_iter() {
193+
let place_builder =
194+
unpack!(block = this.as_place_builder(block, &this.thir[*thir_place]));
195+
196+
if let Ok(place_builder_resolved) =
197+
place_builder.try_upvars_resolved(this.tcx, this.typeck_results)
198+
{
199+
let mir_place =
200+
place_builder_resolved.into_place(this.tcx, this.typeck_results);
201+
this.cfg.push_fake_read(
202+
block,
203+
this.source_info(this.tcx.hir().span(*hir_id)),
204+
*cause,
205+
mir_place,
206+
);
207+
}
203208
}
204209
}
205210

0 commit comments

Comments
 (0)