Skip to content

Commit 00a2cce

Browse files
committed
Update to latest nightly rustc
This requires fixing some nightly APIs that have been changed in the latest nightly compiler. For reference, the PR in rustc for the API change in rustc crate: rust-lang/rust#107753 The tracking issue for the 'drain_filter' which is renamed to 'extract_if': rust-lang/rust#43244 Fixes servo#29467 Signed-off-by: Mukilan Thiyagarajan <[email protected]>
1 parent 9eee517 commit 00a2cce

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

components/script/dom/eventtarget.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ impl EventTarget {
441441

442442
let listener = EventListenerType::Additive(listener.clone());
443443
if let Some(entries) = handlers.get_mut(ty) {
444-
entries.drain_filter(|e| e.listener == listener && e.once);
444+
entries.extract_if(|e| e.listener == listener && e.once);
445445
}
446446
}
447447

components/script/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
44

55
#![feature(core_intrinsics)]
6-
#![feature(drain_filter)]
6+
#![feature(extract_if)]
77
#![feature(plugin)]
88
#![feature(register_tool)]
99
#![deny(unsafe_code)]

components/script/task_queue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl<T: QueuedTaskConversion> TaskQueue<T> {
119119

120120
// 4. Filter tasks from non-priority task-sources.
121121
let to_be_throttled: Vec<T> = incoming
122-
.drain_filter(|msg| {
122+
.extract_if(|msg| {
123123
let task_source = match msg.task_source_name() {
124124
Some(task_source) => task_source,
125125
None => return false,

components/script_plugins/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
216216
}
217217
if let hir::ItemKind::Struct(def, ..) = &item.kind {
218218
for ref field in def.fields() {
219-
let field_type = cx.tcx.type_of(field.def_id);
219+
let field_type = cx.tcx.type_of(field.def_id).skip_binder();
220220
if is_unrooted_ty(&self.symbols, cx, field_type, false) {
221221
cx.lint(
222222
UNROOTED_MUST_ROOT,
@@ -239,7 +239,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
239239
match var.data {
240240
hir::VariantData::Tuple(fields, ..) => {
241241
for field in fields {
242-
let field_type = cx.tcx.type_of(field.def_id);
242+
let field_type = cx.tcx.type_of(field.def_id).skip_binder();
243243
if is_unrooted_ty(&self.symbols, cx, field_type, false) {
244244
cx.lint(
245245
UNROOTED_MUST_ROOT,
@@ -273,7 +273,8 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
273273
};
274274

275275
if !in_derive_expn(span) {
276-
let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx);
276+
let fn_type = cx.tcx.type_of(def_id).skip_binder();
277+
let sig = fn_type.fn_sig(cx.tcx);
277278

278279
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
279280
if is_unrooted_ty(&self.symbols, cx, *ty, false) {

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2023-02-01
1+
nightly-2023-07-12

0 commit comments

Comments
 (0)