-
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 9 pull requests #72756
Rollup of 9 pull requests #72756
Commits on May 11, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 3f661d2 - Browse repository at this point
Copy the full SHA 3f661d2View commit details
Commits on May 20, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a8ed9aa - Browse repository at this point
Copy the full SHA a8ed9aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for eccaa01 - Browse repository at this point
Copy the full SHA eccaa01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96a466c - Browse repository at this point
Copy the full SHA 96a466cView commit details
Commits on May 21, 2020
-
Various minor improvements to Ipv6Addr::Display
- Defer to Ipv4Addr::fmt when printing an Ipv4 address - Fast path: write directly to f without an intermediary buffer when there are no alignment options - Simplify finding the inner zeroes-span
Configuration menu - View commit details
-
Copy full SHA for 44ca3da - Browse repository at this point
Copy the full SHA 44ca3daView commit details -
Enables Range<char> to be iterable Note: https://rust.godbolt.org/z/fdveKo An iteration over all char ('\0'..=char::MAX) includes unreachable panic code currently. Updating RangeInclusive::next to call Step::forward_unchecked (which is safe to do but not done yet becuase it wasn't necessary) successfully removes the panic from this iteration.
Configuration menu - View commit details
-
Copy full SHA for 96f3879 - Browse repository at this point
Copy the full SHA 96f3879View commit details -
Configuration menu - View commit details
-
Copy full SHA for c25b82f - Browse repository at this point
Copy the full SHA c25b82fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27d1cd8 - Browse repository at this point
Copy the full SHA 27d1cd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1d1f25 - Browse repository at this point
Copy the full SHA b1d1f25View commit details
Commits on May 24, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 58fdc43 - Browse repository at this point
Copy the full SHA 58fdc43View commit details -
Configuration menu - View commit details
-
Copy full SHA for d77f73e - Browse repository at this point
Copy the full SHA d77f73eView commit details -
Configuration menu - View commit details
-
Copy full SHA for baa801a - Browse repository at this point
Copy the full SHA baa801aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1070f08 - Browse repository at this point
Copy the full SHA 1070f08View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d74e09 - Browse repository at this point
Copy the full SHA 6d74e09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ec6b5e - Browse repository at this point
Copy the full SHA 5ec6b5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed559b3 - Browse repository at this point
Copy the full SHA ed559b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70cd375 - Browse repository at this point
Copy the full SHA 70cd375View commit details -
Update src/doc/unstable-book/src/library-features/asm.md
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 83a5cdf - Browse repository at this point
Copy the full SHA 83a5cdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for e18054d - Browse repository at this point
Copy the full SHA e18054dView commit details
Commits on May 25, 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 08df311 - Browse repository at this point
Copy the full SHA 08df311View 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 9b3dfd8 - Browse repository at this point
Copy the full SHA 9b3dfd8View 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 88a37a2 - Browse repository at this point
Copy the full SHA 88a37a2View commit details -
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 6b20f58 - Browse repository at this point
Copy the full SHA 6b20f58View commit details -
librustc_mir: Add back use statement
Signed-off-by: Joe Richey <joerichey@google.com>
Configuration menu - View commit details
-
Copy full SHA for 55577b4 - Browse repository at this point
Copy the full SHA 55577b4View commit details
Commits on May 26, 2020
-
librustc_middle: Add function for computing unsigned abs
This is tricky to get right if we want to avoid panicking or wrapping. Signed-off-by: Joe Richey <joerichey@google.com>
Configuration menu - View commit details
-
Copy full SHA for 6367b54 - Browse repository at this point
Copy the full SHA 6367b54View commit details -
Add checks and tests for computing abs(offset_bytes)
The previous code paniced if offset_bytes == i64::MIN. This commit: - Properly computes the absoulte value to avoid this panic - Adds a test for this edge case Signed-off-by: Joe Richey <joerichey@google.com>
Configuration menu - View commit details
-
Copy full SHA for 71ef841 - Browse repository at this point
Copy the full SHA 71ef841View commit details
Commits on May 27, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a977df3 - Browse repository at this point
Copy the full SHA a977df3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 594c499 - Browse repository at this point
Copy the full SHA 594c499View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb67915 - Browse repository at this point
Copy the full SHA bb67915View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ce9d5c - Browse repository at this point
Copy the full SHA 3ce9d5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b3e012b - Browse repository at this point
Copy the full SHA b3e012bView commit details -
Use the lowest of
unsafe_op_in_unsafe_fn
andsafe_borrow_packed
f……or packed borrows in unsafe fns
Configuration menu - View commit details
-
Copy full SHA for a41f763 - Browse repository at this point
Copy the full SHA a41f763View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3bae5c - Browse repository at this point
Copy the full SHA a3bae5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 925d5ac - Browse repository at this point
Copy the full SHA 925d5acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9671b44 - Browse repository at this point
Copy the full SHA 9671b44View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3599ada - Browse repository at this point
Copy the full SHA 3599adaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a538d3 - Browse repository at this point
Copy the full SHA 4a538d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3d27ec - Browse repository at this point
Copy the full SHA e3d27ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b08850 - Browse repository at this point
Copy the full SHA 1b08850View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63066c0 - Browse repository at this point
Copy the full SHA 63066c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for db684be - Browse repository at this point
Copy the full SHA db684beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fea832 - Browse repository at this point
Copy the full SHA 3fea832View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ba2220 - Browse repository at this point
Copy the full SHA 5ba2220View commit details -
Tweak output for mismatched impl item
Detect type parameter that might require lifetime constraint. Do not name `ReVar`s in expected/found output. Reword text suggesting to check the lifetimes.
Configuration menu - View commit details
-
Copy full SHA for eb0f4d5 - Browse repository at this point
Copy the full SHA eb0f4d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3811232 - Browse repository at this point
Copy the full SHA 3811232View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e2f820 - Browse repository at this point
Copy the full SHA 2e2f820View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0d30b0 - Browse repository at this point
Copy the full SHA d0d30b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b35247 - Browse repository at this point
Copy the full SHA 2b35247View commit details -
Configuration menu - View commit details
-
Copy full SHA for 500504c - Browse repository at this point
Copy the full SHA 500504cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c52dbbc - Browse repository at this point
Copy the full SHA c52dbbcView commit details
Commits on May 28, 2020
-
Add additional checks for isize overflow
We now perform the correct checks even if the pointer size differs between the host and target. Signed-off-by: Joe Richey <joerichey@google.com>
Configuration menu - View commit details
-
Copy full SHA for 7d5415b - Browse repository at this point
Copy the full SHA 7d5415bView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb6408a - Browse repository at this point
Copy the full SHA cb6408aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f213acf - Browse repository at this point
Copy the full SHA f213acfView commit details -
Configuration menu - View commit details
-
Copy full SHA for cd6a8ca - Browse repository at this point
Copy the full SHA cd6a8caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e3b31c - Browse repository at this point
Copy the full SHA 0e3b31cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1bd6970 - Browse repository at this point
Copy the full SHA 1bd6970View commit details
Commits on May 29, 2020
-
Rollup merge of rust-lang#67460 - estebank:named-lts, r=nikomatsakis
Tweak impl signature mismatch errors involving `RegionKind::ReVar` lifetimes Fix rust-lang#66406, fix rust-lang#72106. ``` error: `impl` item signature doesn't match `trait` item signature --> $DIR/trait-param-without-lifetime-constraint.rs:14:5 | LL | fn get_relation(&self) -> To; | ----------------------------- expected `fn(&Article) -> &ProofReader` ... LL | fn get_relation(&self) -> &ProofReader { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&Article) -> &ProofReader` | = note: expected `fn(&Article) -> &ProofReader` found `fn(&Article) -> &ProofReader` help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` --> $DIR/trait-param-without-lifetime-constraint.rs:10:31 | LL | fn get_relation(&self) -> To; | ^^ consider borrowing this type parameter in the trait ``` r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for 8120780 - Browse repository at this point
Copy the full SHA 8120780View commit details -
Rollup merge of rust-lang#71095 - pickfire:box-from-array, r=dtolnay
impl From<[T; N]> for Box<[T]> Based on rust-lang#68692
Configuration menu - View commit details
-
Copy full SHA for b387a11 - Browse repository at this point
Copy the full SHA b387a11View commit details -
Rollup merge of rust-lang#71500 - josephlr:offset, r=oli-obk,RalfJung
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). 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 1cfe0e9 - Browse repository at this point
Copy the full SHA 1cfe0e9View commit details -
Rollup merge of rust-lang#71804 - petrochenkov:static-pie, r=cuviper
linker: Support `-static-pie` and `-static -shared` This PR adds support for passing linker arguments for creating statically linked position-independent executables and "statically linked" shared libraries. Therefore it incorporates the majority of rust-lang#70740 except for the linker rerun hack and actually flipping the "`static-pie` is supported" switch for musl targets.
Configuration menu - View commit details
-
Copy full SHA for 7aef3a0 - Browse repository at this point
Copy the full SHA 7aef3a0View commit details -
Rollup merge of rust-lang#71862 - LeSeulArtichaut:unsafe-block-in-uns…
…afe-fn, r=nikomatsakis Implement RFC 2585: unsafe blocks in unsafe fn Tracking issue: rust-lang#71668 r? @RalfJung cc @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for c442e43 - Browse repository at this point
Copy the full SHA c442e43View commit details -
Rollup merge of rust-lang#72103 - lcnr:borrowck-localdefid, r=jonas-s…
…chievink borrowck `DefId` -> `LocalDefId` Replaces some `DefId`s which must always be local with `LocalDefId` in `librustc_mir/borrowck`. cc @marmeladema
Configuration menu - View commit details
-
Copy full SHA for e229d6e - Browse repository at this point
Copy the full SHA e229d6eView commit details -
Rollup merge of rust-lang#72407 - Lucretiel:ipv6-display, r=Mark-Simu…
…lacrum Various minor improvements to Ipv6Addr::Display Cleaned up `Ipv6Addr::Display`, especially with an eye towards simplifying and reducing duplicated logic. Also added a fast-path optimization, similar to rust-lang#72399 and rust-lang#72398. - Defer to `Ipv4Addr::fmt` when printing an Ipv4 address - Fast path: write directly to `f` without an intermediary buffer when there are no alignment options - Simplify finding the inner zeroes-span
Configuration menu - View commit details
-
Copy full SHA for de561a9 - Browse repository at this point
Copy the full SHA de561a9View commit details -
Rollup merge of rust-lang#72413 - CAD97:char-range, r=dtolnay
impl Step for char (make Range*<char> iterable) [[irlo thread]](https://internals.rust-lang.org/t/mini-rfc-make-range-char-work/12392?u=cad97) [[godbolt asm example]](https://rust.godbolt.org/z/fdveKo) Add an implementation of the `Step` trait for `char`, which has the effect of making `RangeInclusive<char>` (and the other range types) iterable. I've used the surrogate range magic numbers as magic numbers here rather than e.g. a `const SURROGATE_RANGE = 0xD800..0xE000` because these numbers appear to be used as magic numbers elsewhere and there doesn't exist constants for them yet. These files definitely aren't where surrogate range constants should live. `ExactSizeIterator` is not implemented because `0x10FFFF` is bigger than fits in a `usize == u16`. However, given we already provide some `ExactSizeIterator` that are not correct on 16 bit targets, we might still want to consider providing it for `Range`[`Inclusive`]`<char>`, as it is definitely _very_ convenient. (At the very least, we want to make sure `.count()` doesn't bother iterating the range.) The second commit in this PR changes a call to `Step::forward` to use `Step::forward_unchecked` in `RangeInclusive::next`. This is because without this patch, iteration over all codepoints (`'\0'..=char::MAX`) does not successfully optimize out the panicking branch. This was mentioned in the PR that updated `Step` to its current design, but was deemed not yet necessary as it did not impact codegen for integral types. More of `Range*`'s implementations' calls to `Step` methods will probably want to see if they can use the `_unchecked` version as (if) we open up `Step` to being implemented on more types. --- cc @rust-lang/libs, this is insta-stable and a fairly significant addition to `Range*`'s capabilities; this is the first instance of a noncontinuous domain being iterable with `Range` (or, well, anything other than primitive integers). I don't think this needs a full RFC, but it should definitely get some decent eyes on it.
Configuration menu - View commit details
-
Copy full SHA for b965196 - Browse repository at this point
Copy the full SHA b965196View commit details -
Rollup merge of rust-lang#72439 - westernmagic:master, r=Amanieu
NVPTX support for new asm! This PR implements the new `asm!` syntax for the `nvptx64-nvidia-cuda` target. r? @Amanieu
Configuration menu - View commit details
-
Copy full SHA for 3789455 - Browse repository at this point
Copy the full SHA 3789455View commit details