Skip to content

Commit a4fbad2

Browse files
authored
Auto merge of #26190 - servo:unstable, r=nox
Remove use of soon-to-be-deprecated unstable feature rust-lang/rust#47336 (comment)
2 parents 16230ee + 6175a68 commit a4fbad2

File tree

9 files changed

+17
-19
lines changed

9 files changed

+17
-19
lines changed

components/layout_2020/flow/inline.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,11 @@ impl InlineFormattingContext {
303303
panic!("display:none does not generate an abspos box")
304304
},
305305
};
306-
let hoisted_box = box_.clone().to_hoisted(initial_start_corner, tree_rank);
306+
let hoisted_box = AbsolutelyPositionedBox::to_hoisted(
307+
box_.clone(),
308+
initial_start_corner,
309+
tree_rank,
310+
);
307311
let hoisted_fragment = hoisted_box.fragment.clone();
308312
ifc.push_hoisted_box_to_positioning_context(hoisted_box);
309313
ifc.current_nesting_level.fragments_so_far.push(
@@ -786,7 +790,7 @@ impl TextRun {
786790
glyphs,
787791
text_decoration_line: ifc.current_nesting_level.text_decoration_line,
788792
}));
789-
if runs.is_empty() {
793+
if runs.as_slice().is_empty() {
790794
break;
791795
} else {
792796
// New line

components/layout_2020/flow/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ impl BlockLevelBox {
315315
))
316316
},
317317
BlockLevelBox::OutOfFlowAbsolutelyPositionedBox(box_) => {
318-
let hoisted_box = box_.clone().to_hoisted(Vec2::zero(), tree_rank);
318+
let hoisted_box =
319+
AbsolutelyPositionedBox::to_hoisted(box_.clone(), Vec2::zero(), tree_rank);
319320
let hoisted_fragment = hoisted_box.fragment.clone();
320321
positioning_context.push(hoisted_box);
321322
Fragment::AbsoluteOrFixedPositioned(AbsoluteOrFixedPositionedFragment {

components/layout_2020/lib.rs

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

55
#![deny(unsafe_code)]
6-
#![feature(arbitrary_self_types)]
7-
#![feature(exact_size_is_empty)]
86

97
#[macro_use]
108
extern crate serde;

components/layout_2020/positioned.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl AbsolutelyPositionedBox {
100100
}
101101

102102
pub(crate) fn to_hoisted(
103-
self: Arc<Self>,
103+
self_: Arc<Self>,
104104
initial_start_corner: Vec2<Length>,
105105
tree_rank: usize,
106106
) -> HoistedAbsolutelyPositionedBox {
@@ -124,7 +124,7 @@ impl AbsolutelyPositionedBox {
124124
}
125125
}
126126

127-
let box_offsets = self.contents.style.box_offsets();
127+
let box_offsets = self_.contents.style.box_offsets();
128128
HoistedAbsolutelyPositionedBox {
129129
tree_rank,
130130
box_offsets: Vec2 {
@@ -140,7 +140,7 @@ impl AbsolutelyPositionedBox {
140140
),
141141
},
142142
fragment: ArcRefCell::new(None),
143-
absolutely_positioned_box: self,
143+
absolutely_positioned_box: self_,
144144
}
145145
}
146146
}

components/script/dom/bindings/codegen/CodegenRust.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -3992,8 +3992,8 @@ def jitInfoInitializer(isTypedMethod):
39923992
protoID: PrototypeList::ID::${name} as u16,
39933993
},
39943994
__bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: ${depth} },
3995-
_bitfield_1: unsafe {
3996-
mem::transmute(new_jsjitinfo_bitfield_1!(
3995+
_bitfield_1: __BindgenBitfieldUnit::new(
3996+
new_jsjitinfo_bitfield_1!(
39973997
JSJitInfo_OpType::${opType} as u8,
39983998
JSJitInfo_AliasSet::${aliasSet} as u8,
39993999
JSValueType::${returnType} as u8,
@@ -4004,8 +4004,8 @@ def jitInfoInitializer(isTypedMethod):
40044004
${isLazilyCachedInSlot},
40054005
${isTypedMethod},
40064006
${slotIndex},
4007-
))
4008-
},
4007+
).to_ne_bytes()
4008+
),
40094009
}
40104010
""",
40114011
opName=opName,
@@ -5988,6 +5988,7 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries
59885988
'js::error::throw_type_error',
59895989
'js::error::throw_internal_error',
59905990
'js::rust::wrappers::Call',
5991+
'js::jsapi::__BindgenBitfieldUnit',
59915992
'js::jsapi::CallArgs',
59925993
'js::jsapi::CurrentGlobalOrNull',
59935994
'js::rust::wrappers::GetPropertyKeys',

components/script/dom/bindings/root.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ where
383383
#[allow(unrooted_must_root)]
384384
pub unsafe fn from_box(value: Box<T>) -> Self {
385385
Self {
386-
ptr: Box::into_raw_non_null(value),
386+
ptr: Box::leak(value).into(),
387387
}
388388
}
389389
}

components/script/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
44

5-
#![feature(box_into_raw_non_null)]
65
#![feature(const_fn)]
7-
#![feature(const_transmute)]
86
#![feature(core_intrinsics)]
97
#![feature(drain_filter)]
10-
#![feature(inner_deref)]
118
#![feature(plugin)]
129
#![feature(register_tool)]
1310
#![deny(unsafe_code)]

components/script_layout_interface/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//! to depend on script.
88
99
#![deny(unsafe_code)]
10-
#![feature(box_into_raw_non_null)]
1110

1211
#[macro_use]
1312
extern crate html5ever;

ports/glutin/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
//!
1616
//! [glutin]: https://github.com/tomaka/glutin
1717
18-
#![feature(core_intrinsics)]
19-
2018
#[cfg(not(target_os = "android"))]
2119
include!("main2.rs");
2220

0 commit comments

Comments
 (0)