Auto merge of #113014 - matthiaskrgr:rollup-dasfmfc, r=matthiaskrgr

Rollup of 5 pull requests

Successful merges:

 - #112937 (rustdoc: Align search results horizontally for easy scanning)
 - #112950 (DirEntry::file_name: improve explanation)
 - #112956 (Expose `compiler-builtins-weak-intrinsics` feature for `-Zbuild-std`)
 - #113008 (Move some docs from the README to the dev-guide)
 - #113009 (Remove unnecessary `path` attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2023-06-25 02:08:04 +00:00
commit 7b9b127700
11 changed files with 34 additions and 26 deletions

View File

@ -33,24 +33,13 @@ format:
```
This is how the documentation and examples assume you are running `x.py`.
Some alternative ways are:
```sh
# On a Unix shell if you don't have the necessary `python3` command
./x <subcommand> [flags]
# On the Windows Command Prompt (if .py files are configured to run Python)
x.py <subcommand> [flags]
# You can also run Python yourself, e.g.:
python x.py <subcommand> [flags]
```
See the [rustc dev guide][rustcguidebuild] if this does not work on your platform.
More information about `x.py` can be found by running it with the `--help` flag
or reading the [rustc dev guide][rustcguidebuild].
[gettingstarted]: https://rustc-dev-guide.rust-lang.org/getting-started.html
[rustcguidebuild]: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html
[rustcguidebuild]: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#what-is-xpy
### Dependencies

View File

@ -35,3 +35,4 @@ compiler-builtins-mem = ['compiler_builtins/mem']
compiler-builtins-c = ["compiler_builtins/c"]
compiler-builtins-no-asm = ["compiler_builtins/no-asm"]
compiler-builtins-mangled-names = ["compiler_builtins/mangled-names"]
compiler-builtins-weak-intrinsics = ["compiler_builtins/weak-intrinsics"]

View File

@ -65,6 +65,7 @@ compiler-builtins-c = ["alloc/compiler-builtins-c"]
compiler-builtins-mem = ["alloc/compiler-builtins-mem"]
compiler-builtins-no-asm = ["alloc/compiler-builtins-no-asm"]
compiler-builtins-mangled-names = ["alloc/compiler-builtins-mangled-names"]
compiler-builtins-weak-intrinsics = ["alloc/compiler-builtins-weak-intrinsics"]
llvm-libunwind = ["unwind/llvm-libunwind"]
system-llvm-libunwind = ["unwind/system-llvm-libunwind"]

View File

@ -1755,8 +1755,14 @@ impl DirEntry {
self.0.file_type().map(FileType)
}
/// Returns the bare file name of this directory entry without any other
/// leading path component.
/// Returns the file name of this directory entry without any
/// leading path component(s).
///
/// As an example,
/// the output of the function will result in "foo" for all the following paths:
/// - "./foo"
/// - "/the/foo"
/// - "../../foo"
///
/// # Examples
///

View File

@ -12,7 +12,6 @@ use crate::os::windows::io::{AsRawHandle, BorrowedHandle};
use crate::ptr;
use core::ffi::NonZero_c_ulong;
#[path = "c/windows_sys.rs"] // c.rs is included from two places so we need to specify this
mod windows_sys;
pub use windows_sys::*;

View File

@ -17,6 +17,7 @@ compiler-builtins-c = ["std/compiler-builtins-c"]
compiler-builtins-mem = ["std/compiler-builtins-mem"]
compiler-builtins-no-asm = ["std/compiler-builtins-no-asm"]
compiler-builtins-mangled-names = ["std/compiler-builtins-mangled-names"]
compiler-builtins-weak-intrinsics = ["std/compiler-builtins-weak-intrinsics"]
llvm-libunwind = ["std/llvm-libunwind"]
system-llvm-libunwind = ["std/system-llvm-libunwind"]
panic-unwind = ["std/panic_unwind"]

View File

@ -891,8 +891,10 @@ so that we can apply CSS-filters to change the arrow color in themes */
color: var(--search-results-grey-color);
}
.search-results .result-name .typename {
display: inline-block;
color: var(--search-results-grey-color);
font-size: 0.875rem;
width: 6.25rem;
}
.popover {

View File

@ -52,9 +52,9 @@ const longItemTypes = [
"enum variant",
"macro",
"primitive type",
"associated type",
"assoc type",
"constant",
"associated constant",
"assoc const",
"union",
"foreign type",
"keyword",

View File

@ -160,10 +160,10 @@ pub fn check(
for &(name, _) in gate_untested.iter() {
println!("Expected a gate test for the feature '{name}'.");
println!(
"Hint: create a failing test file named 'feature-gate-{}.rs'\
\n in the 'ui' test suite, with its failures due to\
\n missing usage of `#![feature({})]`.",
name, name
"Hint: create a failing test file named 'tests/ui/feature-gates/feature-gate-{}.rs',\
\n with its failures due to missing usage of `#![feature({})]`.",
name.replace("_", "-"),
name
);
println!(
"Hint: If you already have such a test and don't want to rename it,\

View File

@ -14,7 +14,8 @@ set-window-size: (600, 100)
assert-size: (".search-results div.desc", {"width": 566})
// The result set is all on one line.
assert-css: (".search-results .result-name > span", {"display": "inline"})
assert-css: (".search-results .result-name > span:not(.typename)", {"display": "inline"})
assert-css: (".search-results .result-name > span.typename", {"display": "inline-block"})
// Check that the crate filter `<select>` is correctly handled when it goes to next line.
// To do so we need to update the length of one of its `<option>`.

14
x.ps1
View File

@ -5,7 +5,7 @@
$ErrorActionPreference = "Stop"
# syntax check
Get-Command -syntax ${PSCommandPath}
Get-Command -syntax ${PSCommandPath} >$null
$xpy = Join-Path $PSScriptRoot x.py
# Start-Process for some reason splits arguments on spaces. (Isn't powershell supposed to be simpler than bash?)
@ -16,7 +16,13 @@ foreach ($arg in $args) {
}
function Get-Application($app) {
return Get-Command $app -ErrorAction SilentlyContinue -CommandType Application
$cmd = Get-Command $app -ErrorAction SilentlyContinue -CommandType Application | Select-Object -First 1
if ($cmd.source -match '.*AppData\\Local\\Microsoft\\WindowsApps\\.*exe') {
# Windows for some reason puts a `python3.exe` executable in PATH that just opens the windows store.
# Ignore it.
return $false
}
return $cmd
}
function Invoke-Application($application, $arguments) {
@ -51,5 +57,7 @@ if (($null -ne $found) -and ($found.Length -ge 1)) {
Invoke-Application $python $xpy_args
}
Write-Error "${PSCommandPath}: error: did not find python installed"
$msg = "${PSCommandPath}: error: did not find python installed`n"
$msg += "help: consider installing it from https://www.python.org/downloads/"
Write-Error $msg -Category NotInstalled
Exit 1