-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #72416
Rollup of 9 pull requests #72416
Commits on May 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 68f89fc - Browse repository at this point
Copy the full SHA 68f89fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e12a9d - Browse repository at this point
Copy the full SHA 0e12a9dView commit details
Commits on May 11, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 1899afa - Browse repository at this point
Copy the full SHA 1899afaView commit details
Commits on May 18, 2020
-
librustc_mir: Add support for const fn offset/arith_offset
Miri's pointer_offset_inbounds implementation has been moved into librustc_mir as ptr_offset_inbounds (to avoid breaking miri on a nightly update). The comments have been slightly reworked to better match `offset`'s external documentation about what causes UB. The intrinsic implementations are taken directly from miri. Signed-off-by: Joe Richey <joerichey@google.com>
Configuration menu - View commit details
-
Copy full SHA for 7d2f64b - Browse repository at this point
Copy the full SHA 7d2f64bView commit details -
core: Make pointer offset methods "const fn"
Signed-off-by: Joe Richey <joerichey@google.com>
Configuration menu - View commit details
-
Copy full SHA for 1711d08 - Browse repository at this point
Copy the full SHA 1711d08View commit details -
test/ui/consts: Add tests for const ptr offsets
Signed-off-by: Joe Richey <joerichey@google.com>
Configuration menu - View commit details
-
Copy full SHA for db56719 - Browse repository at this point
Copy the full SHA db56719View commit details
Commits on May 19, 2020
-
miri_unleached: We now allow offset in const fn
Signed-off-by: Joe Richey <joerichey@google.com>
Configuration menu - View commit details
-
Copy full SHA for 0927917 - Browse repository at this point
Copy the full SHA 0927917View commit details -
Configuration menu - View commit details
-
Copy full SHA for fdc4522 - Browse repository at this point
Copy the full SHA fdc4522View commit details -
Implement
#[ffi_const]
and#[ffi_pure]
function attributesIntroduce function attribute corresponding to the `const`/`pure` attributes supported by GCC, clang and other compilers. Based on the work of gnzlbg <gonzalobg88@gmail.com>.
Configuration menu - View commit details
-
Copy full SHA for abc2364 - Browse repository at this point
Copy the full SHA abc2364View commit details -
Add tests for
#[ffi_const]
and#[ffi_pure]
function attributesBased on the work of gnzlbg <gonzalobg88@gmail.com>.
Configuration menu - View commit details
-
Copy full SHA for a7d7f0b - Browse repository at this point
Copy the full SHA a7d7f0bView commit details -
Document
#[ffi_const]
and#[ffi_pure]
function attributes in unst……able book Based on the work of gnzlbg <gonzalobg88@gmail.com>.
Configuration menu - View commit details
-
Copy full SHA for a114a23 - Browse repository at this point
Copy the full SHA a114a23View commit details
Commits on May 20, 2020
-
FIX - Char documentation for unexperienced users
Elrendio committedMay 20, 2020 Configuration menu - View commit details
-
Copy full SHA for f5b4957 - Browse repository at this point
Copy the full SHA f5b4957View commit details -
Suggest installing VS Build Tools in more situations
When MSVC's `link.exe` wasn't found but another `link.exe` was, the error message given can be impenetrable to many users. The usual suspect is GNU's `link` tool. In this case, inform the user that they may need to install VS build tools. This only applies when Microsoft's link tool is expected. Not `lld-link` or other MSVC compatible linkers.
Configuration menu - View commit details
-
Copy full SHA for 2fd504c - Browse repository at this point
Copy the full SHA 2fd504cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b2266b - Browse repository at this point
Copy the full SHA 4b2266bView commit details -
This lint checks that all declarations for extern fns of the same name are declared with the same types.
Configuration menu - View commit details
-
Copy full SHA for 85979f5 - Browse repository at this point
Copy the full SHA 85979f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b389eed - Browse repository at this point
Copy the full SHA b389eedView commit details -
- Allow ClashingExternDecl for lint-dead-code-3 - Update test case for rust-lang#5791 - Update test case for rust-lang#1866 - Update extern-abi-from-macro test case
Configuration menu - View commit details
-
Copy full SHA for 337abf1 - Browse repository at this point
Copy the full SHA 337abf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7813ff - Browse repository at this point
Copy the full SHA c7813ffView commit details
Commits on May 21, 2020
-
Rollup merge of rust-lang#70946 - jumbatm:clashing-extern-decl, r=nagisa
Add a lint to catch clashing `extern` fn declarations. Closes rust-lang#69390. Adds lint `clashing_extern_decl` to detect when, within a single crate, an extern function of the same name is declared with different types. Because two symbols of the same name cannot be resolved to two different functions at link time, and one function cannot possibly have two types, a clashing extern declaration is almost certainly a mistake. This lint does not run between crates because a project may have dependencies which both rely on the same extern function, but declare it in a different (but valid) way. For example, they may both declare an opaque type for one or more of the arguments (which would end up distinct types), or use types that are valid conversions in the language the extern fn is defined in. In these cases, we can't say that the clashing declaration is incorrect. r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for d4d994a - Browse repository at this point
Copy the full SHA d4d994aView commit details -
Rollup merge of rust-lang#71500 - josephlr:offset, r=oli-obk
Make pointer offset methods/intrinsics const Implements rust-lang#71499 using [the implementations from miri](https://github.com/rust-lang/miri/blob/52f5d202bdcfe8986f0615845f8d1647ab8a2c6a/src/shims/intrinsics.rs#L96-L112). However, unlike the miri implementation, I made the implementation a single function for both `offset` and `arith_offset`. I added some tests what's allowed and what's UB. Let me know if any other cases should be added. CC: @RalfJung @oli-obk
Configuration menu - View commit details
-
Copy full SHA for 7a46e28 - Browse repository at this point
Copy the full SHA 7a46e28View commit details -
Rollup merge of rust-lang#71718 - NeoRaider:ffi_const_pure, r=Amanieu
Experimentally add `ffi_const` and `ffi_pure` extern fn attributes Add FFI function attributes corresponding to clang/gcc/... `const` and `pure`. Rebased version of rust-lang#58327 by @gnzlbg with the following changes: - Switched back from the `c_ffi_const` and `c_ffi_pure` naming to `ffi_const` and `ffi_pure`, as I agree with rust-lang#58327 (comment) and this nicely aligns with `ffi_returns_twice` - (Hopefully) took care of all of @hanna-kruppe's change requests in the original PR r? @hanna-kruppe
Configuration menu - View commit details
-
Copy full SHA for e89a99d - Browse repository at this point
Copy the full SHA e89a99dView commit details -
Rollup merge of rust-lang#71854 - eduardosm:assoc-char-funcs-and-cons…
…ts, r=Amanieu Make `std::char` functions and constants associated to `char`. First step to fix rust-lang#71763.
Configuration menu - View commit details
-
Copy full SHA for 62a85df - Browse repository at this point
Copy the full SHA 62a85dfView commit details -
Rollup merge of rust-lang#72111 - petrochenkov:docstrip, r=ehuss
rustc-book: Document `-Z strip=val` option cc rust-lang#72110
Configuration menu - View commit details
-
Copy full SHA for 6a11087 - Browse repository at this point
Copy the full SHA 6a11087View commit details -
Rollup merge of rust-lang#72296 - ChrisDenton:msvc-link-check, r=petr…
…ochenkov Suggest installing VS Build Tools in more situations When MSVC's `link.exe` wasn't found but another `link.exe` was, the error message given can be [impenetrable](https://pastebin.com/MRMCr7HM) to many users. The usual suspect is GNU's `link` tool. In this case, inform the user that they may need to install VS build tools. This only applies when Microsoft's link tool is expected.
Configuration menu - View commit details
-
Copy full SHA for 0f17a7c - Browse repository at this point
Copy the full SHA 0f17a7cView commit details -
Rollup merge of rust-lang#72365 - marmeladema:remove-node_to_hir_id, …
…r=ecstatic-morse Remove unused `StableHashingContext::node_to_hir_id` method cc rust-lang#50928
Configuration menu - View commit details
-
Copy full SHA for ec4edbc - Browse repository at this point
Copy the full SHA ec4edbcView commit details -
Rollup merge of rust-lang#72371 - Elrendio:char_documentation, r=stev…
…eklabnik FIX - Char documentation for unexperienced users This is my first PR on rust and even if I've read [CONTRIBUTING.md](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#pull-requests) I'm ensure everything is perfect. Sorry if I didn't follow the exact procedure. **What it does:** - Add an example in the char documentation **Explanation** Unexperienced users might not know that punctuation is `Case_Ignorable` and not `Uppercase` and `Lowercase` which mean that when checking if a string is uppercase one might be tempted to write: ```rust my_string.chars().all(char::is_uppercase) ``` However this will return false for `"HELLO WORLD"` which is not intuitive. Since the function `is_case_ignorable` doesn't exists I believe the correct way to check is: ```rust !my_string.chars().any(char::is_lowercase) ``` The aim of this example is to prevent unexperienced users to make an error which punctuation chars.
Configuration menu - View commit details
-
Copy full SHA for 1cef9bf - Browse repository at this point
Copy the full SHA 1cef9bfView commit details -
Rollup merge of rust-lang#72397 - petrochenkov:tiny, r=Amanieu
llvm: Expose tiny code model to users This model is relevant to embedded AArch64 targets and was added to LLVM relatively recently (https://reviews.llvm.org/D49673, mid 2018), so rustc frontend didn't provide access to it with `-C code-model`. The gcc analogue is [`-mcmodel=tiny`](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html). (This is one of the options that are passed directly to LLVM without being interpreted by rustc.) Follow up to rust-lang#72248.
Configuration menu - View commit details
-
Copy full SHA for fcd93b7 - Browse repository at this point
Copy the full SHA fcd93b7View commit details