about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2022-03-30Update cargoEric Huss-0/+0
2022-03-31Auto merge of #95501 - Dylan-DPC:rollup-arx6sdc, r=Dylan-DPCbors-1/+1
Rollup of 6 pull requests Successful merges: - #93901 (Stabilize native library modifier syntax and the `whole-archive` modifier specifically) - #94806 (Fix `cargo run tidy`) - #94869 (Add the generic_associated_types_extended feature) - #95011 (async: Give predictable name to binding generated from .await expressions.) - #95251 (Reduce max hash in raw strings from u16 to u8) - #95298 (Fix double drop of allocator in IntoIter impl of Vec) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-31Rollup merge of #95251 - GrishaVar:hashes-u16-to-u8, r=dtolnayDylan DPC-1/+1
Reduce max hash in raw strings from u16 to u8 [Relevant discussion](https://rust-lang.zulipchat.com/#narrow/stream/237824-t-lang.2Fdoc/topic/Max.20raw.20string.20delimiters)
2022-03-30Auto merge of #95436 - cjgillot:static-mut, r=oli-obkbors-7/+13
Remember mutability in `DefKind::Static`. This allows to compute the `BodyOwnerKind` from `DefKind` only, and removes a direct dependency of some MIR queries onto HIR. As a side effect, it also simplifies metadata, since we don't need 4 flavours of `EntryKind::*Static` any more.
2022-03-30Auto merge of #95458 - calebcartwright:sync-rustfmt-subtree, r=calebcartwrightbors-235/+2013
Sync rustfmt subtree r? `@calebcartwright`
2022-03-30Auto merge of #94963 - lcnr:inherent-impls-std, r=oli-obk,m-ou-sebors-74/+78
allow arbitrary inherent impls for builtin types in core Part of https://github.com/rust-lang/compiler-team/issues/487. Slightly adjusted after some talks with `@m-ou-se` about the requirements of `t-libs-api`. This adds a crate attribute `#![rustc_coherence_is_core]` which allows arbitrary impls for builtin types in core. For other library crates impls for builtin types should be avoided if possible. We do have to allow the existing stable impls however. To prevent us from accidentally adding more of these in the future, there is a second attribute `#[rustc_allow_incoherent_impl]` which has to be added to **all impl items**. This only supports impls for builtin types but can easily be extended to additional types in a future PR. This implementation does not check for overlaps in these impls. Perfectly checking that requires us to check the coherence of these incoherent impls in every crate, as two distinct dependencies may add overlapping methods. It should be easy enough to detect if it goes wrong and the attribute is only intended for use inside of std. The first two commits are mostly unrelated cleanups.
2022-03-30clippy: nameres for primitive type implslcnr-38/+75
2022-03-30get clippy to compile againlcnr-59/+26
2022-03-30Auto merge of #95466 - Dylan-DPC:rollup-g7ddr8y, r=Dylan-DPCbors-0/+4
Rollup of 5 pull requests Successful merges: - #95294 (Document Linux kernel handoff in std::io::copy and std::fs::copy) - #95443 (Clarify how `src/tools/x` searches for python) - #95452 (fix since field version for termination stabilization) - #95460 (Spellchecking compiler code) - #95461 (Spellchecking some comments) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-30Rollup merge of #95443 - jyn514:clarify-python-search-logic, r=Dylan-DPCDylan DPC-0/+4
Clarify how `src/tools/x` searches for python Before, it confusingly looked like `python` was chosen last instead of first.
2022-03-30Auto merge of #94081 - oli-obk:lazy_tait_take_two, r=nikomatsakisbors-1/+1
Lazy type-alias-impl-trait take two ### user visible change 1: RPIT inference from recursive call sites Lazy TAIT has an insta-stable change. The following snippet now compiles, because opaque types can now have their hidden type set from wherever the opaque type is mentioned. ```rust fn bar(b: bool) -> impl std::fmt::Debug { if b { return 42 } let x: u32 = bar(false); // this errors on stable 99 } ``` The return type of `bar` stays opaque, you can't do `bar(false) + 42`, you need to actually mention the hidden type. ### user visible change 2: divergence between RPIT and TAIT in return statements Note that `return` statements and the trailing return expression are special with RPIT (but not TAIT). So ```rust #![feature(type_alias_impl_trait)] type Foo = impl std::fmt::Debug; fn foo(b: bool) -> Foo { if b { return vec![42]; } std::iter::empty().collect() //~ ERROR `Foo` cannot be built from an iterator } fn bar(b: bool) -> impl std::fmt::Debug { if b { return vec![42] } std::iter::empty().collect() // Works, magic (accidentally stabilized, not intended) } ``` But when we are working with the return value of a recursive call, the behavior of RPIT and TAIT is the same: ```rust type Foo = impl std::fmt::Debug; fn foo(b: bool) -> Foo { if b { return vec![]; } let mut x = foo(false); x = std::iter::empty().collect(); //~ ERROR `Foo` cannot be built from an iterator vec![] } fn bar(b: bool) -> impl std::fmt::Debug { if b { return vec![]; } let mut x = bar(false); x = std::iter::empty().collect(); //~ ERROR `impl Debug` cannot be built from an iterator vec![] } ``` ### user visible change 3: TAIT does not merge types across branches In contrast to RPIT, TAIT does not merge types across branches, so the following does not compile. ```rust type Foo = impl std::fmt::Debug; fn foo(b: bool) -> Foo { if b { vec![42_i32] } else { std::iter::empty().collect() //~^ ERROR `Foo` cannot be built from an iterator over elements of type `_` } } ``` It is easy to support, but we should make an explicit decision to include the additional complexity in the implementation (it's not much, see a721052457cf513487fb4266e3ade65c29b272d2 which needs to be reverted to enable this). ### PR formalities previous attempt: #92007 This PR also includes #92306 and #93783, as they were reverted along with #92007 in #93893 fixes #93411 fixes #88236 fixes #89312 fixes #87340 fixes #86800 fixes #86719 fixes #84073 fixes #83919 fixes #82139 fixes #77987 fixes #74282 fixes #67830 fixes #62742 fixes #54895
2022-03-29Merge commit '5ff7b632a95bac6955611d85040859128902c580' into ↵Caleb Cartwright-235/+2013
sync-rustfmt-subtree
2022-03-29update miriRalf Jung-8/+8
2022-03-29Clarify how `src/tools/x` searches for pythonJoshua Nelson-0/+4
2022-03-29Remember mutability in `DefKind::Static`.Camille GILLOT-7/+13
This allows to compute the `BodyOwnerKind` from `DefKind` only, and removes a direct dependency of some MIR queries onto HIR. As a side effect, it also simplifies metadata, since we don't need 4 flavours of `EntryKind::*Static` any more.
2022-03-29:arrow_up: rust-analyzerLaurențiu Nicola-24/+16
2022-03-28Added another folder to the `ui` dirOli Scherer-1/+1
2022-03-28Remove opaque type obligation and just register opaque types as they are ↵Oli Scherer-1/+0
encountered. This also registers obligations for the hidden type immediately.
2022-03-28Revert "Auto merge of #93893 - oli-obk:sad_revert, r=oli-obk"Oli Scherer-0/+1
This reverts commit 6499c5e7fc173a3f55b7a3bd1e6a50e9edef782d, reversing changes made to 78450d2d602b06d9b94349aaf8cece1a4acaf3a8.
2022-03-26Bump the ripgrep commit exercised by cargotestDavid Tolnay-1/+1
2022-03-26Auto merge of #95274 - jendrikw:slice-must-use, r=Dylan-DPCbors-30/+30
add #[must_use] to functions of slice and its iterators. Continuation of #92853. Tracking issue: #89692.
2022-03-26add #[must_use] to functions of slice and its iterators.Jendrik-18/+18
2022-03-26add #[must_use] to functions of slice and its iterators.Jendrik-12/+12
2022-03-26Auto merge of #95149 - cjgillot:once-diag, r=estebankbors-4/+6
Remove `Session::one_time_diagnostic` This is untracked mutable state, which modified the behaviour of queries. It was used for 2 things: some full-blown errors, but mostly for lint declaration notes ("the lint level is defined here" notes). It is replaced by the diagnostic deduplication infra which already exists in the diagnostic emitter. A new diagnostic level `OnceNote` is introduced specifically for lint notes, to deduplicate subdiagnostics. As a drive-by, diagnostic emission takes a `&mut` to allow dropping the `SubDiagnostic`s.
2022-03-25Auto merge of #95282 - RalfJung:miri, r=RalfJungbors-8/+8
update Miri Fixes https://github.com/rust-lang/rust/issues/95258 r? `@ghost`
2022-03-25Update clippy helper function typesGrisha Vartanyan-1/+1
2022-03-24Auto merge of #95273 - flip1995:clippyup, r=manishearthbors-546/+1957
Update Clippy r? `@Manishearth`
2022-03-24update MiriRalf Jung-8/+8
2022-03-24Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyupflip1995-546/+1957
2022-03-24update clippy stderr fileOli Scherer-0/+10
2022-03-23:arrow_up: rust-analyzerLaurențiu Nicola-19/+23
2022-03-21Rollup merge of #95085 - ouz-a:master5, r=jackh726Matthias Krüger-1/+1
Return err instead of ICE Having `escaping_bound_vars` results in ICE when trying to create `ty::Binder::dummy`, to avoid it we return err like the line above. I think this requires a more sophisticated fix, I would love to investigate if mentorship is available 🤓 Fixes #95023 and #85350
2022-03-21Return err instead of ICEouz-a-1/+1
2022-03-20Take &mut Diagnostic in emit_diagnostic.Camille GILLOT-4/+6
Taking a Diagnostic by move would break the usual pattern `diag.label(..).emit()`.
2022-03-20Auto merge of #95144 - RalfJung:miri, r=RalfJungbors-8/+8
update Miri
2022-03-20update MiriRalf Jung-8/+8
2022-03-20Add once_cell as allowed cg_clif dependencybjorn3-0/+1
2022-03-19Auto merge of #95103 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 9 commits in 65c82664263feddc5fe2d424be0993c28d46377a..109bfbd055325ef87a6e7f63d67da7e838f8300b 2022-03-09 02:32:56 +0000 to 2022-03-17 21:43:09 +0000 - Refactor RegistryData::load to handle management of the index cache (rust-lang/cargo#10482) - Separate VCS command paths with "--" (rust-lang/cargo#10483) - Fix panic when artifact target is used for `[target.'cfg(<target>)'.dependencies` (rust-lang/cargo#10433) - Bump git2@0.14.2 and libgit2-sys@0.13.2 (rust-lang/cargo#10479) - vendor: Don't allow multiple values for --sync (rust-lang/cargo#10448) - Use types to make clere (credential process || token) (rust-lang/cargo#10471) - Warning on conflicting keys (rust-lang/cargo#10316) - Registry functions return Poll to enable parallel fetching of index data (rust-lang/cargo#10064) - Refine the contributor guide (rust-lang/cargo#10468)
2022-03-18Update cargoEric Huss-0/+0
2022-03-18Re-enable parallel debuginfo testsTom Tromey-5/+0
Debuginfo tests are serialized due to some older version of LLDB. However, that comment was last touched in 2014, so presumably these older versions are long since obsolete. Partially fixes bug #72719.
2022-03-18Auto merge of #95065 - matthiaskrgr:rollup-75i6oz5, r=matthiaskrgrbors-8/+8
Rollup of 4 pull requests Successful merges: - #95013 (Update browser-ui-test version to 0.8.2) - #95039 (Make negative coherence work when there's impl negative on super predicates) - #95047 (Refactor: remove an unnecessary pattern for ignoring all parts) - #95048 (update Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-18Rollup merge of #95048 - RalfJung:miri, r=RalfJungMatthias Krüger-8/+8
update Miri Let's get those SIMD intrinsics out there. :) r? `@ghost`
2022-03-18Auto merge of #88098 - Amanieu:oom_panic, r=nagisabors-1/+1
Implement -Z oom=panic This PR removes the `#[rustc_allocator_nounwind]` attribute on `alloc_error_handler` which allows it to unwind with a panic instead of always aborting. This is then used to implement `-Z oom=panic` as per RFC 2116 (tracking issue #43596). Perf and binary size tests show negligible impact.
2022-03-17Rollup merge of #94960 - codehorseman:master, r=oli-obkDylan DPC-30/+30
Fix many spelling mistakes Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-17update MiriRalf Jung-8/+8
2022-03-16rustc_error: make ErrorReported impossible to constructmark-3/+3
There are a few places were we have to construct it, though, and a few places that are more invasive to change. To do this, we create a constructor with a long obvious name.
2022-03-16resolve the conflict in compiler/rustc_session/src/parse.rscodehorseman-30/+30
Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-16Auto merge of #94861 - aDotInTheVoid:rdj-trait-tests, r=CraftSpiderbors-2/+5
rustdoc-json: More tests, and better jsondocck errors Helps with #81359 r? `@CraftSpider` `@rustbot` modify labels: +A-rustdoc-json +T-rustdoc +A-testsuite
2022-03-15jsondocck: Better error for invalid @count numberNixon Enraght-Moony-1/+4
2022-03-15jsondocck: better error for when @set matches multiple itemsNixon Enraght-Moony-1/+1