mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
build: upgrade rustc to 1.81.0 (#34270)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
26f61103d6
commit
7fcde1f7a3
15 changed files with 16 additions and 26 deletions
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
@ -44,8 +44,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
crate: cargo-deny
|
crate: cargo-deny
|
||||||
locked: true
|
locked: true
|
||||||
# 0.16.2 requires Rust 1.81 or newer.
|
|
||||||
version: '0.16.1'
|
|
||||||
- name: Bootstrap Python
|
- name: Bootstrap Python
|
||||||
run: python3 -m pip install --upgrade pip
|
run: python3 -m pip install --upgrade pip
|
||||||
- name: Bootstrap dependencies
|
- name: Bootstrap dependencies
|
||||||
|
|
|
@ -13,7 +13,7 @@ authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
rust-version = "1.80.1"
|
rust-version = "1.81.0"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
accountable-refcell = "0.2.0"
|
accountable-refcell = "0.2.0"
|
||||||
|
|
|
@ -448,9 +448,8 @@ where
|
||||||
{
|
{
|
||||||
let mut next = parent.first_child();
|
let mut next = parent.first_child();
|
||||||
std::iter::from_fn(move || {
|
std::iter::from_fn(move || {
|
||||||
next.map(|child| {
|
next.inspect(|child| {
|
||||||
next = child.next_sibling();
|
next = child.next_sibling();
|
||||||
child
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,13 +232,12 @@ impl InlineFormattingContextBuilder {
|
||||||
|
|
||||||
let white_space_collapse = info.style.clone_white_space_collapse();
|
let white_space_collapse = info.style.clone_white_space_collapse();
|
||||||
let new_text: String = char_iterator
|
let new_text: String = char_iterator
|
||||||
.map(|character| {
|
.inspect(|&character| {
|
||||||
self.has_uncollapsible_text_content |= matches!(
|
self.has_uncollapsible_text_content |= matches!(
|
||||||
white_space_collapse,
|
white_space_collapse,
|
||||||
WhiteSpaceCollapse::Preserve | WhiteSpaceCollapse::BreakSpaces
|
WhiteSpaceCollapse::Preserve | WhiteSpaceCollapse::BreakSpaces
|
||||||
) || !character.is_ascii_whitespace() ||
|
) || !character.is_ascii_whitespace() ||
|
||||||
(character == '\n' && white_space_collapse != WhiteSpaceCollapse::Collapse);
|
(character == '\n' && white_space_collapse != WhiteSpaceCollapse::Collapse);
|
||||||
character
|
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ impl AllPendingLoads {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn remove(&mut self, key: &LoadKey) -> Option<PendingLoad> {
|
fn remove(&mut self, key: &LoadKey) -> Option<PendingLoad> {
|
||||||
self.loads.remove(key).map(|pending_load| {
|
self.loads.remove(key).inspect(|pending_load| {
|
||||||
self.url_to_load_key
|
self.url_to_load_key
|
||||||
.remove(&(
|
.remove(&(
|
||||||
pending_load.url.clone(),
|
pending_load.url.clone(),
|
||||||
|
@ -133,7 +133,6 @@ impl AllPendingLoads {
|
||||||
pending_load.cors_setting,
|
pending_load.cors_setting,
|
||||||
))
|
))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
pending_load
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,9 +244,8 @@ impl StorageManager {
|
||||||
let old_value = data
|
let old_value = data
|
||||||
.get_mut(&origin)
|
.get_mut(&origin)
|
||||||
.and_then(|&mut (ref mut total, ref mut entry)| {
|
.and_then(|&mut (ref mut total, ref mut entry)| {
|
||||||
entry.remove(&name).map(|old| {
|
entry.remove(&name).inspect(|old| {
|
||||||
*total -= name.as_bytes().len() + old.as_bytes().len();
|
*total -= name.as_bytes().len() + old.as_bytes().len();
|
||||||
old
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
sender.send(old_value).unwrap();
|
sender.send(old_value).unwrap();
|
||||||
|
|
|
@ -873,11 +873,7 @@ fn run_form_data_algorithm(
|
||||||
mime: &[u8],
|
mime: &[u8],
|
||||||
can_gc: CanGc,
|
can_gc: CanGc,
|
||||||
) -> Fallible<FetchedData> {
|
) -> Fallible<FetchedData> {
|
||||||
let mime_str = if let Ok(s) = str::from_utf8(mime) {
|
let mime_str = str::from_utf8(mime).unwrap_or_default();
|
||||||
s
|
|
||||||
} else {
|
|
||||||
""
|
|
||||||
};
|
|
||||||
let mime: Mime = mime_str
|
let mime: Mime = mime_str
|
||||||
.parse()
|
.parse()
|
||||||
.map_err(|_| Error::Type("Inappropriate MIME-type for Body".to_string()))?;
|
.map_err(|_| Error::Type("Inappropriate MIME-type for Body".to_string()))?;
|
||||||
|
|
|
@ -1037,7 +1037,7 @@ impl<T: ClipboardProvider> TextInput<T> {
|
||||||
// https://html.spec.whatwg.org/multipage/#textarea-line-break-normalisation-transformation
|
// https://html.spec.whatwg.org/multipage/#textarea-line-break-normalisation-transformation
|
||||||
content
|
content
|
||||||
.replace("\r\n", "\n")
|
.replace("\r\n", "\n")
|
||||||
.split(|c| c == '\n' || c == '\r')
|
.split(['\n', '\r'])
|
||||||
.map(DOMString::from)
|
.map(DOMString::from)
|
||||||
.collect()
|
.collect()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -31,9 +31,8 @@ pub fn get_default_url(
|
||||||
let mut new_url = None;
|
let mut new_url = None;
|
||||||
let cmdline_url = url_opt.map(|s| s.to_string()).and_then(|url_string| {
|
let cmdline_url = url_opt.map(|s| s.to_string()).and_then(|url_string| {
|
||||||
parse_url_or_filename(cwd.as_ref(), &url_string)
|
parse_url_or_filename(cwd.as_ref(), &url_string)
|
||||||
.map_err(|error| {
|
.inspect_err(|&error| {
|
||||||
log::warn!("URL parsing failed ({:?}).", error);
|
log::warn!("URL parsing failed ({:?}).", error);
|
||||||
error
|
|
||||||
})
|
})
|
||||||
.ok()
|
.ok()
|
||||||
});
|
});
|
||||||
|
|
|
@ -83,8 +83,7 @@ class Base:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
print(" * Installing cargo-deny...")
|
print(" * Installing cargo-deny...")
|
||||||
# cargo-deny 0.16.2 requires Rust 1.81.
|
if subprocess.call(["cargo", "install", "cargo-deny", "--locked"]) != 0:
|
||||||
if subprocess.call(["cargo", "install", "cargo-deny", "--locked", "--version", "0.16.1"]) != 0:
|
|
||||||
raise EnvironmentError("Installation of cargo-deny failed.")
|
raise EnvironmentError("Installation of cargo-deny failed.")
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
# Be sure to update shell.nix and support/crown/rust-toolchain.toml when bumping this!
|
# Be sure to update shell.nix and support/crown/rust-toolchain.toml when bumping this!
|
||||||
channel = "1.80.1"
|
channel = "1.81.0"
|
||||||
|
|
||||||
components = [
|
components = [
|
||||||
"clippy",
|
"clippy",
|
||||||
|
|
|
@ -10,7 +10,7 @@ with import (builtins.fetchTarball {
|
||||||
overlays = [
|
overlays = [
|
||||||
(import (builtins.fetchTarball {
|
(import (builtins.fetchTarball {
|
||||||
# Bumped the channel in rust-toolchain.toml? Bump this commit too!
|
# Bumped the channel in rust-toolchain.toml? Bump this commit too!
|
||||||
url = "https://github.com/oxalica/rust-overlay/archive/65e3dc0fe079fe8df087cd38f1fe6836a0373aad.tar.gz";
|
url = "https://github.com/oxalica/rust-overlay/archive/0be641045af6d8666c11c2c40e45ffc9667839b5.tar.gz";
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
|
|
4
support/crown/Cargo.lock
generated
4
support/crown/Cargo.lock
generated
|
@ -25,9 +25,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "compiletest_rs"
|
name = "compiletest_rs"
|
||||||
version = "0.11.1"
|
version = "0.11.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "71fcc3c0c91b59c137b3cf8073cbc2f72a49b3d5505660ec88f94da3ed4bb1de"
|
checksum = "f150fe9105fcd2a57cad53f0c079a24de65195903ef670990f5909f695eac04c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"diff",
|
"diff",
|
||||||
"filetime",
|
"filetime",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.80.1"
|
channel = "1.81.0"
|
||||||
|
|
||||||
components = [
|
components = [
|
||||||
"clippy",
|
"clippy",
|
||||||
|
|
|
@ -35,6 +35,8 @@ fn run_mode(mode: &'static str, bless: bool) {
|
||||||
// Does not work reliably: https://github.com/servo/servo/pull/30508#issuecomment-1834542203
|
// Does not work reliably: https://github.com/servo/servo/pull/30508#issuecomment-1834542203
|
||||||
//config.link_deps();
|
//config.link_deps();
|
||||||
config.strict_headers = true;
|
config.strict_headers = true;
|
||||||
|
// See https://github.com/Manishearth/compiletest-rs/issues/295
|
||||||
|
config.compile_test_exit_code = Some(101);
|
||||||
|
|
||||||
compiletest::run_tests(&config);
|
compiletest::run_tests(&config);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue