Compile Servo with the latest version of rust stable (#30831)

This completes the transition to compiling Servo with rust stable. Some
nightly-only features are still used when compiling the `script` and
`crown` crates, as well as for some style unit tests. These will likely
break with newer compiler versions, but `crown` can be disabled for them
conditionally. This is just the first step.

This has some caveats:

1. We need to disable setting up the special linker on Linux. The -Z
   option isn't supported with stable rust so using this is out --
   meanwhile we can't be sure that lld is installed on most systems.
2. `cargo fmt` still uses some unstable options, so we need to rely on
   the unstable toolchain just for running `fmt`. The idea is to fix this
   gradually.
This commit is contained in:
Martin Robinson 2023-12-06 18:36:07 +01:00 committed by GitHub
parent 9c443cf2c1
commit 7e82c5c957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 76 additions and 78 deletions

View file

@ -586,10 +586,15 @@ impl StackingContext {
return;
};
let StackingContextContent::Fragment { fragment, scroll_node_id, containing_block, .. }
= first_stacking_context_fragment else {
debug_panic!("Expected a fragment, not a stacking container");
};
let StackingContextContent::Fragment {
fragment,
scroll_node_id,
containing_block,
..
} = first_stacking_context_fragment
else {
debug_panic!("Expected a fragment, not a stacking container");
};
let fragment = fragment.borrow();
let box_fragment = match &*fragment {
Fragment::Box(box_fragment) | Fragment::Float(box_fragment) => box_fragment,

View file

@ -3,7 +3,6 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#![deny(unsafe_code)]
#![feature(once_cell)]
mod cell;
pub mod context;