Auto merge of #103145 - matthiaskrgr:rollup-mxwsysv, r=matthiaskrgr

Rollup of 4 pull requests

Successful merges:

 - #102962 (remote-test-server: Show command line arguments)
 - #103129 (rustdoc: remove unused `.sub-logo-container` DOM on non-source pages)
 - #103136 (Fix types in documentation for `Alignment::as_usize` and `Alignmnet::as_nonzero`)
 - #103139 (Duplicate comment in mod.rs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2022-10-17 11:33:40 +00:00
commit abd7744101
7 changed files with 32 additions and 26 deletions

View File

@ -598,11 +598,6 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;
/// // type parameters, ImplSource will carry resolutions for those as well:
/// concrete.clone(); // ImplSource(Impl_1, [ImplSource(Impl_2, [ImplSource(Impl_3)])])
///
/// // Case A: ImplSource points at a specific impl. Only possible when
/// // type is concretely known. If the impl itself has bounded
/// // type parameters, ImplSource will carry resolutions for those as well:
/// concrete.clone(); // ImplSource(Impl_1, [ImplSource(Impl_2, [ImplSource(Impl_3)])])
///
/// // Case B: ImplSource must be provided by caller. This applies when
/// // type is a type parameter.
/// param.clone(); // ImplSource::Param

View File

@ -83,7 +83,7 @@ impl Alignment {
unsafe { mem::transmute::<usize, Alignment>(align) }
}
/// Returns the alignment as a [`NonZeroUsize`]
/// Returns the alignment as a [`usize`]
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
#[rustc_const_unstable(feature = "ptr_alignment_type", issue = "102070")]
#[inline]
@ -91,7 +91,7 @@ impl Alignment {
self.0 as usize
}
/// Returns the alignment as a [`usize`]
/// Returns the alignment as a [`NonZeroUsize`]
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
#[inline]
pub const fn as_nonzero(self) -> NonZeroUsize {

View File

@ -372,15 +372,11 @@ img {
}
.sub-logo-container {
display: none;
display: block;
margin-right: 20px;
}
.source .sub-logo-container {
display: block;
}
.source .sub-logo-container > img {
.sub-logo-container > img {
height: 60px;
width: 60px;
object-fit: contain;
@ -1716,12 +1712,6 @@ in storage.js plus the media query with (max-width: 700px)
margin-top: 16px;
}
/* When we expand the sidebar on the source code page, we hide the logo on the left of the
search bar to have more space. */
.source-sidebar-expanded .source .sidebar + main .width-limiter .sub-logo-container.rust-logo {
display: none;
}
.source-sidebar-expanded .source .sidebar {
width: 300px;
}
@ -2025,7 +2015,7 @@ in storage.js plus the media query with (min-width: 701px)
align-self: center;
}
.source .sub-logo-container > img {
.sub-logo-container > img {
height: 35px;
width: 35px;
}

View File

@ -103,6 +103,7 @@
<main> {#- -#}
<div class="width-limiter"> {#- -#}
<div class="sub-container"> {#- -#}
{%- if page.css_class == "source" -%}
<a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
{%- if !layout.logo.is_empty() %}
<img src="{{layout.logo}}" alt="logo"> {#- -#}
@ -110,6 +111,7 @@
<img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#}
{%- endif -%}
</a> {#- -#}
{%- endif -%}
<nav class="sub"> {#- -#}
<form class="search-form"> {#- -#}
<div class="search-container"> {#- -#}

View File

@ -1,4 +1,4 @@
// Note: this test is paired with logo-class.rs.
// @has logo_class_default/struct.SomeStruct.html '//*[@class="logo-container"]/img[@class="rust-logo"]' ''
// @has logo_class_default/struct.SomeStruct.html '//*[@class="sub-logo-container"]/img[@class="rust-logo"]' ''
// @has src/logo_class_default/logo-class-default.rs.html '//*[@class="sub-logo-container"]/img[@class="rust-logo"]' ''
pub struct SomeStruct;

View File

@ -5,6 +5,6 @@
// @has logo_class/struct.SomeStruct.html '//*[@class="logo-container"]/img[@src="https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png"]' ''
// @!has logo_class/struct.SomeStruct.html '//*[@class="logo-container"]/img[@class="rust-logo"]' ''
//
// @has logo_class/struct.SomeStruct.html '//*[@class="sub-logo-container"]/img[@src="https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png"]' ''
// @!has logo_class/struct.SomeStruct.html '//*[@class="sub-logo-container"]/img[@class="rust-logo"]' ''
// @has src/logo_class/logo-class.rs.html '//*[@class="sub-logo-container"]/img[@src="https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png"]' ''
// @!has src/logo_class/logo-class.rs.html '//*[@class="sub-logo-container"]/img[@class="rust-logo"]' ''
pub struct SomeStruct;

View File

@ -74,7 +74,11 @@ impl Config {
"--bind" => next_is_bind = true,
"--sequential" => config.sequential = true,
"--verbose" | "-v" => config.verbose = true,
arg => panic!("unknown argument: {}", arg),
"--help" | "-h" => {
show_help();
std::process::exit(0);
}
arg => panic!("unknown argument: {}, use `--help` for known arguments", arg),
}
}
if next_is_bind {
@ -85,6 +89,22 @@ impl Config {
}
}
fn show_help() {
eprintln!(
r#"Usage:
{} [OPTIONS]
OPTIONS:
--bind <IP>:<PORT> Specify IP address and port to listen for requests, e.g. "0.0.0.0:12345"
--sequential Run only one test at a time
-v, --verbose Show status messages
-h, --help Show this help screen
"#,
std::env::args().next().unwrap()
);
}
fn print_verbose(s: &str, conf: Config) {
if conf.verbose {
println!("{}", s);
@ -92,9 +112,8 @@ fn print_verbose(s: &str, conf: Config) {
}
fn main() {
println!("starting test server");
let config = Config::parse_args();
println!("starting test server");
let listener = t!(TcpListener::bind(config.bind));
let (work, tmp): (PathBuf, PathBuf) = if cfg!(target_os = "android") {