Skip to content

Commit 3a06854

Browse files
committed
Auto merge of #94224 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.59.0 release This adds in a few backports: * Destabilise entry_insert #94105 * Update compiler_builtins to fix duplicate symbols in armv7-linux-androideabi rlib #93436 This also includes a fresh commit replicating the 1.52.1 patch soft-disabling incremental for 1.59, in light of discussion on #94124. This hasn't yet been fully approved but I think is the likely way things will go, so preparing the first round of stable artifacts with that in mind. r? `@Mark-Simulacrum`
2 parents 1945ce6 + 6af5faf commit 3a06854

File tree

10 files changed

+407
-107
lines changed

10 files changed

+407
-107
lines changed

Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,9 @@ dependencies = [
678678

679679
[[package]]
680680
name = "compiler_builtins"
681-
version = "0.1.66"
681+
version = "0.1.67"
682682
source = "registry+https://github.com/rust-lang/crates.io-index"
683-
checksum = "191424db7756bbed2c4996959a0fbda94388abcf4f5a2728a8af17481ad9c4f7"
683+
checksum = "a68c69e9451f1df4b215c9588c621670c12286b53e60fb5ec4b59aaa1138d18e"
684684
dependencies = [
685685
"cc",
686686
"rustc-std-workspace-core",

RELEASES.md

+360-98
Large diffs are not rendered by default.

compiler/rustc_session/src/config.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,12 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
21022102

21032103
check_thread_count(&debugging_opts, error_format);
21042104

2105-
let incremental = cg.incremental.as_ref().map(PathBuf::from);
2105+
let incremental =
2106+
if std::env::var_os("RUSTC_FORCE_INCREMENTAL").map(|v| v == "1").unwrap_or(false) {
2107+
cg.incremental.as_ref().map(PathBuf::from)
2108+
} else {
2109+
None
2110+
};
21062111

21072112
let assert_incr_state =
21082113
parse_assert_incr_state(&debugging_opts.assert_incr_state, error_format);

library/std/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ panic_unwind = { path = "../panic_unwind", optional = true }
1616
panic_abort = { path = "../panic_abort" }
1717
core = { path = "../core" }
1818
libc = { version = "0.2.108", default-features = false, features = ['rustc-dep-of-std'] }
19-
compiler_builtins = { version = "0.1.66" }
19+
compiler_builtins = { version = "0.1.67" }
2020
profiler_builtins = { path = "../profiler_builtins", optional = true }
2121
unwind = { path = "../unwind" }
2222
hashbrown = { version = "0.11", default-features = false, features = ['rustc-dep-of-std'] }

library/std/src/collections/hash/map.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@ impl<'a, K, V> Entry<'a, K, V> {
24622462
/// # Examples
24632463
///
24642464
/// ```
2465+
/// #![feature(entry_insert)]
24652466
/// use std::collections::HashMap;
24662467
///
24672468
/// let mut map: HashMap<&str, String> = HashMap::new();
@@ -2470,7 +2471,7 @@ impl<'a, K, V> Entry<'a, K, V> {
24702471
/// assert_eq!(entry.key(), &"poneyland");
24712472
/// ```
24722473
#[inline]
2473-
#[stable(feature = "entry_insert", since = "1.59.0")]
2474+
#[unstable(feature = "entry_insert", issue = "65225")]
24742475
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> {
24752476
match self {
24762477
Occupied(mut entry) => {
@@ -2804,6 +2805,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
28042805
/// # Examples
28052806
///
28062807
/// ```
2808+
/// #![feature(entry_insert)]
28072809
/// use std::collections::HashMap;
28082810
/// use std::collections::hash_map::Entry;
28092811
///
@@ -2815,7 +2817,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
28152817
/// assert_eq!(map["poneyland"], 37);
28162818
/// ```
28172819
#[inline]
2818-
#[stable(feature = "entry_insert", since = "1.59.0")]
2820+
#[unstable(feature = "entry_insert", issue = "65225")]
28192821
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> {
28202822
let base = self.base.insert_entry(value);
28212823
OccupiedEntry { base }

src/ci/channel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
beta
1+
stable

src/doc/rustc/src/codegen-options/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ to save information after compiling a crate to be reused when recompiling the
160160
crate, improving re-compile times. This takes a path to a directory where
161161
incremental files will be stored.
162162

163+
Note that this option currently does not take effect unless
164+
`RUSTC_FORCE_INCREMENTAL=1` in the environment.
165+
163166
## inline-threshold
164167

165168
This option lets you set the default threshold for inlining a function. It

src/test/run-make/dep-graph/Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
# Just verify that we successfully run and produce dep graphs when requested.
66

77
all:
8-
RUST_DEP_GRAPH=$(TMPDIR)/dep-graph $(RUSTC) \
8+
RUST_DEP_GRAPH=$(TMPDIR)/dep-graph \
9+
RUSTC_FORCE_INCREMENTAL=1 \
10+
$(RUSTC) \
911
-Cincremental=$(TMPDIR)/incr \
1012
-Zquery-dep-graph -Zdump-dep-graph foo.rs
1113
test -f $(TMPDIR)/dep-graph.txt

src/test/run-make/incremental-session-fail/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ all:
88
# Make it so that rustc will fail to create a session directory.
99
touch $(SESSION_DIR)
1010
# Check exit code is 1 for an error, and not 101 for ICE.
11+
RUSTC_FORCE_INCREMENTAL=1 \
1112
$(RUSTC) foo.rs --crate-type=rlib -C incremental=$(SESSION_DIR) > $(OUTPUT_FILE) 2>&1; [ $$? -eq 1 ]
1213
$(CGREP) "Could not create incremental compilation crate directory" < $(OUTPUT_FILE)
1314
# -v tests are fragile, hopefully this text won't change

src/tools/compiletest/src/runtest.rs

+26-1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
130130
}
131131
debug!("running {:?}", testpaths.file.display());
132132
let mut props = TestProps::from_file(&testpaths.file, revision, &config);
133+
134+
// Currently, incremental is soft disabled unless this environment
135+
// variable is set. A bunch of our tests assume it's enabled, though - so
136+
// just enable it for our tests.
137+
//
138+
// This is deemed preferable to ignoring those tests; we still want to test
139+
// incremental somewhat, as users can opt in to it.
140+
props.rustc_env.push((String::from("RUSTC_FORCE_INCREMENTAL"), String::from("1")));
141+
133142
if props.incremental {
134143
props.incremental_dir = Some(incremental_dir(&config, testpaths));
135144
}
@@ -146,6 +155,12 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
146155
assert!(!props.revisions.is_empty(), "Incremental tests require revisions.");
147156
for revision in &props.revisions {
148157
let mut revision_props = TestProps::from_file(&testpaths.file, Some(revision), &config);
158+
159+
// See above - need to enable it explicitly for now.
160+
revision_props
161+
.rustc_env
162+
.push((String::from("RUSTC_FORCE_INCREMENTAL"), String::from("1")));
163+
149164
revision_props.incremental_dir = props.incremental_dir.clone();
150165
let rev_cx = TestCx {
151166
config: &config,
@@ -1630,7 +1645,17 @@ impl<'test> TestCx<'test> {
16301645
/// Returns whether or not it is a dylib.
16311646
fn build_auxiliary(&self, source_path: &str, aux_dir: &Path) -> bool {
16321647
let aux_testpaths = self.compute_aux_test_paths(source_path);
1633-
let aux_props = self.props.from_aux_file(&aux_testpaths.file, self.revision, self.config);
1648+
let mut aux_props =
1649+
self.props.from_aux_file(&aux_testpaths.file, self.revision, self.config);
1650+
1651+
// Currently, incremental is soft disabled unless this environment
1652+
// variable is set. A bunch of our tests assume it's enabled, though - so
1653+
// just enable it for our tests.
1654+
//
1655+
// This is deemed preferable to ignoring those tests; we still want to test
1656+
// incremental somewhat, as users can opt in to it.
1657+
aux_props.rustc_env.push((String::from("RUSTC_FORCE_INCREMENTAL"), String::from("1")));
1658+
16341659
let aux_output = TargetLocation::ThisDirectory(self.aux_output_dir_name());
16351660
let aux_cx = TestCx {
16361661
config: self.config,

0 commit comments

Comments
 (0)