about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-04-06Auto merge of #95723 - SparrowLii:const_goto, r=fee1-deadbors-127/+167
enhance `ConstGoto` mir-opt by moving up `StorageDead` statements From the `FIXME` in the implementation of `ConstGoto` miropt. We can move `StorageDead` statements up to the predecessor. This can expand the scope of application of this opt.
2022-04-06enhance `ConstGoto` mir-opt by moving up `StorageDead` statementsSparrowLii-127/+167
2022-04-06Auto merge of #95720 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 5 commits in 1ef1e0a12723ce9548d7da2b63119de9002bead8..e2e2dddebe66dfc1403a312653557e332445308b 2022-03-31 00:17:18 +0000 to 2022-04-05 17:04:53 +0000 - Part 2 of RFC2906 -- allow inheriting from a different `Cargo.toml` (rust-lang/cargo#10517) - File Cache is valid if checkout or contents hasn't changed (rust-lang/cargo#10507) - Fix how scrape-examples handles proc macros (rust-lang/cargo#10533) - tools: update checkout action on CI (rust-lang/cargo#10521) - Don't error if no binaries were installed (rust-lang/cargo#10508)
2022-04-05Update cargoEric Huss-0/+0
2022-04-06Auto merge of #95711 - Dylan-DPC:rollup-ujss3oi, r=Dylan-DPCbors-12/+57
Rollup of 4 pull requests Successful merges: - #95659 (Rely on #[link] attribute for unwind on Fuchsia.) - #95684 (rustdoc: Fix item info display overflow) - #95693 (interp: pass TyCtxt to Machine methods that do not take InterpCx) - #95699 (fix: Vec leak when capacity is 0) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-04-06Rollup merge of #95699 - SparkyPotato:master, r=dtolnayDylan DPC-1/+2
fix: Vec leak when capacity is 0 When `RawVec::with_capacity_in` is called with capacity 0, an allocation of size 0 is allocated. However, `<RawVec as Drop>::drop` doesn't deallocate, since it only checks if capacity was 0. Fixed by not allocating when capacity is 0.
2022-04-06Rollup merge of #95693 - RalfJung:more-context, r=oli-obkDylan DPC-7/+15
interp: pass TyCtxt to Machine methods that do not take InterpCx This just seems like something you might need, so let's consistently have it. One day we might have to add `ParamEnv` as well, though that seems less likely (and in Miri you can always use `reveal_all` anyway). It might make sense to have a type that packages `TyCtxt` and `ParamEnv`, this pairing occurs quite frequently in rustc... r? `@oli-obk`
2022-04-06Rollup merge of #95684 - GuillaumeGomez:fix-item-info-overflow, r=notriddleDylan DPC-2/+40
rustdoc: Fix item info display overflow I came across this issue when reading local `Iterator` docs (reproduced in this screenshot): ![Screenshot from 2022-04-05 17-45-13](https://user-images.githubusercontent.com/3050060/161798150-769ee838-4768-4df8-9d34-b02eb8104eed.png) The problem comes from the fact that `span` isn't `display: block` by default. Since `item-info` was already present on `<div>` in other places, I moved the last one to `div` as well. r? `@notriddle`
2022-04-06Rollup merge of #95659 - anp:remove-link-print, r=tmandryDylan DPC-2/+0
Rely on #[link] attribute for unwind on Fuchsia. Closes #95575.
2022-04-06Auto merge of #95469 - ChrisDenton:unsound-read-write, r=joshtriplettbors-78/+155
Fix unsound `File` methods This is a draft attempt to fix #81357. *EDIT*: this PR now tackles `read()`, `write()`, `read_at()`, `write_at()` and `read_buf`. Still needs more testing though. cc `@jstarks,` can you confirm the the Windows team is ok with the Rust stdlib using `NtReadFile` and `NtWriteFile`? ~Also, I'm provisionally using `CancelIo` in a last ditch attempt to recover but I'm not sure that this is actually a good idea. Especially as getting into this state would be a programmer error so aborting the process is justified in any case.~ *EDIT*: removed, see comments.
2022-04-05Auto merge of #95702 - Dylan-DPC:rollup-793rz6v, r=Dylan-DPCbors-384/+907
Rollup of 8 pull requests Successful merges: - #88025 (ScmCredentials netbsd implementation.) - #95473 (track individual proc-macro expansions in the self-profiler) - #95547 (caution against ptr-to-int transmutes) - #95585 (Explain why `&T` is cloned when `T` is not `Clone`) - #95591 (Use revisions to track NLL test output (part 1)) - #95663 (diagnostics: give a special note for unsafe fn / Fn/FnOnce/FnMut) - #95673 (:arrow_up: rust-analyzer) - #95681 (resolve: Fix resolution of empty paths passed from rustdoc) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-04-05Rollup merge of #95681 - petrochenkov:doclinkregr2, r=Dylan-DPCDylan DPC-1/+21
resolve: Fix resolution of empty paths passed from rustdoc Fixes https://github.com/rust-lang/rust/pull/95337#issuecomment-1088426179
2022-04-05Rollup merge of #95673 - lnicola:rust-analyzer-2022-04-05, r=lnicolaDylan DPC-16/+31
:arrow_up: rust-analyzer r? ``@ghost``
2022-04-05Rollup merge of #95663 - notriddle:notriddle/unsafe-fn-closure, ↵Dylan DPC-10/+44
r=compiler-errors diagnostics: give a special note for unsafe fn / Fn/FnOnce/FnMut Fixes #90073
2022-04-05Rollup merge of #95591 - jackh726:nll-revisions-1, r=oli-obkDylan DPC-328/+588
Use revisions to track NLL test output (part 1) The idea here is 2 fold: 1) When we eventually do make NLL default on, that PR should be systematic in "delete revisions and corresponding error annotations" 2) This allows us to look at test NLL outputs in chunks. (Though, I've opted here not to "mark" these tests. There are some tests with NLL revisions *now* that will be missed. I expect we do a second pass once we have all the tests with NLL revisions; these tests should be easy enough to eyeball.) The actual review here should be "easy", but a bit tedious. I expect we should manually go through each test output and confirm it's okay. The majority of these are either: 1) Only span change (the one I see most common is highlighting an entire function call, rather than just the function name in that call) 2) "E0308 mismatched types" -> "lifetime does not live long enough" 3) "E0495 cannot infer an appropriate lifetime for lifetime parameter" -> "lifetime does not live long enough" 4) "E0312 lifetime of reference outlives lifetime of borrowed content" -> "lifetime does not live long enough" 5) "E0759 `XXX` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement" -> "lifetime does not live long enough" 6) "E0623 lifetime mismatch" -> "lifetime does not live long enough" Other than the now lack of an error code, most of these look fine (with most giving more helpful suggestions now). `rfc1623` output isn't great. cc ``@marmeladema`` if you want to look through these Let's r? ``@oli-obk`` since you've commented on the Zulip thread ;)
2022-04-05Rollup merge of #95585 - compiler-errors:ref-clone, r=estebankDylan DPC-6/+86
Explain why `&T` is cloned when `T` is not `Clone` Fixes #95535
2022-04-05Rollup merge of #95547 - RalfJung:ptr-int-transmutes, r=scottmcmDylan DPC-0/+10
caution against ptr-to-int transmutes I don't know how strong of a statement we want to make here, but I am very concerned that the current docs could be interpreted as saying that ptr-to-int transmutes are just as okay as transmuting `*mut T` into an `&mut T`. Examples [like this](https://github.com/rust-lang/unsafe-code-guidelines/issues/286#issuecomment-1085144431) show that ptr-to-int transmutes are deeply suspicious -- they are either UB, or they don't round-trip properly, or we have to basically say that `transmute` will actively look for pointers and do all the things a ptr-to-int cast does (which includes a global side-effect of marking the pointed-to allocation as 'exposed'). Another alternative might be to simply not talk about them... but we *do* want people to use casts rather than transmutes for this. Cc `@rust-lang/lang`
2022-04-05Rollup merge of #95473 - lqd:macro-expansion, r=petrochenkovDylan DPC-10/+24
track individual proc-macro expansions in the self-profiler As described in [this zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Macro.20expansion.20performance.20on.20complex.20macros/near/275063190), users don't currently have a lot of information to diagnose macro expansion performance issues. That comment suggests using the macro names to add further timing information. This PR starts to do this for proc-macros which have the same issue, and performance problems happening in the wild in [this other zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/Identifying.20proc-macro.20slowdowns) could be helped by such information. It uses the available proc-macro name to track their individual expansions with self-profiling events. r? `@Aaron1011` who mentioned this idea originally
2022-04-05Rollup merge of #88025 - devnexen:netbsd_scm_creds, r=AmanieuDylan DPC-13/+103
ScmCredentials netbsd implementation.
2022-04-05Auto merge of #95035 - m-ou-se:futex-locks-on-linux, r=Amanieubors-41/+251
Replace Linux Mutex and Condvar with futex based ones. Tracking issue: https://github.com/rust-lang/rust/issues/93740
2022-04-06formattingSparkyPotato-1/+1
2022-04-06cleanupSparkyPotato-8/+2
2022-04-06fix Vec leak with 0 capacitySparkyPotato-0/+7
2022-04-05diagnostics: tweak error message to give more rationale to unsafe FnMichael Howell-20/+23
2022-04-05interp: pass TyCtxt to Machine methods that do not take InterpCxRalf Jung-7/+15
2022-04-05Auto merge of #94527 - oli-obk:undef_scalars, r=nagisa,erikdesjardinbors-334/+467
Let CTFE to handle partially uninitialized unions without marking the entire value as uninitialized. follow up to #94411 To fix https://github.com/rust-lang/rust/issues/69488 and by extension fix https://github.com/rust-lang/rust/issues/94371, we should stop treating types like `MaybeUninit<usize>` as something that the `Scalar` type in the interpreter engine can represent. So we add a new field to `abi::Primitive` that records whether the primitive is nested in a union cc `@RalfJung` r? `@ghost`
2022-04-05Explain why `&T` is cloned when `T` is not `Clone`Michael Goulet-6/+86
2022-04-05Update browser-ui-test version to 0.8.5Guillaume Gomez-1/+1
2022-04-05Add GUI test to ensure that the width of the item-info does not overflow its ↵Guillaume Gomez-0/+38
parent
2022-04-05Generate a <div> instead of a <span> for item-info elementsGuillaume Gomez-1/+1
2022-04-05unboxed-closures and type-alias-impl-trait nll revisionsJack Huey-20/+42
2022-04-05underscore-lifetime nll revisionsJack Huey-7/+19
2022-04-05More nll revisionsJack Huey-223/+380
2022-04-05Move some tests with compare-mode=nll output to revisionsJack Huey-78/+147
2022-04-05Reword comment in futex condvar implementation.Mara Bos-1/+1
2022-04-05Auto merge of #95680 - Dylan-DPC:rollup-7jldtnz, r=Dylan-DPCbors-75/+453
Rollup of 4 pull requests Successful merges: - #95525 (Suggest derivable trait on E0277 error) - #95654 (diagnostics: use correct span for const generics) - #95660 (Update panic docs to make it clearer when to use panic vs Result) - #95670 (Refactor: remove unused function parameters) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-04-05Rollup merge of #95670 - TaKO8Ki:remove-unused-function-parameters, r=davidtwcoDylan DPC-12/+3
Refactor: remove unused function parameters
2022-04-05Rollup merge of #95660 - yaahc:panic-docs-update, r=Dylan-DPCDylan DPC-7/+19
Update panic docs to make it clearer when to use panic vs Result This is based on a question that came up in one of my [error handling office hours](https://twitter.com/yaahc_/status/1506376624509374467?s=20&t=Sp-cEjrx5kpMdNsAGPOo9w) meetings. I had a user who was fairly familiar with error type design, thiserror and anyhow, and rust in general, but who was still confused about when to use panics vs when to use Result and `Error`. This will also be cross referenced in an error handling FAQ that I will be creating in the https://github.com/rust-lang/project-error-handling repo shortly.
2022-04-05Rollup merge of #95654 - notriddle:notriddle/issue-95616, r=davidtwcoDylan DPC-56/+91
diagnostics: use correct span for const generics Fixes #95616
2022-04-05Rollup merge of #95525 - ohno418:suggest-derivable-trait-E0277, ↵Dylan DPC-0/+340
r=compiler-errors Suggest derivable trait on E0277 error Closes https://github.com/rust-lang/rust/issues/95099 .
2022-04-05resolve: Fix resolution of empty paths passed from rustdocVadim Petrochenkov-1/+21
2022-04-05track proc-macro expansions in the self-profilerRémy Rakic-10/+24
Use the proc-macro descr to track their individual expansions with self-profiling events. This will help diagnose performance issues with slow proc-macros.
2022-04-05Use WrappingRange::full instead of hand-rolling itOli Scherer-6/+3
2022-04-05mir-interpret now treats unions as non-immediate, even if they have scalar ↵Oli Scherer-47/+115
layout, allowing partially initializing them
2022-04-05Mark scalar layout unions so that backends that do not support partially ↵Oli Scherer-289/+357
initialized scalars can special case them.
2022-04-05Mark unix::locks::futex::Mutex::new as #[inline].Mara Bos-0/+1
2022-04-05:arrow_up: rust-analyzerLaurențiu Nicola-16/+31
2022-04-05remove unused function parametersTakayuki Maeda-12/+3
2022-04-05Auto merge of #95667 - Dylan-DPC:rollup-n7xzs3y, r=Dylan-DPCbors-1191/+3104
Rollup of 5 pull requests Successful merges: - #95234 (bootstrap.py: nixos check in /etc/os-release with quotes) - #95449 (Fix `x doc --stage 0 compiler`) - #95512 (diagnostics: translation infrastructure) - #95607 (Note invariance reason for FnDef types) - #95645 (Fix intra doc link ICE when trying to get traits in scope for primitive) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-04-05Fix ui test for nllohno418-0/+4