This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-20
lines changed Expand file tree Collapse file tree 3 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -33,24 +33,13 @@ format:
3333```
3434
3535This is how the documentation and examples assume you are running ` x.py ` .
36- Some alternative ways are:
37-
38- ``` sh
39- # On a Unix shell if you don't have the necessary `python3` command
40- ./x < subcommand> [flags]
41-
42- # On the Windows Command Prompt (if .py files are configured to run Python)
43- x.py < subcommand> [flags]
44-
45- # You can also run Python yourself, e.g.:
46- python x.py < subcommand> [flags]
47- ```
36+ See the [ rustc dev guide] [ rustcguidebuild ] if this does not work on your platform.
4837
4938More information about ` x.py ` can be found by running it with the ` --help ` flag
5039or reading the [ rustc dev guide] [ rustcguidebuild ] .
5140
5241[ gettingstarted ] : https://rustc-dev-guide.rust-lang.org/getting-started.html
53- [ rustcguidebuild ] : https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html
42+ [ rustcguidebuild ] : https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#what-is-xpy
5443
5544### Dependencies
5645
Original file line number Diff line number Diff line change @@ -160,10 +160,10 @@ pub fn check(
160160 for & ( name, _) in gate_untested. iter ( ) {
161161 println ! ( "Expected a gate test for the feature '{name}'." ) ;
162162 println ! (
163- "Hint: create a failing test file named 'feature-gate-{}.rs'\
164- \n in the 'ui' test suite, with its failures due to\
165- \n missing usage of `#![feature({})]`." ,
166- name, name
163+ "Hint: create a failing test file named 'tests/ui/ feature-gates/feature- gate-{}.rs', \
164+ \n with its failures due to missing usage of `#![feature({})]`." ,
165+ name . replace ( "_" , "-" ) ,
166+ name
167167 ) ;
168168 println ! (
169169 "Hint: If you already have such a test and don't want to rename it,\
Original file line number Diff line number Diff line change 55$ErrorActionPreference = " Stop"
66
77# syntax check
8- Get-Command - syntax ${PSCommandPath}
8+ Get-Command - syntax ${PSCommandPath} > $null
99
1010$xpy = Join-Path $PSScriptRoot x.py
1111# 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) {
1616}
1717
1818function Get-Application ($app ) {
19- return Get-Command $app - ErrorAction SilentlyContinue - CommandType Application
19+ $cmd = Get-Command $app - ErrorAction SilentlyContinue - CommandType Application | Select-Object - First 1
20+ if ($cmd.source -match ' .*AppData\\Local\\Microsoft\\WindowsApps\\.*exe' ) {
21+ # Windows for some reason puts a `python3.exe` executable in PATH that just opens the windows store.
22+ # Ignore it.
23+ return $false
24+ }
25+ return $cmd
2026}
2127
2228function Invoke-Application ($application , $arguments ) {
@@ -51,5 +57,7 @@ if (($null -ne $found) -and ($found.Length -ge 1)) {
5157 Invoke-Application $python $xpy_args
5258}
5359
54- Write-Error " ${PSCommandPath} : error: did not find python installed"
60+ $msg = " ${PSCommandPath} : error: did not find python installed`n "
61+ $msg += " help: consider installing it from https://www.python.org/downloads/"
62+ Write-Error $msg - Category NotInstalled
5563Exit 1
You can’t perform that action at this time.
0 commit comments