about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2023-06-22Migrate item_bounds to ty::ClauseMichael Goulet-8/+8
2023-06-22drop perform_read_access (always read) in favor of zero_sizeNeven Villani-26/+38
2023-06-22Merge from rustcRalf Jung-1732/+5631
2023-06-22Preparing for merge from rustcRalf Jung-1/+1
2023-06-21Update cargoWeihang Lo-0/+0
2023-06-21Remove outdated import in r-a proc macro server.Mara Bos-4/+1
2023-06-21change edition to 2021, fix clippy warnsklensy-11/+11
2023-06-21rust-installer: drop clap v3, migrate to v4klensy-36/+36
2023-06-21Auto merge of #112877 - Nilstrieb:rollup-5g5hegl, r=Nilstriebbors-37/+40
Rollup of 6 pull requests Successful merges: - #112632 (Implement PartialOrd for `Vec`s over different allocators) - #112759 (Make closure_saved_names_of_captured_variables a query. ) - #112772 (Add a fully fledged `Clause` type, rename old `Clause` to `ClauseKind`) - #112790 (Syntactically accept `become` expressions (explicit tail calls experiment)) - #112830 (More codegen cleanups) - #112844 (Add retag in MIR transform: `Adt` for `Unique` may contain a reference) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-21Rollup merge of #112790 - WaffleLapkin:syntactically, r=NilstriebNilstrieb-0/+3
Syntactically accept `become` expressions (explicit tail calls experiment) This adds `ast::ExprKind::Become`, implements parsing and properly gates the feature. cc `@scottmcm`
2023-06-21Rollup merge of #112772 - compiler-errors:clauses-1, r=lcnrNilstrieb-37/+37
Add a fully fledged `Clause` type, rename old `Clause` to `ClauseKind` Does two basic things before I put up a more delicate set of PRs (along the lines of #112714, but hopefully much cleaner) that migrate existing usages of `ty::Predicate` to `ty::Clause` (`predicates_of`/`item_bounds`/`ParamEnv::caller_bounds`). 1. Rename `Clause` to `ClauseKind`, so it's parallel with `PredicateKind`. 2. Add a new `Clause` type which is parallel to `Predicate`. * This type exposes `Clause::kind(self) -> Binder<'tcx, ClauseKind<'tcx>>` which is parallel to `Predicate::kind` 😸 The new `Clause` type essentially acts as a newtype wrapper around `Predicate` that asserts that it is specifically a `PredicateKind::Clause`. Turns out from experimentation[^1] that this is not negative performance-wise, which is wonderful, since this a much simpler design than something that requires encoding the discriminant into the alignment bits of a predicate kind, or something else like that... r? ``@lcnr`` or ``@oli-obk`` [^1]: https://github.com/rust-lang/rust/pull/112714#issuecomment-1595653910
2023-06-21Auto merge of #106450 - albertlarsan68:fix-arc-ptr-eq, r=Amanieubors-28/+8
Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata FCP completed in https://github.com/rust-lang/rust/issues/103763#issuecomment-1362267967 Closes #103763
2023-06-20Delete use of proc_macro_span_shrink from proc-macro2David Tolnay-10/+10
2023-06-20Add `Span::{line, column}`Jacob Pratt-0/+10
2023-06-20`Span::{before, after}` → `Span::{start, end}`Jacob Pratt-2/+2
2023-06-20Remove `LineColumn`, `Span::start`, `Span::end`Jacob Pratt-8/+0
2023-06-20Update cargoWeihang Lo-3/+0
2023-06-20add support for needs-dynamic-linkingPietro Albini-0/+5
2023-06-20avoid dynamic linking on targets that do not support dynamic linkingPietro Albini-1/+3
2023-06-20merge target spec and --print=cfg for compiletest target infoPietro Albini-64/+24
2023-06-20Auto merge of #2520 - saethlin:mmap-shim, r=RalfJungbors-12/+521
mmap/munmap/mremamp shims This adds basic support for `mmap`/`mremap`/`munmap`, with the specific goal of testing allocators targeting Linux under Miri. This supports `mmap` with `MAP_PRIVATE|MAP_ANONYMOUS`, and `PROT_READ|PROT_WRITE`, and explicitly does not support `MAP_SHARED` (because that's asking for MMIO) as well as any kind of file mapping (because it seems like nobody does `MAP_PRIVATE` on files even though that would be very sensible). And (officially) we don't support `MAP_FIXED`, so we always ignore the `addr` argument. This supports `mremap` only when the implementation is allowed to move the mapping (so no `MREMAP_FIXED`, no `MREMAP_DONTUNMAP`, and required `MREMAP_MAYMOVE`), and also when the entirety of a region previously mapped by `mmap` is being remapped. This supports `munmap` but only when the entirety of a region previously mapped by `mmap` is unmapped.
2023-06-20Improve organizationBen Kimock-83/+90
2023-06-20Make munmap throw unsup errors instead of trying to workBen Kimock-64/+68
2023-06-20mmap/munmap/mremamp shimsBen Kimock-12/+510
2023-06-20Auto merge of #112821 - calebcartwright:rustfmt-sync, r=calebcartwrightbors-366/+1622
update rustfmt changes described in https://github.com/rust-lang/rustfmt/blob/master/CHANGELOG.md#153-2023-06-20 r? `@ghost` cc `@rust-lang/rustfmt`
2023-06-19Merge commit '3f7c366fc0464e01ddcaefbd70647cb3da4202be' into rustfmt-syncCaleb Cartwright-366/+1622
2023-06-19Rollup merge of #112499 - tgross35:py-ruff-fixes, r=Mark-SimulacrumMichael Goulet-14/+22
Fix python linting errors These were flagged by `ruff`, run using the config in https://github.com/rust-lang/rust/pull/112482
2023-06-19Rollup merge of #112232 - fee1-dead-contrib:match-eq-const-msg, r=b-naberMichael Goulet-1/+1
Better error for non const `PartialEq` call generated by `match` Resolves #90237
2023-06-19Rollup merge of #112780 - compiler-errors:tait-is-ambig, r=lcnrMatthias Krüger-14/+25
Treat TAIT equation as always ambiguous in coherence Not sure why we weren't treating all TAIT equality as ambiguous -- this behavior combined with `DefineOpaqueTypes::No` leads to coherence overlap failures, since we incorrectly consider impls as not overlapping because the obligation `T: From<Foo>` doesn't hold. Fixes #112765
2023-06-19s/Clause/ClauseKindMichael Goulet-37/+37
2023-06-19Support `ast::ExprKind::Become` in clippyMaybe Waffle-0/+1
2023-06-19Implement `become` expression formatting in rustfmtMaybe Waffle-0/+2
2023-06-19bless new testsRalf Jung-2/+2
2023-06-19Merge commit 'cd3bf9fe51676b520c546460e6d8919b8c8ff99f' into sync-from-raLaurențiu Nicola-1250/+3891
2023-06-18Fixes tests/ui/test-attrs/tests-listing-format-json.rs on WindowsForrestOfBarnes-1/+4
2023-06-18Treat TAIT equation as always ambiguous in coherenceMichael Goulet-14/+25
2023-06-18Rollup merge of #112663 - klensy:dusk-and-dawn, r=pietroalbiniMichael Goulet-5/+1
cleanup azure leftovers Continuation of #97756
2023-06-18Merge from rustcRalf Jung-6/+8
2023-06-18Preparing for merge from rustcRalf Jung-1/+1
2023-06-18Rollup merge of #112667 - compiler-errors:wf-goal-is-clause, r=lcnrMatthias Krüger-2/+2
Move WF/ConstEvaluatable goal to clause It can show up in a param-env, so I think it needs to be a clause kind. r? ```@lcnr``` or ```@oli-obk```
2023-06-18Better error for non const `PartialEq` call generated by `match`Deadbeef-1/+1
2023-06-17Move ConstEvaluatable to ClauseMichael Goulet-1/+1
2023-06-17Move WF goal to clauseMichael Goulet-1/+1
2023-06-17Auto merge of #112746 - matthiaskrgr:rollup-se59bfd, r=matthiaskrgrbors-1/+3
Rollup of 5 pull requests Successful merges: - #110805 (Github action to periodically `cargo update` to keep dependencies current) - #112435 (Allow overwriting the sysroot compile flag via --rustc-args) - #112610 (Bump stdarch) - #112619 (Suggest bumping download-ci-llvm-stamp if the build config for llvm changes) - #112738 (make ice msg "Unknown runtime phase" a bit nicer) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-17Rollup merge of #112435 - antoyo:allow-overwrite-sysroot, r=Mark-SimulacrumMatthias Krüger-1/+3
Allow overwriting the sysroot compile flag via --rustc-args Hi. As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/How.20to.20overwrite.20sysroot.20in.20x.2Epy.20test/near/364272269), this is a solution to allow the codegens to overwrite the sysroot as part of their test suite. Thanks for the review.
2023-06-17Auto merge of #100036 - DrMeepster:box_free_free_box, r=oli-obkbors-3/+3
Remove `box_free` lang item This PR removes the `box_free` lang item, replacing it with `Box`'s `Drop` impl. Box dropping is still slightly magic because the contained value is still dropped by the compiler.
2023-06-17Merge from rustcRalf Jung-77/+52
2023-06-17Preparing for merge from rustcRalf Jung-1/+1
2023-06-16Apply changes to fix python linting errorsTrevor Gross-14/+22
2023-06-17Auto merge of #108860 - oli-obk:tait_alias, r=compiler-errorsbors-76/+51
Add `AliasKind::Weak` for type aliases. `type Foo<T: Debug> = Bar<T>;` does not check `T: Debug` at use sites of `Foo<NotDebug>`, because in contrast to a ```rust trait Identity { type Identity; } impl<T: Debug> Identity for T { type Identity = T; } <NotDebug as Identity>::Identity ``` type aliases do not exist in the type system, but are expanded to their aliased type immediately when going from HIR to the type layer. Similarly: * a private type alias for a public type is a completely fine thing, even though it makes it a bit hard to write out complex times sometimes * rustdoc expands the type alias, even though often times users use them for documentation purposes * diagnostics show the expanded type, which is confusing if the user wrote a type alias and the diagnostic talks about another type that they don't know about. For type alias impl trait, these issues do not actually apply in most cases, but sometimes you have a type alias impl trait like `type Foo<T: Debug> = (impl Debug, Bar<T>);`, which only really checks it for `impl Debug`, but by accident prevents `Bar<T>` from only being instantiated after proving `T: Debug`. This PR makes sure that we always check these bounds explicitly and don't rely on an implementation accident. To not break all the type aliases out there, we only use it when the type alias contains an opaque type. We can decide to do this for all type aliases over an edition. Or we can later extend this to more types if we figure out the back-compat concerns with suddenly checking such bounds. As a side effect, easily allows fixing https://github.com/rust-lang/rust/issues/108617, which I did. fixes https://github.com/rust-lang/rust/issues/108617