-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 5 pull requests #113878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 5 pull requests #113878
Conversation
Signed-off-by: WANG Rui <[email protected]>
In the current documentation, it's not specified that when creating a Command, the .exe extension can be omitted for Windows executables. However, for other types of executable files like .bat or .cmd, the complete filename including the extension must be provided. I encountered it by noticing that `Command::new("wt").spawn().unwrap()` succeeds on my machine while `Command::new("code").spawn().unwrap()` panics. Turns out VS Code's entrypoint is .cmd file. `resolve_exe` method mentions this behaviour in a comment[1], but it makes sense to mention it at more visible place. I've added this clarification to the documentation, which should make it more accurate and helpful for Rust developers working on the Windows platform. [1] https://github.com/rust-lang/rust/blob/e7fda447e7d05b6ca431fc8fe8f489b1fda810bc/library/std/src/sys/windows/process.rs#L425
Fix rpath for libdir is specified ## What does this PR try to resolve? When building the Rust toolchain with `--libdir=lib64`, the executable tools such as `rustc` cannot find shared libraries. ```bash ./configure --prefix=/ --libdir=lib64 DESTDIR=/tmp/rust ./x.py install ``` ``` $ /tmp/rust/bin/rustc rustc: error while loading shared libraries: librustc_driver-13f1fd1bc7f7000d.so: cannot open shared object file: No such file or directory ``` This issue is caused by the link args `-Wl,rpath` being different from `--libdir`. ``` $ readelf -d /tmp/rust/bin/rustc | grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/../lib] ``` ## How to resolve? When setting the rpath, get it from sysroot libdir relative path. After this patch: ``` $ readelf -d /tmp/rust/bin/rustc | grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/../lib64] ```
…s-docs, r=ChrisDenton Update documentation for std::process::Command's new method In the current documentation, it's not specified that when creating a Command, the .exe extension can be omitted for Windows executables. However, for other types of executable files like .bat or .cmd, the complete filename including the extension must be provided. I encountered it by noticing that `Command::new("wt").spawn().unwrap()` succeeds on my machine while `Command::new("code").spawn().unwrap()` panics. Turns out VS Code's entrypoint is .cmd file. `resolve_exe` method mentions this behaviour in [a comment](https://github.com/rust-lang/rust/blob/e7fda447e7d05b6ca431fc8fe8f489b1fda810bc/library/std/src/sys/windows/process.rs#L425), but it makes sense to mention it at a more visible place. I've added this clarification to the documentation, which should make it more accurate and helpful for Rust developers working on the Windows platform.
Properly document `lifetime_mapping` in `OpaqueTy` Also use an `Option` to signify that the value is actually present, instead of just no captured lifetimes.
…ms-test, r=notriddle Add tests for `--document-hidden-items` option Since `--document-hidden-items` was greatly fixed/improved in rust-lang#113574, thought it might be worth adding some more tests for it to prevent new regressions. As for the first commit, it allows to go from: ``` Traceback (most recent call last): File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 706, in <module> check(sys.argv[1], get_commands(rust_test_path)) File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 689, in check for c in commands: File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 274, in get_commands args = shlex.split(args) File "/usr/lib/python3.10/shlex.py", line 315, in split return list(lex) File "/usr/lib/python3.10/shlex.py", line 300, in __next__ token = self.get_token() File "/usr/lib/python3.10/shlex.py", line 109, in get_token raw = self.read_token() File "/usr/lib/python3.10/shlex.py", line 191, in read_token raise ValueError("No closing quotation") ValueError: No closing quotation ``` to: ``` Traceback (most recent call last): File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 708, in <module> check(sys.argv[1], get_commands(rust_test_path)) File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 691, in check for c in commands: File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 278, in get_commands raise Exception("line {}: {}".format(lineno + 1, exc)) from None Exception: line 57: No closing quotation ``` Having the line where the error occurred is quite useful. r? `@notriddle`
…iler-errors Use the correct span for displaying the line following a derive sugge… `span` here is the main span of the diagnostic. In the linked issue's case, this belongs to `main.rs`. However, the line numbers (and line we are trying to display) are in `name.rs`, so using `span_to_lines` gives us the wrong `FileLines`. Use `parts[0].span` (the span of the suggestion) here like the rest of the code does to get the right file. Not sure if this needs a dedicated test because this fixes an existing error in the UI suite Fixes rust-lang#113844
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 0646a5d1aa In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (c67cb3e): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 649.782s -> 649.877s (0.01%) |
Successful merges:
lifetime_mapping
inOpaqueTy
#113795 (Properly documentlifetime_mapping
inOpaqueTy
)--document-hidden-items
option #113857 (Add tests for--document-hidden-items
option)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup