-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 9 pull requests #99024
Rollup of 9 pull requests #99024
Commits on Jun 9, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0503bc0 - Browse repository at this point
Copy the full SHA 0503bc0View commit details
Commits on Jun 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5d32f31 - Browse repository at this point
Copy the full SHA 5d32f31View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb783d9 - Browse repository at this point
Copy the full SHA eb783d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b13af73 - Browse repository at this point
Copy the full SHA b13af73View commit details
Commits on Jul 6, 2022
-
interpret: use AllocRange in UninitByteAccess
also use nice new format string syntax in interpret/error.rs
Configuration menu - View commit details
-
Copy full SHA for 27b7b3d - Browse repository at this point
Copy the full SHA 27b7b3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for deaa92b - Browse repository at this point
Copy the full SHA deaa92bView commit details
Commits on Jul 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2a0e659 - Browse repository at this point
Copy the full SHA 2a0e659View commit details -
implement detail_exit but I'm not sure it is right. not create new file and write detail exit in lib.rs replace std::process::exit to detail_exit that is not related to code runnning. remove pub
Configuration menu - View commit details
-
Copy full SHA for d6de276 - Browse repository at this point
Copy the full SHA d6de276View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f0ccdf - Browse repository at this point
Copy the full SHA 2f0ccdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for a80bb5b - Browse repository at this point
Copy the full SHA a80bb5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 111df9e - Browse repository at this point
Copy the full SHA 111df9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d96d541 - Browse repository at this point
Copy the full SHA d96d541View commit details -
Rollup merge of rust-lang#97917 - AronParker:master, r=ChrisDenton
Implement ExitCodeExt for Windows Fixes rust-lang#97914 ### Motivation: On Windows it is common for applications to return `HRESULT` (`i32`) or `DWORD` (`u32`) values. These stem from COM based components ([HRESULTS](https://docs.microsoft.com/en-us/windows/win32/api/objbase/nf-objbase-coinitialize)), Win32 errors ([GetLastError](https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror)), GUI applications ([WM_QUIT](https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-quit)) and more. The newly stabilized `ExitCode` provides an excellent fit for propagating these values, because `std::process::exit` does not run deconstructors which can result in errors. However, `ExitCode` currently only implements `From<u8> for ExitCode`, which disallows the full range of `i32`/`u32` values. This pull requests attempts to address that shortcoming by providing windows specific extensions that accept a `u32` value (which covers all possible `HRESULTS` and Win32 errors) analog to [ExitStatusExt::from_raw](https://doc.rust-lang.org/std/os/windows/process/trait.ExitStatusExt.html#tymethod.from_raw). This was also intended by the original Stabilization rust-lang#93840 (comment) as pointed out by ``@eggyal`` in rust-lang#97914 (comment): > Issues around platform specific representations: We resolved this issue by changing the return type of report from i32 to the opaque type ExitCode. __That way we can change the underlying representation without affecting the API, letting us offer full support for platform specific exit code APIs in the future.__ [Emphasis added] ### API ```rust /// Windows-specific extensions to [`process::ExitCode`]. /// /// This trait is sealed: it cannot be implemented outside the standard library. /// This is so that future additional methods are not breaking changes. #[stable(feature = "windows_process_exit_code_from", since = "1.63.0")] pub trait ExitCodeExt: Sealed { /// Creates a new `ExitCode` from the raw underlying `u32` return value of /// a process. #[stable(feature = "windows_process_exit_code_from", since = "1.63.0")] fn from_raw(raw: u32) -> Self; } #[stable(feature = "windows_process_exit_code_from", since = "1.63.0")] impl ExitCodeExt for process::ExitCode { fn from_raw(raw: u32) -> Self { process::ExitCode::from_inner(From::from(raw)) } } ``` ### Misc I apologize in advance if I misplaced any attributes regarding stabilzation, as far as I learned traits are insta-stable so I chose to make them stable. If this is an error, please let me know and I'll correct it. I also added some additional machinery to make it work, analog to [ExitStatus](https://doc.rust-lang.org/std/process/struct.ExitStatus.html#). EDIT: Proposal: rust-lang/libs-team#48
Configuration menu - View commit details
-
Copy full SHA for 6826f33 - Browse repository at this point
Copy the full SHA 6826f33View commit details -
Rollup merge of rust-lang#98844 - cjgillot:deep-visit, r=jyn514
Reword comments and rename HIR visiting methods. Sparked by this discussion in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Confused.20by.20comment.20on.20.60deep_visit_item_likes_in_module.60) r? ``@jyn514`` ``@camsteffen``
Configuration menu - View commit details
-
Copy full SHA for 8cc6bb3 - Browse repository at this point
Copy the full SHA 8cc6bb3View commit details -
Rollup merge of rust-lang#98979 - RalfJung:more-alloc-range, r=oli-obk
interpret: use AllocRange in UninitByteAccess also use nice new format string syntax in `interpret/error.rs`, and use the `#` flag to add `0x` prefixes where applicable. r? ``@oli-obk``
Configuration menu - View commit details
-
Copy full SHA for 9064147 - Browse repository at this point
Copy the full SHA 9064147View commit details -
Rollup merge of rust-lang#98986 - pierwill:patch-5, r=oli-obk
Fix missing word in comment
Configuration menu - View commit details
-
Copy full SHA for b4f8537 - Browse repository at this point
Copy the full SHA b4f8537View commit details -
Rollup merge of rust-lang#98994 - kons-9:dont_use_process_exit, r=jyn514
replace process exit with more detailed exit in src/bootstrap/*.rs Fixes [rust-lang#98830](rust-lang#98830) I implemeted "detail_exit.rs" in lib.rs, and replace all of std::process::exit. So, error code should panic in test code. ``` // lib.rs pub fn detail_exit(code: i32) -> ! { // Successful exit if code == 0 { std::process::exit(0); } if cfg!(test) { panic!("status code: {}", code); } else { std::panic::resume_unwind(Box::new(code)); } } ``` <details> <summary>% rg "exit\(" src/bootstrap/*.rs</summary> ``` builder.rs 351: crate::detail_exit(1); 1000: crate::detail_exit(1); 1429: crate::detail_exit(1); compile.rs 1331: crate::detail_exit(1); config.rs 818: crate::detail_exit(2); 1488: crate::detail_exit(1); flags.rs 263: crate::detail_exit(exit_code); 349: crate::detail_exit(exit_code); 381: crate::detail_exit(1); 602: crate::detail_exit(1); 616: crate::detail_exit(1); 807: crate::detail_exit(1); format.rs 35: crate::detail_exit(1); 117: crate::detail_exit(1); lib.rs 714: detail_exit(1); 1620: detail_exit(1); 1651:pub fn detail_exit(code: i32) -> ! { 1654: std::process::exit(0); sanity.rs 107: crate::detail_exit(1); setup.rs 97: crate::detail_exit(1); 290: crate::detail_exit(1); test.rs 676: crate::detail_exit(1); 1024: crate::detail_exit(1); 1254: crate::detail_exit(1); tool.rs 207: crate::detail_exit(1); toolstate.rs 96: crate::detail_exit(3); 111: crate::detail_exit(1); 182: crate::detail_exit(1); 228: crate::detail_exit(1); util.rs 339: crate::detail_exit(1); 378: crate::detail_exit(1); 468: crate::detail_exit(1); ``` </details>
Configuration menu - View commit details
-
Copy full SHA for 6742dc4 - Browse repository at this point
Copy the full SHA 6742dc4View commit details -
Rollup merge of rust-lang#98995 - TaKO8Ki:add-test-for-80471, r=Mark-…
…Simulacrum Add a test for rust-lang#80471 Tests rust-lang#80471, but doesn't close it, see rust-lang#80471 (comment).
Configuration menu - View commit details
-
Copy full SHA for d0e6155 - Browse repository at this point
Copy the full SHA d0e6155View commit details -
Rollup merge of rust-lang#99002 - fee1-dead-contrib:sugg_derive, r=mi…
…chaelwoerister suggest adding a derive for #[default] applied to variants cc ``@TaKO8Ki`` as followup to rust-lang#98873.
Configuration menu - View commit details
-
Copy full SHA for 7fed4ff - Browse repository at this point
Copy the full SHA 7fed4ffView commit details -
Rollup merge of rust-lang#99004 - TaKO8Ki:add-test-for-70408, r=Mark-…
…Simulacrum Add a test for rust-lang#70408 closes rust-lang#70408
Configuration menu - View commit details
-
Copy full SHA for 16ad2f5 - Browse repository at this point
Copy the full SHA 16ad2f5View commit details -
Rollup merge of rust-lang#99017 - GuillaumeGomez:rustdoc-ending-enum,…
… r=notriddle Replace boolean argument for print_where_clause with an enum to make code more clear As you suggested ``@notriddle.`` Just not sure if the naming seems good to you? r? ``@notriddle``
Configuration menu - View commit details
-
Copy full SHA for ec0c156 - Browse repository at this point
Copy the full SHA ec0c156View commit details