1
Fork 0

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: /// // type parameters, ImplSource will carry resolutions for those as well:
/// concrete.clone(); // ImplSource(Impl_1, [ImplSource(Impl_2, [ImplSource(Impl_3)])]) /// 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 /// // Case B: ImplSource must be provided by caller. This applies when
/// // type is a type parameter. /// // type is a type parameter.
/// param.clone(); // ImplSource::Param /// param.clone(); // ImplSource::Param

View file

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

View file

@ -372,15 +372,11 @@ img {
} }
.sub-logo-container { .sub-logo-container {
display: none; display: block;
margin-right: 20px; margin-right: 20px;
} }
.source .sub-logo-container { .sub-logo-container > img {
display: block;
}
.source .sub-logo-container > img {
height: 60px; height: 60px;
width: 60px; width: 60px;
object-fit: contain; object-fit: contain;
@ -1716,12 +1712,6 @@ in storage.js plus the media query with (max-width: 700px)
margin-top: 16px; 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 { .source-sidebar-expanded .source .sidebar {
width: 300px; width: 300px;
} }
@ -2025,7 +2015,7 @@ in storage.js plus the media query with (min-width: 701px)
align-self: center; align-self: center;
} }
.source .sub-logo-container > img { .sub-logo-container > img {
height: 35px; height: 35px;
width: 35px; width: 35px;
} }

View file

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

View file

@ -1,4 +1,4 @@
// Note: this test is paired with logo-class.rs. // 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="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; 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[@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="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 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 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[@class="rust-logo"]' ''
pub struct SomeStruct; pub struct SomeStruct;

View file

@ -74,7 +74,11 @@ impl Config {
"--bind" => next_is_bind = true, "--bind" => next_is_bind = true,
"--sequential" => config.sequential = true, "--sequential" => config.sequential = true,
"--verbose" | "-v" => config.verbose = 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 { 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) { fn print_verbose(s: &str, conf: Config) {
if conf.verbose { if conf.verbose {
println!("{}", s); println!("{}", s);
@ -92,9 +112,8 @@ fn print_verbose(s: &str, conf: Config) {
} }
fn main() { fn main() {
println!("starting test server");
let config = Config::parse_args(); let config = Config::parse_args();
println!("starting test server");
let listener = t!(TcpListener::bind(config.bind)); let listener = t!(TcpListener::bind(config.bind));
let (work, tmp): (PathBuf, PathBuf) = if cfg!(target_os = "android") { let (work, tmp): (PathBuf, PathBuf) = if cfg!(target_os = "android") {