Commit Graph

245589 Commits

Author SHA1 Message Date
Matthias Krüger
9565e8d81e
Rollup merge of #120783 - integer32llc:improve-release-notes, r=Mark-Simulacrum
Add release note for new ambiguous_wide_pointer_comparisons lint

I found out about this new lint in Rust because I had code allowing the Clippy lint. Clippy alerted me to the lint name change, and I went searching for the new lint's name in the release notes and was surprised there wasn't an item for it.
2024-02-08 20:35:00 +01:00
Matthias Krüger
1db56fbe81
Rollup merge of #120782 - oli-obk:track_errors8, r=WaffleLapkin
Fix mir pass ICE in the presence of other errors

fixes #120779

it is impossible to add a ui test for this, because it only reproduces in build-fail, but a test that also has errors in check-fail mode can't be made build-fail 🙃

I would have to add a run-make test or sth, which is overkill for such a tiny thing imo.
2024-02-08 20:35:00 +01:00
Matthias Krüger
3e523f6d3c
Rollup merge of #120778 - zetanumbers:refactor_try_instance_mir, r=compiler-errors
Deduplicate `tcx.instance_mir(instance)` calls in `try_instance_mir`
2024-02-08 20:34:59 +01:00
Matthias Krüger
949e55299d
Rollup merge of #120775 - Nadrieril:more-min_exh_pats, r=compiler-errors
Make `min_exhaustive_patterns` match `exhaustive_patterns` better

Split off from https://github.com/rust-lang/rust/pull/120742.

There remained two edge cases where `min_exhaustive_patterns` wasn't behaving like `exhaustive_patterns`. This fixes them, and tests the feature in a bunch more cases. I essentially went through all uses of `exhaustive_patterns` to see which ones would be interesting to compare between the two features.

r? `@compiler-errors`
2024-02-08 20:34:59 +01:00
Matthias Krüger
abef17d23b
Rollup merge of #120772 - m-ou-se:review, r=Nilstrieb
Remove myself from review rotation.

I've been unable to keep up with reviews. :(

Not sure if this helps much, considering there aren't many other libs reviewers on the rotation at the moment.

Hopefully I can add myself back again Soon™ when I can commit more time to reviewing.
2024-02-08 20:34:58 +01:00
Matthias Krüger
2386c7c6a8
Rollup merge of #120769 - tshepang:minimal-diffs, r=wesleywiser
make future diffs minimal
2024-02-08 20:34:58 +01:00
Matthias Krüger
1f31daa047
Rollup merge of #120750 - compiler-errors:itctx-by-val, r=cjgillot
No need to take `ImplTraitContext` by ref

We used to mutate `ImplTraitContext`, so it used to be `&mut` mutable ref. Then I think it used to have non-`Copy` data in it, so we took it by `&` ref. Now, none of that remains, so just copy it around.
2024-02-08 20:34:58 +01:00
Matthias Krüger
4ffb1a7f3d
Rollup merge of #120590 - compiler-errors:dead, r=Nilstrieb
Remove unused args from functions

`#[instrument]` suppresses the unused arguments from a function, *and* suppresses unused methods too! This PR removes things which are only used via `#[instrument]` calls, and fixes some other errors (privacy?) that I will comment inline.

It's possible that some of these arguments were being passed in for the purposes of being instrumented, but I am unconvinced by most of them.
2024-02-08 20:34:57 +01:00
Philipp Krones
4ec9eec9e8
Update Cargo.lock 2024-02-08 20:25:09 +01:00
Philipp Krones
beb4f7d523
Merge commit '60cb29c5e4f9772685c9873752196725c946a849' into clippyup 2024-02-08 20:24:42 +01:00
bors
60cb29c5e4 Auto merge of #12246 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2024-02-08 19:17:05 +00:00
Michael Goulet
540be28f6c sort suggestions for object diagnostic 2024-02-08 18:56:52 +00:00
Ayush Singh
92d4060176
Implement SystemTime for UEFI
- Uses SystemTable->RuntimeServices->GetTime()

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-02-09 00:21:36 +05:30
Philipp Krones
2ca6c84194
Bump Clippy version -> 0.1.78 2024-02-08 19:13:40 +01:00
Philipp Krones
031c46dd90
Bump nightly version -> 2024-02-08 2024-02-08 19:13:28 +01:00
Philipp Krones
d2f76f7e6e
Merge remote-tracking branch 'upstream/master' into rustup 2024-02-08 19:13:13 +01:00
onur-ozkan
8801144e3a better error message on download CI LLVM failure
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-02-08 21:07:39 +03:00
Oli Scherer
ad511ef92e Avoid ICE in drop recursion check in case of invalid drop impls 2024-02-08 17:33:04 +00:00
Ben Kimock
88d6e9f868 Reduce use of NonNull::new_unchecked in library/ 2024-02-08 11:52:16 -05:00
Ben Kimock
b0ea682a2c Remove a now-obviated debug_assert! 2024-02-08 11:52:16 -05:00
Ben Kimock
61118ffd04 Rewrite assert_unsafe_precondition around the new intrinsic 2024-02-08 11:52:14 -05:00
Ben Kimock
8836ac5758 Add a new debug_assertions instrinsic (compiler)
And in clippy
2024-02-08 11:49:08 -05:00
Ben Kimock
55fabf35b1 Add a new debug_assertions intrinsic 2024-02-08 11:49:07 -05:00
Ben Kimock
580067c76f InstSimplify rustc_nounwind calls 2024-02-08 11:49:05 -05:00
Ben Kimock
9842a5ca7f Don't lower assume in unoptimized builds 2024-02-08 11:49:04 -05:00
bors
c29082fe7d Auto merge of #120544 - BoxyUwU:enter_forall, r=lcnr
Introduce `enter_forall` to supercede `instantiate_binder_with_placeholders`

r? `@lcnr`

Long term we'd like to experiment with decrementing the universe count after "exiting" binders so that we do not end up creating infer vars in non-root universes even when they logically reside in the root universe. The fact that we dont do this currently results in a number of issues in the new trait solver where we consider goals to be ambiguous because otherwise it would require lowering the universe of an infer var. i.e. the goal  `?x.0 eq <T as Trait<?y.1>>::Assoc` where the alias is rigid would not be able to instantiate `?x` with the alias as there would be a universe error.

This PR is the first-ish sort of step towards being able to implement this as eventually we would want to decrement the universe in `enter_forall`. Unfortunately its Difficult to actually implement decrementing universes nicely so this is a separate step which moves us closer to the long term goal 
2024-02-08 16:42:56 +00:00
Carol (Nichols || Goulding)
5cb9e318c8
Add release note for new ambiguous_wide_pointer_comparisons lint 2024-02-08 11:01:33 -05:00
Michael Goulet
9322882ade Add a couple more tests 2024-02-08 15:46:07 +00:00
Michael Goulet
3bb384aad6 Prefer AsyncFn* over Fn* for coroutine-closures 2024-02-08 15:46:00 +00:00
Oli Scherer
7dc182d5d4 Fix mir pass ICE in the presence of other errors 2024-02-08 14:49:27 +00:00
Oli Scherer
6af2d3cc90 Fix span_bug! backtraces 2024-02-08 14:44:52 +00:00
Boxy
f867742be8 reviews + rebase 2024-02-08 13:19:25 +00:00
Boxy
b181a12623 rename instantiate_binder_with_placeholders 2024-02-08 13:01:08 +00:00
Boxy
ac559af98f introduce enter_forall 2024-02-08 13:01:08 +00:00
zetanumbers
da4ec6ffa7 Deduplicate tcx.instance_mir(instance) calls in try_instance_mir 2024-02-08 15:47:14 +03:00
Mark Rousskov
9a5034a20e Step all bootstrap cfgs forward
This also takes care of other bootstrap-related changes.
2024-02-08 07:44:34 -05:00
Mark Rousskov
9784a14859 Bump to newly branched stage0 compiler 2024-02-08 07:43:38 -05:00
Mark Rousskov
8043821b3a Bump version placeholders 2024-02-08 07:43:38 -05:00
Oli Scherer
d80d7ea1e3 Add some tests for associated type normalization edge cases 2024-02-08 12:28:35 +00:00
bors
1280928a99 Auto merge of #120767 - matthiaskrgr:rollup-0k8ib1c, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #119592 (resolve: Unload speculatively resolved crates before freezing cstore)
 - #120103 (Make it so that async-fn-in-trait is compatible with a concrete future in implementation)
 - #120206 (hir: Make sure all `HirId`s have corresponding HIR `Node`s)
 - #120214 (match lowering: consistently lower bindings deepest-first)
 - #120688 (GVN: also turn moves into copies with projections)
 - #120702 (docs: also check the inline stmt during redundant link check)
 - #120727 (exhaustiveness: Prefer "`0..MAX` not covered" to "`_` not covered")
 - #120734 (Add `SubdiagnosticMessageOp` as a trait alias.)
 - #120739 (improve pretty printing for associated items in trait objects)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-02-08 12:14:19 +00:00
joboet
c0d9776562
std: move path into sys 2024-02-08 12:51:35 +01:00
Nadrieril
4733b1bba5 Test min_exhaustive_patterns in more cases 2024-02-08 11:48:38 +01:00
Nadrieril
30793ca818 Match min_exhaustive_patterns implementation with exhaustive_patterns 2024-02-08 11:23:52 +01:00
Mara Bos
f676c3d504 Remove myself from review rotation. 2024-02-08 11:06:02 +01:00
bors
af88f7db51 Auto merge of #120550 - oli-obk:track_errors8, r=estebank
Continue to borrowck even if there were previous errors

but only from the perspective of the whole compiler. Individual items should not get borrowcked if their MIR is tainted by errors.

r? `@estebank` `@nnethercote`
2024-02-08 10:05:39 +00:00
Oli Scherer
aa6f45eb79 Use ensure when the result of the query is not needed beyond its Resultness 2024-02-08 09:30:42 +00:00
Tshepang Mbambo
0ce71f6985 make future diffs minimal 2024-02-08 11:06:51 +02:00
Amanda Stjerna
795be51dd9 Make RegionName Copy by (transitively) interning the few string variants 2024-02-08 09:43:44 +01:00
Oli Scherer
eab2adb660 Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
Matthias Krüger
a059dd88bf
Rollup merge of #120739 - lukas-code:pp-dyn-assoc, r=compiler-errors
improve pretty printing for associated items in trait objects

* Don't print a binder in front of associated items, because it's not valid syntax.
  * e.g. print `dyn for<'a> Trait<'a, Assoc = &'a u8>` instead of `dyn for<'a> Trait<'a, for<'a> Assoc = &'a u8>`.
* Don't print associated items that are implied by a supertrait bound.
  * e.g. if we have `trait Sub: Super<Assoc = u8> {}`, then just print `dyn Sub` instead of `dyn Sub<Assoc = u8>`.

I've added the test in the first commit, so you can see the diff of the compiler output in the second commit.
2024-02-08 09:06:36 +01:00