-
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 31 pull requests #52931
Rollup of 31 pull requests #52931
Commits on Jul 16, 2018
-
Configuration menu - View commit details
-
Copy full SHA for acdafa0 - Browse repository at this point
Copy the full SHA acdafa0View commit details -
Configuration menu - View commit details
-
Copy full SHA for b81ee0b - Browse repository at this point
Copy the full SHA b81ee0bView commit details
Commits on Jul 22, 2018
-
dead-code lint: say "constructed" for structs
This is a sequel to November 2017's rust-lang#46103 / 1a9dc2e. It had been reported (more than once—at least rust-lang#19140, rust-lang#44083, and rust-lang#44565) that the "never used" language was confusing for enum variants that were "used" as match patterns, so the wording was changed to say never "constructed" specifically for enum variants. More recently, the same issue was raised for structs (rust-lang#52325). It seems consistent to say "constructed" here, too, for the same reasons. We considered using more specific word "called" for unused functions and methods (while we declined to do this in rust-lang#46103, the rationale given in the commit message doesn't actually make sense), but it turns out that Cargo's test suite expects the "never used" message, and maybe we don't care enough even to make a Cargo PR over such a petty and subjective wording change. This resolves rust-lang#52325.
Configuration menu - View commit details
-
Copy full SHA for 6c50ee5 - Browse repository at this point
Copy the full SHA 6c50ee5View commit details
Commits on Jul 23, 2018
-
Configuration menu - View commit details
-
Copy full SHA for ed5edcb - Browse repository at this point
Copy the full SHA ed5edcbView commit details
Commits on Jul 26, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 7fb0a52 - Browse repository at this point
Copy the full SHA 7fb0a52View commit details
Commits on Jul 27, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 922bf1d - Browse repository at this point
Copy the full SHA 922bf1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f87f78 - Browse repository at this point
Copy the full SHA 5f87f78View commit details
Commits on Jul 28, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 173c330 - Browse repository at this point
Copy the full SHA 173c330View commit details
Commits on Jul 29, 2018
-
Configuration menu - View commit details
-
Copy full SHA for b6d3143 - Browse repository at this point
Copy the full SHA b6d3143View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea25cf1 - Browse repository at this point
Copy the full SHA ea25cf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ccd7ee - Browse repository at this point
Copy the full SHA 9ccd7eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9845ee0 - Browse repository at this point
Copy the full SHA 9845ee0View commit details
Commits on Jul 30, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 2b25ee0 - Browse repository at this point
Copy the full SHA 2b25ee0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2994b27 - Browse repository at this point
Copy the full SHA 2994b27View commit details -
Configuration menu - View commit details
-
Copy full SHA for c57deb9 - Browse repository at this point
Copy the full SHA c57deb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b466ee - Browse repository at this point
Copy the full SHA 4b466eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8d1dc8 - Browse repository at this point
Copy the full SHA f8d1dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa7d7d0 - Browse repository at this point
Copy the full SHA aa7d7d0View commit details -
Add targets for HermitCore (https://hermitcore.org) to the Rust compi…
…ler and port libstd to it. As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic) and makes use of existing Unix-specific code wherever possible. It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform under development). Together with the patches to "liblibc" and "llvm", this enables HermitCore applications to be written in Rust.
Configuration menu - View commit details
-
Copy full SHA for e50f4ee - Browse repository at this point
Copy the full SHA e50f4eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 57c7742 - Browse repository at this point
Copy the full SHA 57c7742View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4ff949 - Browse repository at this point
Copy the full SHA d4ff949View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b9388b - Browse repository at this point
Copy the full SHA 7b9388bView commit details -
rustc: Disallow machine applicability in foreign macros
Recent changes to lints disallowed lints from being emitted against code located in foreign macros, except for future-incompatible lints. For a future incompatible lint, however, the automatic suggestions may not be applicable! This commit updates this code path to force all applicability suggestions made to foreign macros to never be `MachineApplicable`. This should avoid rustfix actually attempting fixing these suggestions, causing non-compiling code to be produced. Closes rust-lang/cargo#5799
Configuration menu - View commit details
-
Copy full SHA for ca762ba - Browse repository at this point
Copy the full SHA ca762baView commit details -
Configuration menu - View commit details
-
Copy full SHA for d933174 - Browse repository at this point
Copy the full SHA d933174View commit details -
Fix wrong issue number in the test name
Mikhail Modin committedJul 30, 2018 Configuration menu - View commit details
-
Copy full SHA for b6b025b - Browse repository at this point
Copy the full SHA b6b025bView commit details -
Remove the unstable std_unicode crate, deprecated since 1.27
Its former contents are now in libcore.
Configuration menu - View commit details
-
Copy full SHA for d8b3c83 - Browse repository at this point
Copy the full SHA d8b3c83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ca77f7 - Browse repository at this point
Copy the full SHA 4ca77f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbbcecb - Browse repository at this point
Copy the full SHA cbbcecbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9169934 - Browse repository at this point
Copy the full SHA 9169934View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5f1f70 - Browse repository at this point
Copy the full SHA d5f1f70View commit details -
run-pass/const-endianness: negate before to_le()
`const LE_I128` needs parentheses to negate the value *before* calling `to_le()`, otherwise it doesn't match the operations performed in the black-boxed part of the test. This only makes a tangible difference on big-endian targets.
Configuration menu - View commit details
-
Copy full SHA for 1ea2765 - Browse repository at this point
Copy the full SHA 1ea2765View commit details -
Configuration menu - View commit details
-
Copy full SHA for c883edf - Browse repository at this point
Copy the full SHA c883edfView commit details
Commits on Jul 31, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 4ad4ad0 - Browse repository at this point
Copy the full SHA 4ad4ad0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca52648 - Browse repository at this point
Copy the full SHA ca52648View commit details -
Sort NLL error diagnostics by span in an attempt to make them match s…
…ource order (and thus, hopefully, more closely match user expectation).
Configuration menu - View commit details
-
Copy full SHA for e8c2995 - Browse repository at this point
Copy the full SHA e8c2995View commit details -
Blindly update the
#[rustc_region]
tests which got touched by the N……LL diagnostic change.
Configuration menu - View commit details
-
Copy full SHA for 6787e25 - Browse repository at this point
Copy the full SHA 6787e25View commit details -
Update tests that use
-Z borrowck=compare
or#[feature(nll)]
to a……ccmmodate diagnostic change.
Configuration menu - View commit details
-
Copy full SHA for 2677685 - Browse repository at this point
Copy the full SHA 2677685View commit details -
Configuration menu - View commit details
-
Copy full SHA for faf841a - Browse repository at this point
Copy the full SHA faf841aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 830ac8c - Browse repository at this point
Copy the full SHA 830ac8cView commit details -
NLL: On "cannot move out of type" error, print original source before…
… rewrite. * Arguably this change is sometimes injecting noise into the output (namely in the cases where the suggested rewrite is inline with the suggestion and we end up highlighting the original source code). I would not be opposed to something more aggressive/dynamic, like revising the suggestion code to automatically print the original source when necessary (e.g. when the error does not have a span that includes the span of the suggestion). * Also, as another note on this change: The doc comment for `Diagnostic::span_suggestion` says: /// The message /// /// * should not end in any punctuation (a `:` is added automatically) /// * should not be a question /// * should not contain any parts like "the following", "as shown" but the `:` is *not* added when the emitted line appears out-of-line relative to the suggestion. I find that to be an unfortunate UI experience. ---- As a drive-by fix, also changed code to combine multiple suggestions for a pattern into a single multipart suggestion (which vastly improves user experience IMO). ---- Includes the updates to expected NLL diagnostics.
Configuration menu - View commit details
-
Copy full SHA for a5a3f76 - Browse repository at this point
Copy the full SHA a5a3f76View commit details -
Pull out nightly checking to edges
Parsing the code block's LangString (```foo) previously checked itself to see if we were on nightly; that isn't the right place to do so. Move that check slightly outwards to better abstract LangString. (This is also an optimization as we avoid the costly environment variable load of RUSTC_BOOTSTRAP).
Configuration menu - View commit details
-
Copy full SHA for 0af5a6b - Browse repository at this point
Copy the full SHA 0af5a6bView commit details -
Provide warnings for invalid code blocks in markdown files
Previously we would only warn on Rust code but we can also do so when testing markdown (the diag::Handler is available).
Configuration menu - View commit details
-
Copy full SHA for ad40e45 - Browse repository at this point
Copy the full SHA ad40e45View commit details -
Provide test configuration through struct
This is far more sound than passing many different arguments of the same type.
Configuration menu - View commit details
-
Copy full SHA for de5cebd - Browse repository at this point
Copy the full SHA de5cebdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 03e34f8 - Browse repository at this point
Copy the full SHA 03e34f8View commit details -
Further extract error code switch
Removes dependency on UnstableFeatures from markdown rendering
Configuration menu - View commit details
-
Copy full SHA for 01d9555 - Browse repository at this point
Copy the full SHA 01d9555View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2216db9 - Browse repository at this point
Copy the full SHA 2216db9View commit details -
Use SetLenOnDrop in Vec::truncate()
This avoids a redundant length check in some cases when calling `Vec::truncate` or `Vec::clear`. Fixes rust-lang#51802
Configuration menu - View commit details
-
Copy full SHA for 38e311e - Browse repository at this point
Copy the full SHA 38e311eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d94bdf8 - Browse repository at this point
Copy the full SHA d94bdf8View commit details -
Only run the sparc-abi test on sparc
It is not required for LLVM to have SPARC target support, so it is necessary to only run this test when LLVM does support SPARC. Sadly, it isn’t possible to specify exactly this constraint. Instead, we specify that this test should run on SPARC host only (it surely is sane assumption to make that compiler running on a SPARC can generate SPARC, right?) Since you cannot specify multiple `only-*` to have it run on both 32-bit and 64-bit SPARC we pick 64-bit SPARC, because it is exactly what is being tested by this test. Fixes rust-lang#52881
Configuration menu - View commit details
-
Copy full SHA for 40a6046 - Browse repository at this point
Copy the full SHA 40a6046View commit details -
Configuration menu - View commit details
-
Copy full SHA for 779792f - Browse repository at this point
Copy the full SHA 779792fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b138f5 - Browse repository at this point
Copy the full SHA 6b138f5View commit details -
Remove global derive_id and reset_ids functions
Previously these functions relied on TLS but we can instead thread the relevant state through explicitly.
Configuration menu - View commit details
-
Copy full SHA for 7bea518 - Browse repository at this point
Copy the full SHA 7bea518View commit details -
Removes some unused code and de-publicizes structs
Configuration menu - View commit details
-
Copy full SHA for 8e65a46 - Browse repository at this point
Copy the full SHA 8e65a46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cd0047 - Browse repository at this point
Copy the full SHA 4cd0047View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f680b3 - Browse repository at this point
Copy the full SHA 0f680b3View commit details
Commits on Aug 1, 2018
-
Configuration menu - View commit details
-
Copy full SHA for bcab7e2 - Browse repository at this point
Copy the full SHA bcab7e2View commit details -
Rollup merge of rust-lang#52332 - zackmdavis:dead_code_lint_should_sa…
…y_2_electric_boogaloo, r=pnkfelix dead-code lint: say "constructed" for structs Respectively. This is a sequel to November 2017's rust-lang#46103 / 1a9dc2e. It had been reported (more than once—at least rust-lang#19140, rust-lang#44083, and rust-lang#44565) that the "never used" language was confusing for enum variants that were "used" as match patterns, so the wording was changed to say never "constructed" specifically for enum variants. More recently, the same issue was raised for structs (rust-lang#52325). It seems consistent to say "constructed" here, too, for the same reasons. ~~While we're here, we can also use more specific word "called" for unused functions and methods. (We declined to do this in rust-lang#46103, but the rationale given in the commit message doesn't actually make sense.)~~ This resolves rust-lang#52325.
Configuration menu - View commit details
-
Copy full SHA for 88fae6a - Browse repository at this point
Copy the full SHA 88fae6aView commit details -
Rollup merge of rust-lang#52340 - cypher:document-from-trait-in-ffi, …
…r=steveklabnik Document From trait implementations for OsStr, OsString, CString, and CStr As part of issue rust-lang#51430 (cc @skade). The allocation and copy claims should be double-checked. r? @steveklabnik
Configuration menu - View commit details
-
Copy full SHA for c1e2ea1 - Browse repository at this point
Copy the full SHA c1e2ea1View commit details -
Rollup merge of rust-lang#52628 - Mark-Simulacrum:rustdoc-cleanup-1, …
…r=QuietMisdreavus Cleanup some rustdoc code Commits are mostly individual though some do depend on others.
Configuration menu - View commit details
-
Copy full SHA for e292913 - Browse repository at this point
Copy the full SHA e292913View commit details -
Rollup merge of rust-lang#52732 - SimonSapin:spring, r=Mark-Simulacrum
Remove unstable and deprecated APIs
Configuration menu - View commit details
-
Copy full SHA for e65104a - Browse repository at this point
Copy the full SHA e65104aView commit details -
Rollup merge of rust-lang#52745 - commandline:master, r=oli-obk
Update clippy to latest master r? @oli-obk There is a regression in the version in current nightly that falsely lints `println!` and `writeln!` that use named arguments, thinking all rhs values for the argument expressions are literals even when they are not. This update includes the fix for that.
Configuration menu - View commit details
-
Copy full SHA for f4afba0 - Browse repository at this point
Copy the full SHA f4afba0View commit details -
Rollup merge of rust-lang#52756 - alexcrichton:cap-applicable, r=oli-obk
rustc: Disallow machine applicability in foreign macros Recent changes to lints disallowed lints from being emitted against code located in foreign macros, except for future-incompatible lints. For a future incompatible lint, however, the automatic suggestions may not be applicable! This commit updates this code path to force all applicability suggestions made to foreign macros to never be `MachineApplicable`. This should avoid rustfix actually attempting fixing these suggestions, causing non-compiling code to be produced. Closes rust-lang/cargo#5799
Configuration menu - View commit details
-
Copy full SHA for a624d7f - Browse repository at this point
Copy the full SHA a624d7fView commit details -
Rollup merge of rust-lang#52771 - matklad:patch-1, r=kennytm
Clarify thread::park semantics It took me quite some time to realize that the example is not actually racy, so let's clarify it? :-)
Configuration menu - View commit details
-
Copy full SHA for eca1912 - Browse repository at this point
Copy the full SHA eca1912View commit details -
Rollup merge of rust-lang#52810 - matthewjasper:more-immutablity, r=p…
…nkfelix [NLL] Don't make "fake" match variables mutable These variables can't be mutated by the user, but since they have names the unused-mut lint thinks that it should check them.
Configuration menu - View commit details
-
Copy full SHA for ce005b5 - Browse repository at this point
Copy the full SHA ce005b5View commit details -
Rollup merge of rust-lang#52821 - fukatani:gdb-vecdeque-print, r=mich…
…aelwoerister pretty print for std::collections::vecdeque I want pretty print function for VecDeque like Vec. ```rust use std::collections::VecDeque; fn main() { let mut d: VecDeque<i32> = VecDeque::new(); d.push_back(4); d.push_back(4); d.push_back(6); let mut v: Vec<i32> = Vec::new(); v.push(4); v.push(4); v.push(6); } ``` ``` (gdb) p v $1 = Vec<i32>(len: 3, cap: 4) = {4, 4, 6} (gdb) p d $2 = VecDeque<i32>(len: 3, cap: 8) = {4, 4, 6} ``` Thanks.
Configuration menu - View commit details
-
Copy full SHA for 16646fd - Browse repository at this point
Copy the full SHA 16646fdView commit details -
Rollup merge of rust-lang#52822 - MajorBreakfast:fix-from-local-waker…
…, r=cramertj Fix From<LocalWaker> This is a follow-up to rust-lang#52640 Fixes `From<LocalWaker>` which is affected by the same accidental drop bug (unless I'm totally mistaken) r? @cramertj
Configuration menu - View commit details
-
Copy full SHA for 16ec9bb - Browse repository at this point
Copy the full SHA 16ec9bbView commit details -
Rollup merge of rust-lang#52824 - varkor:fix-llvm-ret-move-warnings, …
…r=rkruppe Fix -Wpessimizing-move warnings in rustllvm/PassWrapper These are producing warnings when building rustc (`warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]`).
Configuration menu - View commit details
-
Copy full SHA for 6bc7dda - Browse repository at this point
Copy the full SHA 6bc7ddaView commit details -
Rollup merge of rust-lang#52831 - dsciarra:rm-ref-to-author-file, r=a…
…lexcrichton remove references to AUTHORS.txt file Rust does not ship an AUTHORS.txt file anymore.
Configuration menu - View commit details
-
Copy full SHA for a5e993d - Browse repository at this point
Copy the full SHA a5e993dView commit details -
Rollup merge of rust-lang#52835 - GuillaumeGomez:ice-rustdoc-links, r…
…=eddyb Fix Alias intra doc ICE Fixes rust-lang#52611. cc @QuietMisdreavus r? @varkor
Configuration menu - View commit details
-
Copy full SHA for bc721a1 - Browse repository at this point
Copy the full SHA bc721a1View commit details -
Rollup merge of rust-lang#52842 - toidiu:ak-commentUpdate, r=estebank
update comment r? @joshtriplett Addressing comment: rust-lang#52761 (review)
Configuration menu - View commit details
-
Copy full SHA for 3f6186f - Browse repository at this point
Copy the full SHA 3f6186fView commit details -
Rollup merge of rust-lang#52846 - kennytm:bootstrap-curl-timeout, r=M…
…ark-Simulacrum Add timeout to use of `curl` in bootstrap.py. Recently we've seen a lot of "30 minutes no output" spurious errors while downloading the bootstrap compiler. This added several timeout options so if the "30 minutes no output" errors were caused by connection or transfer issue, we could fail quicker for curl to retry.
Configuration menu - View commit details
-
Copy full SHA for ae84f89 - Browse repository at this point
Copy the full SHA ae84f89View commit details -
Rollup merge of rust-lang#52851 - flip1995:tool_lints, r=oli-obk
Make the tool_lints actually usable cc rust-lang#44690 Necessary for rust-lang/rust-clippy#2955 and rust-lang/rust-clippy#2977 This PR makes it possible for lint tools (at the moment only for Clippy) to implement the `tool_lints`, like it was documented in rust-lang#52018. Because the `declare_lint` macro is pretty cluttered right now, there was not really a good way to add the `tool_name` as an additional argument of the macro. That's why I chose to introduce the new `declare_tool_lint` macro. The switch from `&str` to `String` in the `lint_groups` `FxHashMap` is because I got weird error messages in the `check_lint_name` method. And the `by_name` field of the `LintStore` also uses `String`. ### What comes with this PR: If this PR lands and Clippy switches to the `tool_lints`, the currently used methods ```rust #[cfg_attr(feature = "cargo-clippy", allow(clippy_lint))] #[allow(unknown_lints, clippy_lint)] ``` to `allow`/`warn`/`deny`/`forbid` Clippy lints, won't have any effects anymore, but also won't produce a warning. That is because the name of `clippy_lint` will then be `clippy::clippy_lint`. (Maybe we can add a clippy lint to search for `cfg_attr` appearances with the `cargo-clippy` feature?) r? @oli-obk
Configuration menu - View commit details
-
Copy full SHA for ca4364f - Browse repository at this point
Copy the full SHA ca4364fView commit details -
Rollup merge of rust-lang#52853 - RalfJung:bootstrap-help, r=alexcric…
…hton Improve bootstrap help on stages Cc @eddyb
Configuration menu - View commit details
-
Copy full SHA for fe0c255 - Browse repository at this point
Copy the full SHA fe0c255View commit details -
Rollup merge of rust-lang#52859 - ljedrz:smallvec_true_extend, r=Mark…
…-Simulacrum Use Vec::extend in SmallVec::extend when applicable As calculated in rust-lang#52738, `Vec::extend` is much faster than `push`ing to it in a loop. We can take advantage of this method in `SmallVec` too - at least in cases when its underlying object is an `AccumulateVec::Heap`. ~~This approach also accidentally improves the `push` loop of the `AccumulateVec::Array` variant, because it doesn't utilize `SmallVec::push` which performs `self.reserve(1)` with every iteration; this is unnecessary, because we're already reserving the whole space we will be needing by performing `self.reserve(iter.size_hint().0)` at the beginning.~~
Configuration menu - View commit details
-
Copy full SHA for df2055f - Browse repository at this point
Copy the full SHA df2055fView commit details -
Rollup merge of rust-lang#52861 - ColinFinck:master, r=alexcrichton
Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and port libstd to it. As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic) and makes use of existing Unix-specific code wherever possible. It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform under development). Together with the patches to "liblibc" (rust-lang/libc#1048) and llvm (rust-lang/llvm#122), this enables HermitCore applications to be written in Rust.
Configuration menu - View commit details
-
Copy full SHA for 209db81 - Browse repository at this point
Copy the full SHA 209db81View commit details -
Rollup merge of rust-lang#52867 - matthiaskrgr:release_typos, r=Mark-…
…Simulacrum releases.md: fix 2 typos
Configuration menu - View commit details
-
Copy full SHA for 258314b - Browse repository at this point
Copy the full SHA 258314bView commit details -
Rollup merge of rust-lang#52870 - cramertj:unpin-futureobj, r=aturon
Implement Unpin for FutureObj and LocalFutureObj cc @MajorBreakfast r? @aturon
Configuration menu - View commit details
-
Copy full SHA for d382a88 - Browse repository at this point
Copy the full SHA d382a88View commit details -
Rollup merge of rust-lang#52876 - cuviper:const-endianness-be, r=kennytm
run-pass/const-endianness: negate before to_le() `const LE_I128` needs parentheses to negate the value *before* calling `to_le()`, otherwise it doesn't match the operations performed in the black-boxed part of the test. This only makes a tangible difference on big-endian targets.
Configuration menu - View commit details
-
Copy full SHA for 4e17e43 - Browse repository at this point
Copy the full SHA 4e17e43View commit details -
Rollup merge of rust-lang#52878 - mikhail-m1:master, r=kennytm
Fix wrong issue number in the test name I made a mistake in previous PR rust-lang#52620, second issue number was wrong, changing from rust-lang#52133 to rust-lang#52113 r? @kennytm
Configuration menu - View commit details
-
Copy full SHA for fc596b1 - Browse repository at this point
Copy the full SHA fc596b1View commit details -
Rollup merge of rust-lang#52883 - estebank:nll-diag-mut, r=oli-obk
Include lifetime in mutability suggestion in NLL messages Fix rust-lang#52880.
Configuration menu - View commit details
-
Copy full SHA for 2bc38ac - Browse repository at this point
Copy the full SHA 2bc38acView commit details -
Rollup merge of rust-lang#52904 - pnkfelix:issue-51167-sort-by-span, …
…r=petrochenkov NLL: sort diagnostics by span Sorting the output diagnostics by span is a long planned revision to the NLL diagnostics that we hope will yield a less surprising user experience in some case. Once we got them buffered, it was trivial to implement. (The hard part is skimming the resulting changes to the diagnostics to make sure nothing broke... Note that I largely rubber-stamped the `#[rustc_regions]` output change.) Fix rust-lang#51167
Configuration menu - View commit details
-
Copy full SHA for 20d2c3f - Browse repository at this point
Copy the full SHA 20d2c3fView commit details -
Rollup merge of rust-lang#52905 - pravic:unsize-typo, r=alexcrichton
Fix a typo in unsize.rs RfC -> RFC
Configuration menu - View commit details
-
Copy full SHA for cf6db38 - Browse repository at this point
Copy the full SHA cf6db38View commit details -
Rollup merge of rust-lang#52907 - pnkfelix:issue-52877-original-sourc…
…e-should-precede-suggestions, r=petrochenkov NLL: On "cannot move out of type" error, print original before rewrite NLL: On "cannot move out of type" error, print original source before rewrite. * Arguably this change is sometimes injecting noise into the output (namely in the cases where the suggested rewrite is inline with the suggestion and we end up highlighting the original source code). I would not be opposed to something more aggressive/dynamic, like revising the suggestion code to automatically print the original source when necessary (e.g. when the error does not have a span that includes the span of the suggestion). * Also, as another note on this change: The doc comment for `Diagnostic::span_suggestion` says: ```rust /// The message /// /// * should not end in any punctuation (a `:` is added automatically) /// * should not be a question /// * should not contain any parts like "the following", "as shown" ``` * but the `:` is *not* added when the emitted line appears out-of-line relative to the suggestion. I find that to be an unfortunate UI experience. ---- As a drive-by fix, also changed code to combine multiple suggestions for a pattern into a single multipart suggestion (which vastly improves user experience IMO). ---- Includes the updates to expected NLL diagnostics. Fix rust-lang#52877
Configuration menu - View commit details
-
Copy full SHA for afbd9ae - Browse repository at this point
Copy the full SHA afbd9aeView commit details -
Rollup merge of rust-lang#52908 - lnicola:vec-truncate-opt, r=alexcri…
…chton Use SetLenOnDrop in Vec::truncate() This avoids a redundant length check in some cases when calling `Vec::truncate` or `Vec::clear`. Fixes rust-lang#51802 Note that the generated code still seems suboptimal. I tested with the following functions: ```rust #[no_mangle] pub extern fn foo(x: &mut Vec<u8>) { x.clear(); } #[no_mangle] pub extern fn bar(x: &mut Vec<u8>) { x.truncate(5); } #[no_mangle] pub extern fn baz(x: &mut Vec<u8>, n: usize) { x.truncate(n); } #[no_mangle] pub extern fn foo_string(x: &mut Vec<String>) { x.clear(); } #[no_mangle] pub extern fn bar_string(x: &mut Vec<String>) { x.truncate(5); } #[no_mangle] pub extern fn baz_string(x: &mut Vec<String>, n: usize) { x.truncate(n); } ``` <details> <summary>Old output</summary> ```asm 00000000000460a0 <foo>: 460a0: 48 83 7f 10 00 cmpq $0x0,0x10(%rdi) 460a5: 74 08 je 460af <foo+0xf> 460a7: 48 c7 47 10 00 00 00 movq $0x0,0x10(%rdi) 460ae: 00 460af: c3 retq 00000000000460b0 <bar>: 460b0: 48 83 7f 10 06 cmpq $0x6,0x10(%rdi) 460b5: 72 08 jb 460bf <bar+0xf> 460b7: 48 c7 47 10 05 00 00 movq $0x5,0x10(%rdi) 460be: 00 460bf: c3 retq 00000000000460c0 <baz>: 460c0: 48 39 77 10 cmp %rsi,0x10(%rdi) 460c4: 76 04 jbe 460ca <baz+0xa> 460c6: 48 89 77 10 mov %rsi,0x10(%rdi) 460ca: c3 retq 460cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000460d0 <foo_string>: 460d0: 41 57 push %r15 460d2: 41 56 push %r14 460d4: 53 push %rbx 460d5: 48 8b 47 10 mov 0x10(%rdi),%rax 460d9: 48 85 c0 test %rax,%rax 460dc: 74 4a je 46128 <foo_string+0x58> 460de: 49 89 fe mov %rdi,%r14 460e1: 48 8b 0f mov (%rdi),%rcx 460e4: 48 8d 14 40 lea (%rax,%rax,2),%rdx 460e8: 48 8d 58 ff lea -0x1(%rax),%rbx 460ec: 4c 8d 3c d1 lea (%rcx,%rdx,8),%r15 460f0: 49 83 c7 f0 add $0xfffffffffffffff0,%r15 460f4: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 460fb: 00 00 00 460fe: 66 90 xchg %ax,%ax 46100: 49 89 5e 10 mov %rbx,0x10(%r14) 46104: 49 8b 37 mov (%r15),%rsi 46107: 48 85 f6 test %rsi,%rsi 4610a: 74 0e je 4611a <foo_string+0x4a> 4610c: 49 8b 7f f8 mov -0x8(%r15),%rdi 46110: ba 01 00 00 00 mov $0x1,%edx 46115: e8 a6 e9 ff ff callq 44ac0 <__rust_dealloc@plt> 4611a: 48 83 c3 ff add $0xffffffffffffffff,%rbx 4611e: 49 83 c7 e8 add $0xffffffffffffffe8,%r15 46122: 48 83 fb ff cmp $0xffffffffffffffff,%rbx 46126: 75 d8 jne 46100 <foo_string+0x30> 46128: 5b pop %rbx 46129: 41 5e pop %r14 4612b: 41 5f pop %r15 4612d: c3 retq 4612e: 66 90 xchg %ax,%ax 0000000000046130 <bar_string>: 46130: 41 57 push %r15 46132: 41 56 push %r14 46134: 53 push %rbx 46135: 4c 8b 7f 10 mov 0x10(%rdi),%r15 46139: 49 83 ff 06 cmp $0x6,%r15 4613d: 72 49 jb 46188 <bar_string+0x58> 4613f: 49 89 fe mov %rdi,%r14 46142: 48 8b 07 mov (%rdi),%rax 46145: 4b 8d 0c 7f lea (%r15,%r15,2),%rcx 46149: 48 8d 1c c8 lea (%rax,%rcx,8),%rbx 4614d: 48 83 c3 f0 add $0xfffffffffffffff0,%rbx 46151: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 46158: 00 00 00 4615b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 46160: 49 83 c7 ff add $0xffffffffffffffff,%r15 46164: 4d 89 7e 10 mov %r15,0x10(%r14) 46168: 48 8b 33 mov (%rbx),%rsi 4616b: 48 85 f6 test %rsi,%rsi 4616e: 74 0e je 4617e <bar_string+0x4e> 46170: 48 8b 7b f8 mov -0x8(%rbx),%rdi 46174: ba 01 00 00 00 mov $0x1,%edx 46179: e8 42 e9 ff ff callq 44ac0 <__rust_dealloc@plt> 4617e: 48 83 c3 e8 add $0xffffffffffffffe8,%rbx 46182: 49 83 ff 05 cmp $0x5,%r15 46186: 77 d8 ja 46160 <bar_string+0x30> 46188: 5b pop %rbx 46189: 41 5e pop %r14 4618b: 41 5f pop %r15 4618d: c3 retq 4618e: 66 90 xchg %ax,%ax 0000000000046190 <baz_string>: 46190: 41 57 push %r15 46192: 41 56 push %r14 46194: 41 54 push %r12 46196: 53 push %rbx 46197: 50 push %rax 46198: 4c 8b 67 10 mov 0x10(%rdi),%r12 4619c: 49 39 f4 cmp %rsi,%r12 4619f: 76 46 jbe 461e7 <baz_string+0x57> 461a1: 49 89 f6 mov %rsi,%r14 461a4: 49 89 ff mov %rdi,%r15 461a7: 48 8b 07 mov (%rdi),%rax 461aa: 4b 8d 0c 64 lea (%r12,%r12,2),%rcx 461ae: 48 8d 1c c8 lea (%rax,%rcx,8),%rbx 461b2: 48 83 c3 f0 add $0xfffffffffffffff0,%rbx 461b6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 461bd: 00 00 00 461c0: 49 83 c4 ff add $0xffffffffffffffff,%r12 461c4: 4d 89 67 10 mov %r12,0x10(%r15) 461c8: 48 8b 33 mov (%rbx),%rsi 461cb: 48 85 f6 test %rsi,%rsi 461ce: 74 0e je 461de <baz_string+0x4e> 461d0: 48 8b 7b f8 mov -0x8(%rbx),%rdi 461d4: ba 01 00 00 00 mov $0x1,%edx 461d9: e8 e2 e8 ff ff callq 44ac0 <__rust_dealloc@plt> 461de: 48 83 c3 e8 add $0xffffffffffffffe8,%rbx 461e2: 4d 39 f4 cmp %r14,%r12 461e5: 77 d9 ja 461c0 <baz_string+0x30> 461e7: 48 83 c4 08 add $0x8,%rsp 461eb: 5b pop %rbx 461ec: 41 5c pop %r12 461ee: 41 5e pop %r14 461f0: 41 5f pop %r15 461f2: c3 retq 461f3: 90 nop 461f4: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 461fb: 00 00 00 461fe: 66 90 xchg %ax,%ax ``` </details> <details> <summary>New output</summary> ```asm 0000000000084d10 <foo>: 84d10: 48 c7 47 10 00 00 00 movq $0x0,0x10(%rdi) 84d17: 00 84d18: c3 retq 84d19: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000084d20 <bar>: 84d20: 48 8b 47 10 mov 0x10(%rdi),%rax 84d24: 48 83 f8 05 cmp $0x5,%rax 84d28: b9 05 00 00 00 mov $0x5,%ecx 84d2d: 48 0f 42 c8 cmovb %rax,%rcx 84d31: 48 89 4f 10 mov %rcx,0x10(%rdi) 84d35: c3 retq 84d36: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 84d3d: 00 00 00 0000000000084d40 <baz>: 84d40: 48 8b 47 10 mov 0x10(%rdi),%rax 84d44: 48 39 f0 cmp %rsi,%rax 84d47: 48 0f 47 c6 cmova %rsi,%rax 84d4b: 48 89 47 10 mov %rax,0x10(%rdi) 84d4f: c3 retq 0000000000084d50 <foo_string>: 84d50: 41 57 push %r15 84d52: 41 56 push %r14 84d54: 53 push %rbx 84d55: 49 89 fe mov %rdi,%r14 84d58: 4c 8b 7f 10 mov 0x10(%rdi),%r15 84d5c: 4d 85 ff test %r15,%r15 84d5f: 74 2f je 84d90 <foo_string+0x40> 84d61: 49 8b 06 mov (%r14),%rax 84d64: 4b 8d 0c 7f lea (%r15,%r15,2),%rcx 84d68: 48 8d 1c c8 lea (%rax,%rcx,8),%rbx 84d6c: 48 83 c3 f0 add $0xfffffffffffffff0,%rbx 84d70: 48 8b 33 mov (%rbx),%rsi 84d73: 48 85 f6 test %rsi,%rsi 84d76: 74 0e je 84d86 <foo_string+0x36> 84d78: 48 8b 7b f8 mov -0x8(%rbx),%rdi 84d7c: ba 01 00 00 00 mov $0x1,%edx 84d81: e8 1a b1 ff ff callq 7fea0 <__rust_dealloc@plt> 84d86: 48 83 c3 e8 add $0xffffffffffffffe8,%rbx 84d8a: 49 83 c7 ff add $0xffffffffffffffff,%r15 84d8e: 75 e0 jne 84d70 <foo_string+0x20> 84d90: 49 c7 46 10 00 00 00 movq $0x0,0x10(%r14) 84d97: 00 84d98: 5b pop %rbx 84d99: 41 5e pop %r14 84d9b: 41 5f pop %r15 84d9d: c3 retq 84d9e: 66 90 xchg %ax,%ax 0000000000084da0 <bar_string>: 84da0: 41 57 push %r15 84da2: 41 56 push %r14 84da4: 53 push %rbx 84da5: 49 89 fe mov %rdi,%r14 84da8: 4c 8b 7f 10 mov 0x10(%rdi),%r15 84dac: 49 83 ff 06 cmp $0x6,%r15 84db0: 72 44 jb 84df6 <bar_string+0x56> 84db2: 49 8b 06 mov (%r14),%rax 84db5: 4b 8d 0c 7f lea (%r15,%r15,2),%rcx 84db9: 48 8d 1c c8 lea (%rax,%rcx,8),%rbx 84dbd: 48 83 c3 f0 add $0xfffffffffffffff0,%rbx 84dc1: 49 83 c7 fb add $0xfffffffffffffffb,%r15 84dc5: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 84dcc: 00 00 00 84dcf: 90 nop 84dd0: 48 8b 33 mov (%rbx),%rsi 84dd3: 48 85 f6 test %rsi,%rsi 84dd6: 74 0e je 84de6 <bar_string+0x46> 84dd8: 48 8b 7b f8 mov -0x8(%rbx),%rdi 84ddc: ba 01 00 00 00 mov $0x1,%edx 84de1: e8 ba b0 ff ff callq 7fea0 <__rust_dealloc@plt> 84de6: 48 83 c3 e8 add $0xffffffffffffffe8,%rbx 84dea: 49 83 c7 ff add $0xffffffffffffffff,%r15 84dee: 75 e0 jne 84dd0 <bar_string+0x30> 84df0: 41 bf 05 00 00 00 mov $0x5,%r15d 84df6: 4d 89 7e 10 mov %r15,0x10(%r14) 84dfa: 5b pop %rbx 84dfb: 41 5e pop %r14 84dfd: 41 5f pop %r15 84dff: c3 retq 0000000000084e00 <baz_string>: 84e00: 41 57 push %r15 84e02: 41 56 push %r14 84e04: 41 54 push %r12 84e06: 53 push %rbx 84e07: 50 push %rax 84e08: 49 89 ff mov %rdi,%r15 84e0b: 48 8b 47 10 mov 0x10(%rdi),%rax 84e0f: 49 89 c4 mov %rax,%r12 84e12: 49 29 f4 sub %rsi,%r12 84e15: 76 3c jbe 84e53 <baz_string+0x53> 84e17: 49 89 f6 mov %rsi,%r14 84e1a: 49 8b 0f mov (%r15),%rcx 84e1d: 48 8d 04 40 lea (%rax,%rax,2),%rax 84e21: 48 8d 1c c1 lea (%rcx,%rax,8),%rbx 84e25: 48 83 c3 f0 add $0xfffffffffffffff0,%rbx 84e29: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 84e30: 48 8b 33 mov (%rbx),%rsi 84e33: 48 85 f6 test %rsi,%rsi 84e36: 74 0e je 84e46 <baz_string+0x46> 84e38: 48 8b 7b f8 mov -0x8(%rbx),%rdi 84e3c: ba 01 00 00 00 mov $0x1,%edx 84e41: e8 5a b0 ff ff callq 7fea0 <__rust_dealloc@plt> 84e46: 48 83 c3 e8 add $0xffffffffffffffe8,%rbx 84e4a: 49 83 c4 ff add $0xffffffffffffffff,%r12 84e4e: 75 e0 jne 84e30 <baz_string+0x30> 84e50: 4c 89 f0 mov %r14,%rax 84e53: 49 89 47 10 mov %rax,0x10(%r15) 84e57: 48 83 c4 08 add $0x8,%rsp 84e5b: 5b pop %rbx 84e5c: 41 5c pop %r12 84e5e: 41 5e pop %r14 84e60: 41 5f pop %r15 84e62: c3 retq 84e63: 90 nop 84e64: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 84e6b: 00 00 00 84e6e: 66 90 xchg %ax,%ax ``` </details> For calling `truncate` with non-zero lengths on non-`Drop` types, it seems that a redundant load and comparison gets replaced with an awkward sequence with a conditional move. In the unknown length case, the new code is no longer awkward. Maybe someone moderately proficient at assembly could tell if this looks like a win or not. --- This came up when discussing replacing `unsafe { vec.set_len(0) }` with `vec.clear()` in a project where the author was worried about potential performance degradation. It might be worth replacing some unsafe code, even it it's trivial to see that it's actually safe.
Configuration menu - View commit details
-
Copy full SHA for 5061f1a - Browse repository at this point
Copy the full SHA 5061f1aView commit details -
Rollup merge of rust-lang#52914 - nagisa:sparc-is-sparc’s-own-busines…
…s, r=alexcrichton Only run the sparc-abi test on sparc It is not required for LLVM to have SPARC target support, so it is necessary to only run this test when LLVM does support SPARC. Sadly, it isn’t possible to specify exactly this constraint. Instead, we specify that this test should run on SPARC host only (it surely is sane assumption to make that compiler running on a SPARC can generate SPARC, right?) Since you cannot specify multiple `only-*` to have it run on both 32-bit and 64-bit SPARC we pick 64-bit SPARC, because it is exactly what is being tested by this test. Fixes rust-lang#52881
Configuration menu - View commit details
-
Copy full SHA for f6a8c78 - Browse repository at this point
Copy the full SHA f6a8c78View commit details -
Rollup merge of rust-lang#52918 - pietroalbini:1.27.2-notes, r=Mark-S…
…imulacrum Backport 1.27.2 release notes r? @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for bedc3a3 - Browse repository at this point
Copy the full SHA bedc3a3View commit details -
Rollup merge of rust-lang#52929 - Havvy:patch-1, r=alexcrichton
Update compatibility note for 1.28.0 to be correct You can still put implementations on `dyn Trait + Send + Send`, but it'd be the same as putting them on `dyn Trait + Send`. This is why the error is that there are duplicate definitions in the example.
Configuration menu - View commit details
-
Copy full SHA for dcb71f0 - Browse repository at this point
Copy the full SHA dcb71f0View commit details