about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-06 16:17:02 +0000
committerbors <bors@rust-lang.org>2025-08-06 16:17:02 +0000
commit29cdc6a109ee98a382f974bf89d3971b4385399c (patch)
treeea99bb083daf9db65307d242ce29431e0f361044 /src
parent8fb40f798a23adf608182ce5f4eb151fdc8e0da5 (diff)
parent66f0f272905132b4b22bbee97fe47a1b9d5bed8a (diff)
downloadrust-29cdc6a109ee98a382f974bf89d3971b4385399c.tar.gz
rust-29cdc6a109ee98a382f974bf89d3971b4385399c.zip
Auto merge of #145003 - Kobzol:rollup-kgb216b, r=Kobzol
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#144552 (Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`)
 - rust-lang/rust#144676 (Add documentation for unstable_feature_bound)
 - rust-lang/rust#144836 (Change visibility of Args new function)
 - rust-lang/rust#144910 (Add regression tests for seemingly fixed issues)
 - rust-lang/rust#144913 ([rustdoc] Fix wrong `i` tooltip icon)
 - rust-lang/rust#144924 (compiletest: add hint for when a ui test produces no errors)
 - rust-lang/rust#144926 (Correct the use of `must_use` on btree::IterMut)
 - rust-lang/rust#144928 (Drop `rust-version` from `rustc_thread_pool`)
 - rust-lang/rust#144945 (Autolabel PRs that change explicit tail call tests as `F-explicit_tail_calls`)
 - rust-lang/rust#144954 (run-make: Allow blessing snapshot files that don't exist yet)
 - rust-lang/rust#144971 (num: Rename `isolate_most_least_significant_one` functions)
 - rust-lang/rust#144978 (Fix some doc links for intrinsics)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/doc/rustc-dev-guide/src/stability.md3
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css4
-rw-r--r--src/tools/compiletest/src/runtest.rs2
-rw-r--r--src/tools/run-make-support/src/diff/mod.rs11
4 files changed, 18 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/src/stability.md b/src/doc/rustc-dev-guide/src/stability.md
index d0cee54adb6..c26d34273d7 100644
--- a/src/doc/rustc-dev-guide/src/stability.md
+++ b/src/doc/rustc-dev-guide/src/stability.md
@@ -181,4 +181,7 @@ the `deprecated_in_future` lint is triggered which is default `allow`, but most
 of the standard library raises it to a warning with
 `#![warn(deprecated_in_future)]`.
 
+## unstable_feature_bound
+The `#[unstable_feature_bound(foo)]` attribute can be used together with `#[unstable]` attribute to mark an `impl` of stable type and stable trait as unstable. In std/core, an item annotated with `#[unstable_feature_bound(foo)]` can only be used by another item that is also annotated with `#[unstable_feature_bound(foo)]`. Outside of std/core, using an item with `#[unstable_feature_bound(foo)]` requires the feature to be enabled with `#![feature(foo)]` attribute on the crate. Currently, only `impl`s and free functions can be annotated with `#[unstable_feature_bound]`.
+
 [blog]: https://www.ralfj.de/blog/2018/07/19/const.html
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 99b3da8b2cd..c48863b4681 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1838,6 +1838,10 @@ instead, we check that it's not a "finger" cursor.
 	border-right: 3px solid var(--target-border-color);
 }
 
+a.tooltip {
+	font-family: var(--font-family);
+}
+
 .code-header a.tooltip {
 	color: inherit;
 	margin-right: 15px;
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 35670ba89e9..84c6df5c744 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -356,7 +356,7 @@ impl<'test> TestCx<'test> {
             if proc_res.status.success() {
                 let err = &format!("{} test did not emit an error", self.config.mode);
                 let extra_note = (self.config.mode == crate::common::TestMode::Ui)
-                    .then_some("note: by default, ui tests are expected not to compile");
+                    .then_some("note: by default, ui tests are expected not to compile.\nhint: use check-pass, build-pass, or run-pass directive to change this behavior.");
                 self.fatal_proc_rec_general(err, extra_note, proc_res, || ());
             }
 
diff --git a/src/tools/run-make-support/src/diff/mod.rs b/src/tools/run-make-support/src/diff/mod.rs
index ee48e373366..739eff72f05 100644
--- a/src/tools/run-make-support/src/diff/mod.rs
+++ b/src/tools/run-make-support/src/diff/mod.rs
@@ -23,6 +23,7 @@ pub struct Diff {
     actual: Option<String>,
     actual_name: Option<String>,
     normalizers: Vec<(String, String)>,
+    bless_dir: Option<String>,
     drop_bomb: DropBomb,
 }
 
@@ -37,6 +38,7 @@ impl Diff {
             actual: None,
             actual_name: None,
             normalizers: Vec::new(),
+            bless_dir: std::env::var("RUSTC_BLESS_TEST").ok(),
             drop_bomb: DropBomb::arm("diff"),
         }
     }
@@ -44,6 +46,13 @@ impl Diff {
     /// Specify the expected output for the diff from a file.
     pub fn expected_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self {
         let path = path.as_ref();
+        // In `--bless` mode, create the snapshot file if it doesn't already exist.
+        // The empty file will be overwritten with the actual text.
+        if self.bless_dir.is_some()
+            && let Ok(false) = std::fs::exists(path)
+        {
+            fs::write(path, "");
+        }
         let content = fs::read_to_string(path);
         let name = path.to_string_lossy().to_string();
 
@@ -148,7 +157,7 @@ impl Diff {
         let Some(ref expected_file) = self.expected_file else {
             return false;
         };
-        let Ok(bless_dir) = std::env::var("RUSTC_BLESS_TEST") else {
+        let Some(ref bless_dir) = self.bless_dir else {
             return false;
         };