Skip to content

Commit eb183e5

Browse files
authored
Bump default version of rustc. (#3562)
Closes #3627
1 parent e7e25a9 commit eb183e5

252 files changed

Lines changed: 1626 additions & 2121 deletions

File tree

Some content is hidden

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

.bazelci/presubmit.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -569,18 +569,6 @@ tasks:
569569
- "//..."
570570
test_targets:
571571
- "//..."
572-
cc_common_link_and_mangling_ubuntu2204:
573-
name: Build via cc_common.link with rustc mangling alloc symbols
574-
platform: ubuntu2204
575-
working_directory: test/integration/cc_common_link
576-
build_targets:
577-
- "//..."
578-
test_targets:
579-
- "//..."
580-
build_flags:
581-
- "--config=mangled_alloc_symbols"
582-
test_flags:
583-
- "--config=mangled_alloc_symbols"
584572
cc_common_link_with_global_alloc_ubuntu2204:
585573
name: Build via cc_common.link using a global allocator
586574
platform: ubuntu2204
@@ -597,18 +585,6 @@ tasks:
597585
- "//..."
598586
test_targets:
599587
- "//..."
600-
cc_common_link_with_global_alloc_and_mangling_ubuntu2204:
601-
name: Build via cc_common.link using a global allocator with rustc mangling alloc symbols
602-
platform: ubuntu2204
603-
working_directory: test/integration/cc_common_link_with_global_alloc
604-
build_targets:
605-
- "//..."
606-
test_targets:
607-
- "//..."
608-
build_flags:
609-
- "--config=mangled_alloc_symbols"
610-
test_flags:
611-
- "--config=mangled_alloc_symbols"
612588
cc_common_link_no_std_ubuntu2204:
613589
name: Build with no_std + alloc using cc_common.link infrastructure for linking
614590
platform: ubuntu2204
@@ -621,18 +597,6 @@ tasks:
621597
- "--config=no_std_alloc_using_cc_common_link"
622598
test_flags:
623599
- "--config=no_std_alloc_using_cc_common_link"
624-
cc_common_link_no_std_and_mangling_ubuntu2204:
625-
name: Build with no_std + alloc using cc_common.link infrastructure for linking with rust toolchain mangling alloc symbols
626-
platform: ubuntu2204
627-
working_directory: test/integration/no_std
628-
build_targets:
629-
- "//..."
630-
test_targets:
631-
- "//..."
632-
build_flags:
633-
- "--config=no_std_alloc_using_cc_common_link_and_mangled_alloc_symbols"
634-
test_flags:
635-
- "--config=no_std_alloc_using_cc_common_link_and_mangled_alloc_symbols"
636600
no_std_ubuntu2204:
637601
name: Build with no_std + alloc
638602
platform: ubuntu2204

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ use_repo(
7676
"rules_rust_toolchain_test_target_json",
7777
)
7878

79-
bazel_dep(name = "rules_python", version = "0.40.0", dev_dependency = True)
79+
bazel_dep(name = "rules_python", version = "1.5.1", dev_dependency = True)
8080
bazel_dep(name = "rules_testing", version = "0.7.0", dev_dependency = True)
8181
bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True)
8282

crate_universe/src/cli/splice.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,12 @@ pub fn splice(opt: SpliceOptions) -> Result<()> {
108108
.with_context(|| format!("Failed to splice workspace {}", opt.repository_name))?;
109109

110110
// Use the existing lockfile if possible, otherwise generate a new one.
111-
let cargo_lockfile = if opt.cargo_lockfile.is_some() && opt.skip_cargo_lockfile_overwrite {
112-
let cargo_lockfile_path = opt.cargo_lockfile.unwrap();
113-
cargo_lock::Lockfile::load(&cargo_lockfile_path).context(format!(
111+
let cargo_lockfile = if let Some(cargo_lockfile_path) = opt
112+
.cargo_lockfile
113+
.as_ref()
114+
.filter(|_| opt.skip_cargo_lockfile_overwrite)
115+
{
116+
cargo_lock::Lockfile::load(cargo_lockfile_path).context(format!(
114117
"Failed to load lockfile: {}",
115118
cargo_lockfile_path.display()
116119
))?

crate_universe/src/metadata/metadata_annotation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ mod test {
568568
let pkg = mock_cargo_metadata_package();
569569
let lock_pkg = mock_cargo_lock_package();
570570

571-
assert!(cargo_meta_pkg_to_locked_pkg(&pkg, &vec![lock_pkg]).is_some())
571+
assert!(cargo_meta_pkg_to_locked_pkg(&pkg, &[lock_pkg]).is_some())
572572
}
573573

574574
#[test]

crate_universe/src/utils/starlark/select_scalar.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,12 @@ where
112112
// },
113113
// })
114114

115-
if self.common.is_some() && self.selects.is_empty() && self.unmapped.is_empty() {
116-
return self.common.as_ref().unwrap().serialize(serializer);
115+
if let Some(common) = self
116+
.common
117+
.as_ref()
118+
.filter(|_| self.selects.is_empty() && self.unmapped.is_empty())
119+
{
120+
return common.serialize(serializer);
117121
}
118122

119123
struct SelectInner<'a, T>(&'a SelectScalar<T>)

crate_universe/tests/cargo_integration_test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extern crate tempfile;
77
use std::collections::HashMap;
88
use std::env;
99
use std::fs;
10-
use std::path::PathBuf;
10+
use std::path::{Path, PathBuf};
1111

1212
use anyhow::{ensure, Context, Result};
1313
use camino::Utf8PathBuf;
@@ -44,10 +44,10 @@ fn setup_cargo_env(rfiles: &runfiles::Runfiles) -> Result<(PathBuf, PathBuf)> {
4444
// If $RUSTC is a relative path it can cause issues with
4545
// `cargo_metadata::MetadataCommand`. Just to be on the safe side, we make
4646
// both of these env variables absolute paths.
47-
if cargo != PathBuf::from(env::var("CARGO").unwrap()) {
47+
if cargo != Path::new(&env::var("CARGO").unwrap()) {
4848
env::set_var("CARGO", cargo.as_os_str());
4949
}
50-
if rustc != PathBuf::from(env::var("RUSTC").unwrap()) {
50+
if rustc != Path::new(&env::var("RUSTC").unwrap()) {
5151
env::set_var("RUSTC", rustc.as_os_str());
5252
}
5353

examples/android/.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ coverage --experimental_fetch_all_coverage_outputs
2020
# https://bazel.build/reference/command-line-reference#flag--experimental_cc_shared_library
2121
common --experimental_cc_shared_library
2222

23+
build --@rules_rust//rust/settings:experimental_use_allocator_libraries_with_mangled_symbols=True
24+
2325
###############################################################################
2426
## Unique configuration groups
2527
###############################################################################

examples/crate_universe/MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ use_repo(
645645
"crates_vendor_pkgs__tracing-subscriber-0.3.19",
646646
"cvm",
647647
"cvm__serde_yaml-0.9.34-deprecated",
648-
"cvm__tempfile-3.25.0",
648+
"cvm__tempfile-3.26.0",
649649
"cvm__tokio-1.49.0",
650650
"cvm__tokio-test-0.4.5",
651651
)

examples/crate_universe/alias_rule/cargo-bazel-lock_global_alias_annotation_none.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"checksum": "7080bcc8dbd2cfc5533bea104d6f394bf67ff851796be8675f0abd0cee55319a",
2+
"checksum": "e964fe843eb5aa86b5ef42ce8d1035757ce2de11087baf339a3bfcfcc06f0530",
33
"crates": {
44
"direct-cargo-bazel-deps 0.0.1": {
55
"name": "direct-cargo-bazel-deps",

examples/crate_universe/alias_rule/cargo-bazel-lock_global_alias_annotation_opt.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"checksum": "c10fbbbe14bd280297ec9109bc58da5486d585fe108f87ae19bf140362644628",
2+
"checksum": "5ad103f54649a23546f68547eb70c55c202bdddc0a2bc1452c8ca512b9694578",
33
"crates": {
44
"direct-cargo-bazel-deps 0.0.1": {
55
"name": "direct-cargo-bazel-deps",

0 commit comments

Comments
 (0)