about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-04-21Remove `delete` alias from `mem::drop`.Mara Bos-1/+0
2021-04-11Auto merge of #83806 - JohnTitor:issue-51446, r=estebankbors-0/+34
Add a regression test for issue-51446 Closes #51446 r? `@estebank`
2021-04-11Auto merge of #84071 - nagisa:nixos-patching-fix, r=Mark-Simulacrumbors-48/+41
Fix NixOS patching Moving the `.nix-deps` has resulted in rpath links being broken and therefore bootstrap on NixOS broken entirely. This PR still produces a `.nix-deps` but only for the purposes of producing a gc root. We rpath a symlink-resolved result instead. For purposes of simplicity we also use joinSymlink to produce a single merged output directory so that we don't need to update multiple locations every time we add a library or something. Fixes a regression from https://github.com/rust-lang/rust/pull/82739.
2021-04-11Auto merge of #84053 - RalfJung:liballoc-miri, r=Manishearthbors-1/+1
fix incorrect Box::from_raw_in doctest Now that Miri can run doctests, I ran it on liballoc, and found exactly one problem: this test creates a `Box<u8>` to deallocate a 4-byte allocation! Introduced by https://github.com/rust-lang/rust/pull/80310 so r? `@Manishearth` `@kennytm`
2021-04-10Auto merge of #84023 - Aaron1011:derive-invoc-order, r=petrochenkovbors-65/+112
Expand derive invocations in left-to-right order While derives were being collected in left-to-order order, the corresponding `Invocation`s were being pushed in the wrong order.
2021-04-10Expand derive invocations in left-to-right orderAaron Hill-65/+112
While derives were being collected in left-to-order order, the corresponding `Invocation`s were being pushed in the wrong order.
2021-04-10Fix NixOS patchingSimonas Kazlauskas-48/+41
Moving the `.nix-deps` has resulted in rpath links being broken and therefore bootstrap on NixOS broken entirely. This PR still produces a `.nix-deps` but only for the purposes of producing a gc root. We rpath a symlink-resolved result instead. For purposes of simplicity we also use joinSymlink to produce a single merged output directory so that we don't need to update multiple locations every time we add a library or something.
2021-04-10Auto merge of #84016 - Aaron1011:new-preexp-tests, r=petrochenkovbors-66/+1199
Add some proc-macro attribute token handling tests Split out from https://github.com/rust-lang/rust/pull/82608 r? `@petrochenkov`
2021-04-10Add some proc-macro attribute token handling testsAaron Hill-66/+1199
2021-04-10Auto merge of #84052 - RalfJung:libcore-miri, r=Mark-Simulacrumbors-15/+22
fix Miri errors in libcore doctests Now that Miri can run doctests, it found some issues in the libcore doctests: * The `AtomicPtr` tests accessed dangling memory! `AtomicPtr::new(&mut 10);` makes the `10` a temporary that is deallocated after the end of this expression. * The tests for `set_ptr_value` used `&array[0] as *const _` to get a pointer to the array; this needs to be `array.as_ptr()` instead (Cc https://github.com/rust-lang/unsafe-code-guidelines/issues/134). * I reduced a buffer size in a `MaybeUninit` test to make it less slow in Miri, and added a spin loop hint to fix a diverging loop in Miri.
2021-04-10Auto merge of #84055 - kornelski:z-edition, r=petrochenkovbors-8/+11
Don't tell users to use a nightly flag on the stable channel When a crate requires a newer edition, currently rustc tells users to use `-Z unstable-options`. This is not ideal, because: * This flag doesn't work on the stable channel, so solution to one error only causes another error, which is frustrating. * Directs users towards the nightly channel, which is not necessarily the correct solution. Once the next edition is released, this message will be mostly seen by users of out-of-date stable Rust versions who merely need to update their Rust to the latest stable.
2021-04-10Don't tell users to use a nightly flag on the stable channelKornel-8/+11
Hint upgrading to a newer Rust version instead
2021-04-10Auto merge of #84051 - Amanieu:update_llvm, r=nikicbors-0/+0
Update LLVM submodule Fixes #84028
2021-04-10fix incorrect from_raw_in doctestRalf Jung-1/+1
2021-04-10fix Miri errors in libcore doctestsRalf Jung-15/+22
2021-04-10Update LLVM submoduleAmanieu d'Antras-0/+0
2021-04-10Auto merge of #84050 - RalfJung:miri, r=RalfJungbors-10/+8
update Miri Let's ship https://github.com/rust-lang/miri/pull/1761. Cc `@rust-lang/miri` r? `@ghost`
2021-04-10update MiriRalf Jung-10/+8
2021-04-10Auto merge of #84024 - estebank:unclosed-brace-use, r=jackh726bors-4/+45
Avoid `;` -> `,` recovery and unclosed `}` recovery from being too verbose Those two recovery attempts have a very bad interaction that causes too unnecessary output. Add a simple gate to avoid interpreting a `;` as a `,` when there are unclosed braces. Fix #83498.
2021-04-10Auto merge of #84015 - tdelabro:issue-76704-fix, r=Amanieubors-19/+53
doc asm feature - Added new 'Label' section with example and explanations Fixes #76704
2021-04-09Auto merge of #84004 - mattico:print-target-features-improvements, ↵bors-25/+91
r=petrochenkov Categorize and explain target features support There are 3 different uses of the `-C target-feature` args passed to rustc: 1. All of the features are passed to LLVM, which uses them to configure code-generation. This is sort-of stabilized since 1.0 though LLVM does change/add/remove target features regularly. 2. Target features which are in [the compiler's allowlist](https://github.com/rust-lang/rust/blob/69e1d22ddbc67b25141a735a22a8895a678b32ca/compiler/rustc_codegen_ssa/src/target_features.rs#L12-L34) can be used in `cfg!(target_feature)` etc. These may have different names than in LLVM and are renamed before passing them to LLVM. 3. Target features which are in the allowlist and which are stabilized or feature-gate-enabled can be used in `#[target_feature]`. It can be confusing that `rustc --print target-features` just prints out the LLVM features without separating out the rustc features or even mentioning that the dichotomy exists. This improves the situation by separating out the rustc and LLVM target features and adding a brief explanation about the difference. Abbreviated Example Output: ``` $ rustc --print target-features Features supported by rustc for this target: adx - Support ADX instructions. aes - Enable AES instructions. ... xsaves - Support xsaves instructions. crt-static - Enables libraries with C Run-time Libraries(CRT) to be statically linked. Code-generation features supported by LLVM for this target: 16bit-mode - 16-bit mode (i8086). 32bit-mode - 32-bit mode (80386). ... x87 - Enable X87 float instructions. xop - Enable XOP instructions. Use +feature to enable a feature, or -feature to disable it. For example, rustc -C target-cpu=mycpu -C target-feature=+feature1,-feature2 Code-generation features cannot be used in cfg or #[target_feature], and may be renamed or removed in a future version of LLVM or rustc. ``` Motivated by #83975. CC https://github.com/rust-lang/rust/issues/49653
2021-04-09Auto merge of #84034 - jyn514:regex-in-loop, r=Mark-Simulacrumbors-1/+1
Fix perf regression in rustdoc::bare_urls This regressed in #81764. After that PR, rustdoc compiled the regex for every single item in the crate: https://perf.rust-lang.org/compare.html?start=125505306744a0a5bb01d62337260a95d9ff8d57&end=2e495d2e845cf27740e3665f718acfd3aa17253e&stat=instructions%3Au This would have been caught by `clippy::declare_interior_mutable_const` (cc https://github.com/rust-lang/rust/issues/77983).
2021-04-09Avoid `;` -> `,` recovery and unclosed `}` recovery from being too verboseEsteban Küber-145/+21
Those two recovery attempts have a very bad interaction that causes too unnecessary output. Add a simple gate to avoid interpreting a `;` as a `,` when there are unclosed braces.
2021-04-09Auto merge of #81942 - the8472:reduce-ui-test-threads, r=Mark-Simulacrumbors-5/+19
reduce threads spawned by ui-tests The test harness already spawns enough tests to keep all cores busy. Individual tests should keep their own threading to a minimum to avoid context switch overhead. When running ui tests with lld enabled this shaves about 10% off that testsuite on my machine. Resolves #81946
2021-04-09Categorize and explain target features supportMatt Ickstadt-25/+91
2021-04-09Fix perf regression in non-autolinksJoshua Nelson-1/+1
Before, this was compiling the regex on every single item in the crate. This would have been caught by `clippy::declare_interior_mutable_const`.
2021-04-09Auto merge of #84030 - jyn514:no-blanket-impls, r=GuillaumeGomezbors-53/+16
rustdoc: Don't generate blanket impls when running --show-coverage `get_blanket_impls` is the slowest part of rustdoc, and the coverage pass completely ignores blanket impls. This stops running it at all, and also removes some unnecessary checks in `calculate_doc_coverage` that ignored the impl anyway. We don't currently measure --show-coverage in perf.rlo, but I tested this locally on cargo and it brought the time down from 2.9 to 1.6 seconds. This also adds back a commented-out test; Rustdoc has been able to deal with `impl trait` for almost a year now. r? `@GuillaumeGomez`
2021-04-09set allow_fail back on each exampleTimothée Delabrouille-17/+17
2021-04-09Add back missing trait testJoshua Nelson-9/+8
Rustdoc has been able to deal with `impl trait` for almost a year now.
2021-04-09rustdoc: Don't generate blanket impls when running --show-coverageJoshua Nelson-44/+8
get_blanket_impls is the slowest part of rustdoc, and the coverage pass completely ignores blanket impls. This stops running it at all, and also removes some unnecessary checks in `calculate_doc_coverage` that ignored the impl anyway. We don't currently measure --show-coverage in perf.rlo, but I tested this locally on cargo and it brought the time down from 2.9 to 1.6 seconds.
2021-04-09fix misspelling of register xmm23 which made xmm13 being clobbered twiceTimothée Delabrouille-1/+1
2021-04-09conjugationTimothée Delabrouille-1/+1
2021-04-09remove allow_fail and uncomment the [feature(asm)] on every exampleTimothée Delabrouille-30/+30
2021-04-09Merge branch 'issue-76704-fix' of https://github.com/tdelabro/rust into ↵Timothée Delabrouille-1/+1
issue-76704-fix merging
2021-04-09precisions on the authorized labels + typoTimothée Delabrouille-2/+2
2021-04-09Auto merge of #84010 - rodrimati1992:patch-3, r=Mark-Simulacrumbors-0/+6
Mention missing 1.38.0 change in RELEASES.md Mention that doc comments on `pub use` statements are prepended to the documentation of the reexported item Fixes #84007
2021-04-09Auto merge of #83956 - estebank:issue-83892, r=varkorbors-9/+42
Use a more appropriate span for `;` suggestion Fix #83892.
2021-04-09reduce threads spawned by ui-testsThe8472-5/+19
the test harness already spawns enough tests for all cores, individual tests should keep their own threading to a minimum to avoid context switch overhead some tests fail with 1 CGU, so explicit compile flags have been added to keep their old behavior
2021-04-08Add unclosed brace in use tree testEsteban Küber-0/+165
2021-04-09Auto merge of #83870 - jackh726:binder-refactor-fix, r=nikomatsakisbors-86/+237
Don't concatenate binders across types Partially addresses #83737 There's actually two issues that I uncovered in #83737. The first is that we are concatenating bound vars across types, i.e. in ``` F: Fn(&()) -> &mut (dyn Future<Output = ()> + Unpin) ``` the bound vars on `Future` get set as `for<anon>` since those are the binders on `Fn(&()`. This is obviously wrong, since we should only concatenate directly nested trait refs. This is solved here by introducing a new `TraitRefBoundary` scope, that we put around the "syntactical" trait refs and basically don't allow concatenation across. Now, this alone *shouldn't* be a super terrible problem. At least not until you consider the other issue, which is a much more elusive and harder to design a "perfect" fix. A repro can be seen in: ``` use core::future::Future; async fn handle<F>(slf: &F) where F: Fn(&()) -> &mut (dyn for<'a> Future<Output = ()> + Unpin), { (slf)(&()).await; } ``` Notice the `for<'a>` around `Future`. Here, `'a` is unused, so the `for<'a>` Binder gets changed to a `for<>` Binder in the generator witness, but the "local decl" still has it. This has heavy intersections with region anonymization and erasing. Luckily, it's not *super* common to find this unique set of circumstances. It only became apparently because of the first issue mentioned here. However, this *is* still a problem, so I'm leaving #83737 open. r? `@nikomatsakis`
2021-04-08Auto merge of #83941 - wesleywiser:win_dbginfo_closures, r=nagisabors-15/+142
Improve debuginfo for closures and async functions on Windows MSVC The issue was that the resulting debuginfo was too complex for LLVM to translate into CodeView records correctly. As a result, it simply ignored the debuginfo which meant Windows debuggers could not display any closed over variables when stepping inside a closure or async fn. This fixes that by creating additional allocas on the stack so that the resulting debuginfo is simple (just `*my_variable.dbg.spill`) and LLVM can generate the correct CV records. I also updated some of our existing tests to run in CDB to cover this case. Before (closure): ![image](https://user-images.githubusercontent.com/831192/113756857-e6dc4200-96df-11eb-8d6d-b7ed7a84aad5.png) After (closure): ![image](https://user-images.githubusercontent.com/831192/113757067-2e62ce00-96e0-11eb-89f7-7dc8ab89b1b8.png) Before (async): ![image](https://user-images.githubusercontent.com/831192/114077916-4e2bfa80-9876-11eb-9f15-e302d1faa652.png) After (async): ![image](https://user-images.githubusercontent.com/831192/114077677-0d33e600-9876-11eb-8ce3-cac20a9ea94a.png) Fixes #83709
2021-04-09add 'allow_fail' to exampleTimothée-1/+1
2021-04-08New 'Label' section with example and explainationsTimothée Delabrouille-3/+37
2021-04-08Auto merge of #84008 - Dylan-DPC:rollup-invxvg8, r=Dylan-DPCbors-6199/+10738
Rollup of 6 pull requests Successful merges: - #80733 (Improve links in inline code in `core::pin`.) - #81764 (Stabilize `rustdoc::bare_urls` lint) - #81938 (Stabilize `peekable_peek_mut`) - #83980 (Fix outdated crate names in compiler docs) - #83992 (Merge idents when generating source content) - #84001 (Update Clippy) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-08Mention missing 1.38.0 change in RELEASES.mdrodrimati1992-0/+6
Mention that doc comments on `pub use` statements are prepended to the documentation of the reexported item
2021-04-08Rollup merge of #84001 - flip1995:clippyup, r=ManishearthDylan DPC-5900/+10307
Update Clippy Biweekly Clippy update r? ``@Manishearth``
2021-04-08Rollup merge of #83992 - GuillaumeGomez:merge-idents, r=notriddleDylan DPC-18/+127
Merge idents when generating source content The idea here is to not have a span for each part of a path. Currently, for `a::b::c` we generate `<span>a</span>::<span>b</span>::<span>c</span>`, with this change, we will generate `<span>a::b::c</span>`. A nice "side-effect" is that it reduces the size of the output HTML too. :) cc `@notriddle`
2021-04-08Rollup merge of #83980 - pierwill:fix-compiler-librustc-names, r=davidtwcoDylan DPC-27/+27
Fix outdated crate names in compiler docs Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged.
2021-04-08Rollup merge of #81938 - lukaslueg:stab_peek_mut, r=AmanieuDylan DPC-15/+35
Stabilize `peekable_peek_mut` Resolves #78302. Also adds some documentation on `std::iter::Iterator::peekable()` regarding the new method. The feature was added in #77491 in Nov' 20, which is recently, but the feature seems reasonably small. Never did a stabilization-pr, excuse my ignorance if there is a protocol I'm not aware of.
2021-04-08Rollup merge of #81764 - jyn514:lint-links, r=GuillaumeGomezDylan DPC-135/+129
Stabilize `rustdoc::bare_urls` lint Closes https://github.com/rust-lang/rust/issues/77501. Closes https://github.com/rust-lang/rust/issues/83598.