-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 6 pull requests #96202
Rollup of 6 pull requests #96202
Commits on Apr 15, 2022
-
Remove
--extern-location
and all associated code`--extern-location` was an experiment to investigate the best way to generate useful diagnostics for unused dependency warnings by enabling a build system to identify the corresponding build config. While I did successfully use this, I've since been convinced the alternative `--json unused-externs` mechanism is the way to go, and there's no point in having two mechanisms with basically the same functionality. This effectively reverts rust-lang#72603
Configuration menu - View commit details
-
Copy full SHA for 1be1157 - Browse repository at this point
Copy the full SHA 1be1157View commit details
Commits on Apr 16, 2022
-
alloc
: makevec!
unavailable underno_global_oom_handling
The `vec!` macro has 3 rules, but two are not usable under `no_global_oom_handling` builds of the standard library (even with a zero size): ```rust let _ = vec![42]; // Error: requires `exchange_malloc` lang_item. let _ = vec![42; 0]; // Error: cannot find function `from_elem`. ``` Thus those two rules should not be available to begin with. The remaining one, with an empty matcher, is just a shorthand for `new()` and may not make as much sense to have alone, since the idea behind `vec!` is to enable `Vec`s to be defined with the same syntax as array expressions. Furthermore, the documentation can be confusing since it shows the other rules. Thus perhaps it is better and simpler to disable `vec!` entirely under `no_global_oom_handling` environments, and let users call `new()` instead: ```rust let _: Vec<i32> = vec![]; let _: Vec<i32> = Vec::new(); ``` Notwithstanding this, a `try_vec!` macro would be useful, such as the one introduced in rust-lang#95051. If the shorthand for `new()` is deemed worth keeping on its own, then it may be interesting to have a separate `vec!` macro with a single rule and different, simpler documentation. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 8cec88b - Browse repository at this point
Copy the full SHA 8cec88bView commit details -
Provide a better diagnostic on failure to meet send bound on futures …
…in a foreign crate Adding diagnostic data on generators to the crate metadata and using it to provide a better diagnostic on failure to meet send bound on futures originated from a foreign crate
Configuration menu - View commit details
-
Copy full SHA for ebe3c56 - Browse repository at this point
Copy the full SHA ebe3c56View commit details
Commits on Apr 17, 2022
-
`CRATE_DEF_ID` and `CrateNum::as_def_id` are almost always what we want.
Configuration menu - View commit details
-
Copy full SHA for 07ee031 - Browse repository at this point
Copy the full SHA 07ee031View commit details
Commits on Apr 18, 2022
-
Define a dedicated error type for
HandleOrNull
andHandleOrInvalid
.Define a `NotHandle` type, that implements `std::error::Error`, and use it as the error type in `HandleOrNull` and `HandleOrInvalid`.
Configuration menu - View commit details
-
Copy full SHA for 703a336 - Browse repository at this point
Copy the full SHA 703a336View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b3023c - Browse repository at this point
Copy the full SHA 5b3023cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 67994b7 - Browse repository at this point
Copy the full SHA 67994b7View commit details -
Split
NotHandle
intoNullHandleError
andInvalidHandleError
.Also, make the display messages more specific, and remove the `Copy` implementation.
Configuration menu - View commit details
-
Copy full SHA for f934043 - Browse repository at this point
Copy the full SHA f934043View commit details -
Configuration menu - View commit details
-
Copy full SHA for 890125d - Browse repository at this point
Copy the full SHA 890125dView commit details -
Update the expected stderr for coerce-issue-49593-box-never.
This test's expected stderr now includes a count of the number of types that implment `Error`. This PR introduces two new types, so increment the number by two.
Configuration menu - View commit details
-
Copy full SHA for b7ff103 - Browse repository at this point
Copy the full SHA b7ff103View commit details
Commits on Apr 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 19ef182 - Browse repository at this point
Copy the full SHA 19ef182View commit details -
Improve AddrParseError description
The existing description was incorrect for socket addresses, and misleading: users would see “invalid IP address syntax” and suppose they were supposed to provide an IP address rather than a socket address. I contemplated making it two variants (IP, socket), but realised we can do still better for the IPv4 and IPv6 types, so here it is as six. I contemplated more precise error descriptions (e.g. “invalid IPv6 socket address syntax: expected a decimal scope ID after %”), but that’s a more invasive change, and probably not worthwhile anyway.
Configuration menu - View commit details
-
Copy full SHA for 0255398 - Browse repository at this point
Copy the full SHA 0255398View commit details -
Rollup merge of rust-lang#94493 - oribenshir:feature/ISSUE-78543_asyn…
…c_fn_in_foreign_crate_diag_2, r=davidtwco Improved diagnostic on failure to meet send bound on future in a foreign crate Provide a better diagnostic on failure to meet send bound on futures in a foreign crate. fixes rust-lang#78543
Configuration menu - View commit details
-
Copy full SHA for a857380 - Browse repository at this point
Copy the full SHA a857380View commit details -
Rollup merge of rust-lang#96086 - jsgf:remove-extern-location, r=davi…
…dtwco Remove `--extern-location` and all associated code `--extern-location` was an experiment to investigate the best way to generate useful diagnostics for unused dependency warnings by enabling a build system to identify the corresponding build config. While I did successfully use this, I've since been convinced the alternative `--json unused-externs` mechanism is the way to go, and there's no point in having two mechanisms with basically the same functionality. This effectively reverts rust-lang#72603
Configuration menu - View commit details
-
Copy full SHA for 47ad09c - Browse repository at this point
Copy the full SHA 47ad09cView commit details -
Rollup merge of rust-lang#96089 - ojeda:no-vec-no_global_oom_handling…
…, r=Mark-Simulacrum `alloc`: make `vec!` unavailable under `no_global_oom_handling` `alloc`: make `vec!` unavailable under `no_global_oom_handling` The `vec!` macro has 3 rules, but two are not usable under `no_global_oom_handling` builds of the standard library (even with a zero size): ```rust let _ = vec![42]; // Error: requires `exchange_malloc` lang_item. let _ = vec![42; 0]; // Error: cannot find function `from_elem`. ``` Thus those two rules should not be available to begin with. The remaining one, with an empty matcher, is just a shorthand for `new()` and may not make as much sense to have alone, since the idea behind `vec!` is to enable `Vec`s to be defined with the same syntax as array expressions. Furthermore, the documentation can be confusing since it shows the other rules. Thus perhaps it is better and simpler to disable `vec!` entirely under `no_global_oom_handling` environments, and let users call `new()` instead: ```rust let _: Vec<i32> = vec![]; let _: Vec<i32> = Vec::new(); ``` Notwithstanding this, a `try_vec!` macro would be useful, such as the one introduced in rust-lang#95051. If the shorthand for `new()` is deemed worth keeping on its own, then it may be interesting to have a separate `vec!` macro with a single rule and different, simpler documentation. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 58982f5 - Browse repository at this point
Copy the full SHA 58982f5View commit details -
Rollup merge of rust-lang#96142 - cjgillot:no-crate-def-index, r=petr…
…ochenkov Stop using CRATE_DEF_INDEX outside of metadata encoding. `CRATE_DEF_ID` and `CrateNum::as_def_id` are almost always what we want. We should not manipulate raw `DefIndex` outside of metadata encoding.
Configuration menu - View commit details
-
Copy full SHA for 23ed99b - Browse repository at this point
Copy the full SHA 23ed99bView commit details -
Rollup merge of rust-lang#96168 - chris-morgan:AddrParseError-descrip…
…tion-improvements, r=joshtriplett Improve AddrParseError description The existing description was incorrect for socket addresses, and misleading: users would see “invalid IP address syntax” and suppose they were supposed to provide an IP address rather than a socket address. I contemplated making it two variants (IP, socket), but realised we can do still better for the IPv4 and IPv6 types, so here it is as six. I contemplated more precise error descriptions (e.g. “invalid IPv6 socket address syntax: expected a decimal scope ID after %”), but that’s a more invasive change, and probably not worthwhile anyway.
Configuration menu - View commit details
-
Copy full SHA for 8417ba8 - Browse repository at this point
Copy the full SHA 8417ba8View commit details -
Rollup merge of rust-lang#96195 - sunfishcode:sunfishcode/handle-or-e…
…rror-type, r=joshtriplett Define a dedicated error type for `HandleOrNull` and `HandleOrInvalid`. Define `NullHandleError` and `InvalidHandleError` types, that implement std::error::Error, and use them as the error types in `HandleOrNull` and `HandleOrInvalid`, This addresses [this concern](rust-lang#87074 (comment)). This is the same as rust-lang#95387. r? `@joshtriplett`
Configuration menu - View commit details
-
Copy full SHA for c6114bb - Browse repository at this point
Copy the full SHA c6114bbView commit details