Skip to content

Commit 2310da4

Browse files
committed
Auto merge of #95745 - Dylan-DPC:rollup-485ajqi, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #95185 (Stabilize Stdin::lines.) - #95626 (Don't cast thread name to an integer for prctl) - #95709 (Improve terse test output.) - #95735 (Revert "Mark Location::caller() as #[inline]") - #95738 (Switch item-info from div to span) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 8f36334 + fe6d69f commit 2310da4

File tree

7 files changed

+20
-11
lines changed

7 files changed

+20
-11
lines changed

library/core/src/panic/location.rs

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ impl<'a> Location<'a> {
8383
#[stable(feature = "track_caller", since = "1.46.0")]
8484
#[rustc_const_unstable(feature = "const_caller_location", issue = "76156")]
8585
#[track_caller]
86-
#[inline]
8786
pub const fn caller() -> &'static Location<'static> {
8887
crate::intrinsics::caller_location()
8988
}

library/std/src/io/stdio.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ impl Stdin {
394394
/// # Examples
395395
///
396396
/// ```no_run
397-
/// #![feature(stdin_forwarders)]
398397
/// use std::io;
399398
///
400399
/// let lines = io::stdin().lines();
@@ -403,7 +402,7 @@ impl Stdin {
403402
/// }
404403
/// ```
405404
#[must_use = "`self` will be dropped if the result is not used"]
406-
#[unstable(feature = "stdin_forwarders", issue = "87096")]
405+
#[stable(feature = "stdin_forwarders", since = "1.62.0")]
407406
pub fn lines(self) -> Lines<StdinLock<'static>> {
408407
self.lock().lines()
409408
}

library/std/src/sys/unix/thread.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ impl Thread {
122122
// pthread wrapper only appeared in glibc 2.12, so we use syscall
123123
// directly.
124124
unsafe {
125-
libc::prctl(PR_SET_NAME, name.as_ptr() as libc::c_ulong, 0, 0, 0);
125+
libc::prctl(
126+
PR_SET_NAME,
127+
name.as_ptr(),
128+
0 as libc::c_ulong,
129+
0 as libc::c_ulong,
130+
0 as libc::c_ulong,
131+
);
126132
}
127133
}
128134

library/test/src/formatters/terse.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ use crate::{
1111
types::TestDesc,
1212
};
1313

14-
// insert a '\n' after 100 tests in quiet mode
15-
const QUIET_MODE_MAX_COLUMN: usize = 100;
14+
// We insert a '\n' when the output hits 100 columns in quiet mode. 88 test
15+
// result chars leaves 12 chars for a progress count like " 11704/12853".
16+
const QUIET_MODE_MAX_COLUMN: usize = 88;
1617

1718
pub(crate) struct TerseFormatter<T> {
1819
out: OutputLocation<T>,
@@ -65,7 +66,7 @@ impl<T: Write> TerseFormatter<T> {
6566
) -> io::Result<()> {
6667
self.write_pretty(result, color)?;
6768
if self.test_count % QUIET_MODE_MAX_COLUMN == QUIET_MODE_MAX_COLUMN - 1 {
68-
// we insert a new line every 100 dots in order to flush the
69+
// We insert a new line regularly in order to flush the
6970
// screen when dealing with line-buffered output (e.g., piping to
7071
// `stamp` in the rust CI).
7172
let out = format!(" {}/{}\n", self.test_count + 1, self.total_test_count);

src/librustdoc/html/render/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -597,11 +597,11 @@ fn document_item_info(
597597
) {
598598
let item_infos = short_item_info(item, cx, parent);
599599
if !item_infos.is_empty() {
600-
w.write_str("<div class=\"item-info\">");
600+
w.write_str("<span class=\"item-info\">");
601601
for info in item_infos {
602602
w.write_str(&info);
603603
}
604-
w.write_str("</div>");
604+
w.write_str("</span>");
605605
}
606606
}
607607

@@ -1772,7 +1772,7 @@ pub(crate) fn render_impl_summary(
17721772
let is_trait = i.inner_impl().trait_.is_some();
17731773
if is_trait {
17741774
if let Some(portability) = portability(&i.impl_item, Some(parent)) {
1775-
write!(w, "<div class=\"item-info\">{}</div>", portability);
1775+
write!(w, "<span class=\"item-info\">{}</span>", portability);
17761776
}
17771777
}
17781778

src/librustdoc/html/static/css/rustdoc.css

+4
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,10 @@ h2.location a {
737737
border: none;
738738
}
739739

740+
.item-info {
741+
display: block;
742+
}
743+
740744
.content .item-info code {
741745
font-size: 0.875rem;
742746
}

src/test/rustdoc/stability.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
pub struct Unstable {
66
// @has stability/struct.Unstable.html \
7-
// '//div[@class="item-info"]//div[@class="stab unstable"]' \
7+
// '//span[@class="item-info"]//div[@class="stab unstable"]' \
88
// 'This is a nightly-only experimental API'
99
// @count stability/struct.Unstable.html '//span[@class="stab unstable"]' 0
1010
pub foo: u32,

0 commit comments

Comments
 (0)