Skip to content

Commit 30dfb9e

Browse files
committed
Auto merge of #119970 - GuillaumeGomez:rollup-p53c19o, r=GuillaumeGomez
Rollup of 3 pull requests Successful merges: - #119561 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 5)) - #119742 (ARMv6K HorizonOS - Fix backlog for UnixListener) - #119960 (Inline 2 functions that appear in dep-graph profiles.) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 665d2c6 + d635cec commit 30dfb9e

28 files changed

+126
-58
lines changed

compiler/rustc_index_macros/src/newtype.rs

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ impl Parse for Newtype {
263263
impl std::ops::Add<usize> for #name {
264264
type Output = Self;
265265

266+
#[inline]
266267
fn add(self, other: usize) -> Self {
267268
Self::from_usize(self.index() + other)
268269
}

compiler/rustc_query_system/src/dep_graph/serialized.rs

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ impl EdgeHeader {
169169
}
170170
}
171171

172+
#[inline]
172173
fn mask(bits: usize) -> usize {
173174
usize::MAX >> ((std::mem::size_of::<usize>() * 8) - bits)
174175
}

library/std/src/os/unix/net/listener.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ impl UnixListener {
7373
unsafe {
7474
let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;
7575
let (addr, len) = sockaddr_un(path.as_ref())?;
76-
#[cfg(any(target_os = "windows", target_os = "redox", target_os = "espidf"))]
76+
#[cfg(any(
77+
target_os = "windows",
78+
target_os = "redox",
79+
target_os = "espidf",
80+
target_os = "horizon"
81+
))]
7782
const backlog: libc::c_int = 128;
7883
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
7984
const backlog: libc::c_int = -1;
@@ -83,7 +88,8 @@ impl UnixListener {
8388
target_os = "linux",
8489
target_os = "freebsd",
8590
target_os = "openbsd",
86-
target_os = "espidf"
91+
target_os = "espidf",
92+
target_os = "horizon"
8793
)))]
8894
const backlog: libc::c_int = libc::SOMAXCONN;
8995

tests/rustdoc/issue-52873.rs tests/rustdoc-ui/ice-blanket-impl-52873.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// check-pass
2+
// https://github.com/rust-lang/rust/issues/52873
3+
#![crate_name="foo"]
4+
15
// Regression test for #52873. We used to ICE due to unexpected
26
// overflows when checking for "blanket impl inclusion".
37

tests/rustdoc/issue-55001.rs tests/rustdoc-ui/ice-blanket-impl-selection-55001.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// check-pass
2+
// https://github.com/rust-lang/rust/issues/55001
3+
#![crate_name="foo"]
4+
15
// Regression test for issue #55001. Previously, we would incorrectly
26
// cache certain trait selection results when checking for blanket impls,
37
// resulting in an ICE when we tried to confirm the cached ParamCandidate

tests/rustdoc/issue-50159.rs tests/rustdoc/auto-trait-bounds-by-associated-type-50159.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/50159
2+
#![crate_name="foo"]
3+
14
pub trait Signal {
25
type Item;
36
}
@@ -10,7 +13,7 @@ impl<B, C> Signal2 for B where B: Signal<Item = C> {
1013
type Item2 = C;
1114
}
1215

13-
// @has issue_50159/struct.Switch.html
16+
// @has foo/struct.Switch.html
1417
// @has - '//h3[@class="code-header"]' 'impl<B> Send for Switch<B>where <B as Signal>::Item: Send'
1518
// @has - '//h3[@class="code-header"]' 'impl<B> Sync for Switch<B>where <B as Signal>::Item: Sync'
1619
// @count - '//*[@id="implementations-list"]//*[@class="impl"]' 0

tests/rustdoc/issue-54705.rs tests/rustdoc/auto-trait-bounds-inference-variables-54705.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
// https://github.com/rust-lang/rust/issues/54705
2+
#![crate_name="foo"]
3+
14
pub trait ScopeHandle<'scope> {}
25

3-
// @has issue_54705/struct.ScopeFutureContents.html
6+
// @has foo/struct.ScopeFutureContents.html
47
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
58
// "impl<'scope, S> Send for ScopeFutureContents<'scope, S>where S: Sync"
69
//

tests/rustdoc/issue-51236.rs tests/rustdoc/auto-trait-bounds-where-51236.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/51236
2+
#![crate_name="foo"]
3+
14
use std::marker::PhantomData;
25

36
pub mod traits {
@@ -6,7 +9,7 @@ pub mod traits {
69
}
710
}
811

9-
// @has issue_51236/struct.Owned.html
12+
// @has foo/struct.Owned.html
1013
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
1114
// "impl<T> Send for Owned<T>where <T as Owned<'static>>::Reader: Send"
1215
pub struct Owned<T> where T: for<'a> ::traits::Owned<'a> {

tests/rustdoc/issue-55321.rs tests/rustdoc/auto-trait-negative-impl-55321.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
// https://github.com/rust-lang/rust/issues/55321
2+
#![crate_name="foo"]
3+
14
#![feature(negative_impls)]
25

3-
// @has issue_55321/struct.A.html
6+
// @has foo/struct.A.html
47
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
58
// "impl !Send for A"
69
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
@@ -10,7 +13,7 @@ pub struct A();
1013
impl !Send for A {}
1114
impl !Sync for A {}
1215

13-
// @has issue_55321/struct.B.html
16+
// @has foo/struct.B.html
1417
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
1518
// "impl<T> !Send for B<T>"
1619
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// https://github.com/rust-lang/rust/issues/47197
2+
#![crate_name="foo"]
3+
4+
// @has foo/fn.whose_woods_these_are_i_think_i_know.html
5+
6+
/**
7+
* snow
8+
9+
* ice
10+
*/
11+
pub fn whose_woods_these_are_i_think_i_know() {}

tests/rustdoc/issue-54478-demo-allocator.rs tests/rustdoc/demo-allocator-54478.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/54478
2+
#![crate_name="foo"]
3+
14
// Issue #54478: regression test showing that we can demonstrate
25
// `#[global_allocator]` in code blocks built by `rustdoc`.
36
//

tests/rustdoc/issue-35169-2.rs tests/rustdoc/deref-mut-35169-2.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/35169
2+
#![crate_name="foo"]
3+
14
use std::ops::Deref;
25
use std::ops::DerefMut;
36

@@ -23,7 +26,7 @@ impl DerefMut for Bar {
2326
fn deref_mut(&mut self) -> &mut Foo { loop {} }
2427
}
2528

26-
// @has issue_35169_2/struct.Bar.html
29+
// @has foo/struct.Bar.html
2730
// @has - '//*[@id="method.by_ref"]//h4[@class="code-header"]' 'fn by_ref(&self)'
2831
// @has - '//*[@id="method.by_ref"]' 'fn by_ref(&self)'
2932
// @has - '//*[@id="method.by_explicit_ref"]//h4[@class="code-header"]' 'fn by_explicit_ref(self: &Foo)'

tests/rustdoc/issue-35169.rs tests/rustdoc/deref-mut-35169.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/35169
2+
#![crate_name="foo"]
3+
14
use std::ops::Deref;
25

36
pub struct Foo;
@@ -18,7 +21,7 @@ impl Deref for Bar {
1821
fn deref(&self) -> &Foo { loop {} }
1922
}
2023

21-
// @has issue_35169/struct.Bar.html
24+
// @has foo/struct.Bar.html
2225
// @has - '//*[@id="method.by_ref"]//h4[@class="code-header"]' 'fn by_ref(&self)'
2326
// @has - '//*[@id="method.by_ref"]' 'fn by_ref(&self)'
2427
// @has - '//*[@id="method.by_explicit_ref"]//h4[@class="code-header"]' 'fn by_explicit_ref(self: &Foo)'

tests/rustdoc/issue-42760.rs tests/rustdoc/doc-attr-comment-mix-42760.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
// https://github.com/rust-lang/rust/issues/42760
2+
#![crate_name="foo"]
3+
14
#![allow(rustdoc::invalid_rust_codeblocks)]
25

3-
// @has issue_42760/struct.NonGen.html
6+
// @has foo/struct.NonGen.html
47
// @has - '//h2' 'Example'
58

69
/// Item docs.

tests/rustdoc/issue-41783.rs tests/rustdoc/doctest/doctest-escape-boring-41783.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// @has issue_41783/struct.Foo.html
1+
// https://github.com/rust-lang/rust/issues/41783
2+
#![crate_name="foo"]
3+
4+
// @has foo/struct.Foo.html
25
// @!hasraw - 'space'
36
// @!hasraw - 'comment'
47
// @hasraw - '<span class="attr">#[outer]'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// https://github.com/rust-lang/rust/issues/35488
2+
#![crate_name="foo"]
3+
4+
mod foo {
5+
pub enum Foo {
6+
Bar,
7+
}
8+
pub use self::Foo::*;
9+
}
10+
11+
// @has 'foo/index.html' '//code' 'pub use self::Foo::*;'
12+
// @has 'foo/enum.Foo.html'
13+
pub use self::foo::*;
14+
15+
// @has 'foo/index.html' '//code' 'pub use std::option::Option::None;'
16+
pub use std::option::Option::None;

tests/rustdoc/issue-53689.rs tests/rustdoc/impl-blanket-53689.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/53689
12
// aux-build:issue-53689.rs
23

34
#![crate_name = "foo"]

tests/rustdoc/issue-43869.rs tests/rustdoc/impl-trait-43869.rs

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/43869
2+
#![crate_name="foo"]
3+
14
pub fn g() -> impl Iterator<Item=u8> {
25
Some(1u8).into_iter()
36
}
@@ -58,15 +61,15 @@ pub fn test_44731_4() -> Box<Iterator<Item=impl Clone>> {
5861
Box::new(g())
5962
}
6063

61-
// @has issue_43869/fn.g.html
62-
// @has issue_43869/fn.h.html
63-
// @has issue_43869/fn.i.html
64-
// @has issue_43869/fn.j.html
65-
// @has issue_43869/fn.k.html
66-
// @has issue_43869/fn.l.html
67-
// @has issue_43869/fn.m.html
68-
// @has issue_43869/fn.n.html
69-
// @has issue_43869/fn.o.html
70-
// @has issue_43869/fn.test_44731_0.html
71-
// @has issue_43869/fn.test_44731_1.html
72-
// @has issue_43869/fn.test_44731_4.html
64+
// @has foo/fn.g.html
65+
// @has foo/fn.h.html
66+
// @has foo/fn.i.html
67+
// @has foo/fn.j.html
68+
// @has foo/fn.k.html
69+
// @has foo/fn.l.html
70+
// @has foo/fn.m.html
71+
// @has foo/fn.n.html
72+
// @has foo/fn.o.html
73+
// @has foo/fn.test_44731_0.html
74+
// @has foo/fn.test_44731_1.html
75+
// @has foo/fn.test_44731_4.html
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
// https://github.com/rust-lang/rust/issues/46727
2+
#![crate_name="foo"]
3+
14
// aux-build:issue-46727.rs
25

36
extern crate issue_46727;
47

5-
// @has issue_46727/trait.Foo.html
8+
// @has foo/trait.Foo.html
69
// @has - '//h3[@class="code-header"]' 'impl<T> Foo for Bar<[T; 3]>'
710
pub use issue_46727::{Foo, Bar};

tests/rustdoc/issue-55364.rs tests/rustdoc/intra-doc/module-scope-name-resolution-55364.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1+
// https://github.com/rust-lang/rust/issues/55364
2+
#![crate_name="foo"]
3+
14
// First a module with inner documentation
25

3-
// @has issue_55364/subone/index.html
6+
// @has foo/subone/index.html
47
// These foo/bar links in the module's documentation should refer inside `subone`
58
// @has - '//section[@id="main-content"]/details[@open=""]/div[@class="docblock"]//a[@href="fn.foo.html"]' 'foo'
69
// @has - '//section[@id="main-content"]/details[@open=""]/div[@class="docblock"]//a[@href="fn.bar.html"]' 'bar'
710
pub mod subone {
811
//! See either [foo] or [bar].
912
1013
// This should refer to subone's `bar`
11-
// @has issue_55364/subone/fn.foo.html
14+
// @has foo/subone/fn.foo.html
1215
// @has - '//section[@id="main-content"]/details/div[@class="docblock"]//a[@href="fn.bar.html"]' 'bar'
1316
/// See [bar]
1417
pub fn foo() {}
1518
// This should refer to subone's `foo`
16-
// @has issue_55364/subone/fn.bar.html
19+
// @has foo/subone/fn.bar.html
1720
// @has - '//section[@id="main-content"]/details/div[@class="docblock"]//a[@href="fn.foo.html"]' 'foo'
1821
/// See [foo]
1922
pub fn bar() {}
2023
}
2124

2225
// A module with outer documentation
2326

24-
// @has issue_55364/subtwo/index.html
27+
// @has foo/subtwo/index.html
2528
// These foo/bar links in the module's documentation should not reference inside `subtwo`
2629
// @!has - '//section[@id="main-content"]/div[@class="docblock"]//a[@href="fn.foo.html"]' 'foo'
2730
// @!has - '//section[@id="main-content"]/div[@class="docblock"]//a[@href="fn.bar.html"]' 'bar'
@@ -36,13 +39,13 @@ pub mod subtwo {
3639

3740
// Despite the module's docs referring to the top level foo/bar,
3841
// this should refer to subtwo's `bar`
39-
// @has issue_55364/subtwo/fn.foo.html
42+
// @has foo/subtwo/fn.foo.html
4043
// @has - '//section[@id="main-content"]/details/div[@class="docblock"]//a[@href="fn.bar.html"]' 'bar'
4144
/// See [bar]
4245
pub fn foo() {}
4346
// Despite the module's docs referring to the top level foo/bar,
4447
// this should refer to subtwo's `foo`
45-
// @has issue_55364/subtwo/fn.bar.html
48+
// @has foo/subtwo/fn.bar.html
4649
// @has - '//section[@id="main-content"]/details/div[@class="docblock"]//a[@href="fn.foo.html"]' 'foo'
4750
/// See [foo]
4851
pub fn bar() {}
@@ -57,7 +60,7 @@ pub fn bar() {}
5760

5861
// This module refers to the outer foo/bar by means of `super::`
5962

60-
// @has issue_55364/subthree/index.html
63+
// @has foo/subthree/index.html
6164
// This module should also refer to the top level foo/bar
6265
// @has - '//section[@id="main-content"]/details/div[@class="docblock"]//a[@href="../fn.foo.html"]' 'foo'
6366
// @has - '//section[@id="main-content"]/details/div[@class="docblock"]//a[@href="../fn.bar.html"]' 'bar'
@@ -67,7 +70,7 @@ pub mod subthree {
6770

6871
// Next we go *deeper* - In order to ensure it's not just "this or parent"
6972
// we test `crate::` and a `super::super::...` chain
70-
// @has issue_55364/subfour/subfive/subsix/subseven/subeight/index.html
73+
// @has foo/subfour/subfive/subsix/subseven/subeight/index.html
7174
// @has - '//section[@id="main-content"]/ul[@class="item-table"]//div[@class="desc docblock-short"]//a[@href="../../../../../subone/fn.foo.html"]' 'other foo'
7275
// @has - '//section[@id="main-content"]/ul[@class="item-table"]//div[@class="desc docblock-short"]//a[@href="../../../../../subtwo/fn.bar.html"]' 'other bar'
7376
pub mod subfour {

tests/rustdoc/issue-35488.rs

-13
This file was deleted.

tests/rustdoc/issue-46377.rs

-3
This file was deleted.

tests/rustdoc/issue-47197-blank-line-in-doc-block.rs

-8
This file was deleted.

tests/rustdoc/issue-46380-2.rs tests/rustdoc/public-impl-mention-private-generic-46380-2.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
// https://github.com/rust-lang/rust/issues/46380
2+
#![crate_name="foo"]
3+
14
pub trait PublicTrait<T> {}
25

3-
// @has issue_46380_2/struct.PublicStruct.html
6+
// @has foo/struct.PublicStruct.html
47
pub struct PublicStruct;
58

69
// @!has - '//*[@class="impl"]' 'impl PublicTrait<PrivateStruct> for PublicStruct'

tests/rustdoc/issue-53812.rs tests/rustdoc/sort-53812.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/53812
2+
#![crate_name="foo"]
3+
14
pub trait MyIterator {}
25

36
pub struct MyStruct<T>(T);
@@ -11,7 +14,7 @@ macro_rules! array_impls {
1114
}
1215
}
1316

14-
// @has issue_53812/trait.MyIterator.html
17+
// @has foo/trait.MyIterator.html
1518
// @has - '//*[@id="implementors-list"]/*[@class="impl"][1]' 'MyStruct<[T; 0]>'
1619
// @has - '//*[@id="implementors-list"]/*[@class="impl"][2]' 'MyStruct<[T; 1]>'
1720
// @has - '//*[@id="implementors-list"]/*[@class="impl"][3]' 'MyStruct<[T; 2]>'

tests/rustdoc/summary-header-46377.rs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/46377
2+
#![crate_name="foo"]
3+
4+
// @has 'foo/index.html' '//*[@class="desc docblock-short"]' 'Check out this struct!'
5+
/// # Check out this struct!
6+
pub struct SomeStruct;

0 commit comments

Comments
 (0)