Commit Graph

267745 Commits

Author SHA1 Message Date
Urgau
018ba0528f Use wide pointers consistenly across the compiler 2024-10-04 14:06:48 +02:00
许杰友 Jieyou Xu (Joe)
0369ee4c9b Week off of reviews to focus on docs
Dedicating a week to work on rustc-dev-guide.
2024-10-04 11:20:38 +00:00
Guillaume Gomez
32099dbc1e Enable --no-sandbox option by default for rustdoc GUI tests 2024-10-04 12:11:23 +02:00
bors
6602a2382d Auto merge of #3938 - rust-lang:rustup-2024-10-04, r=RalfJung
Automatic Rustup
2024-10-04 08:14:06 +00:00
Ralf Jung
dc88a6a788 clippy 2024-10-04 10:12:05 +02:00
bors
3002af6cb6 Auto merge of #131228 - jdonszelmann:remove-blank-issue, r=m-ou-se
remove blank issue template

r? `@Noratrieb`

So there are currently two blank issue templates. One called "Blank Issue" and one called "Blank issue". Wildly different, of course. It seems that one is auto generated by GitHub, while the other one has an explicit template for it. This removes the explicit one so there's only one "Blank [iI]ssue" in the list. Unfortunately, the only way to test if it works is merging this and finding out, but it seems obvious that it would work.

![image](https://github.com/user-attachments/assets/f802ca88-a80f-48e8-9aff-4008ec030dfa)
2024-10-04 08:07:11 +00:00
Jonathan Dönszelmann
eefe3200cd
remove blank issue template 2024-10-04 09:38:14 +02:00
Urgau
a3ffa1eae5 Improve non-boolean literal error in cfg predicate 2024-10-04 09:09:20 +02:00
Urgau
781f1840cd Adjust rustdoc for literal boolean support 2024-10-04 09:09:20 +02:00
Urgau
62ef411631 Feature gate boolean lit support in cfg predicates 2024-10-04 09:09:20 +02:00
The Miri Cronjob Bot
7014ae87df Merge from rustc 2024-10-04 05:07:56 +00:00
Michael Howell
253fec494f rustdoc: prevent ctors from resolving 2024-10-03 22:01:23 -07:00
The Miri Cronjob Bot
d19bd66a4e Preparing for merge from rustc 2024-10-04 05:00:12 +00:00
bors
11ee3a830b Auto merge of #131201 - compiler-errors:unop-not, r=cjgillot
Disable jump threading `UnOp::Not` for non-bool

Fix #131195, where jumpthreading was optimizing `!a == b` into `a != b` for non-bool, where this is definitely not true.
2024-10-04 04:18:15 +00:00
bors
7067e4aee4 Auto merge of #131191 - nnethercote:lattice_op, r=lcnr
Merge `glb` and `lub` modules

Tons of code is duplicated across them, and it's easy to factor that out.

r? `@lcnr`
2024-10-04 01:20:08 +00:00
bors
e1e3cac26d Auto merge of #131215 - matthiaskrgr:rollup-i021ef7, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #131024 (Don't give method suggestions when method probe fails due to bad implementation of `Deref`)
 - #131112 (TransmuteFrom: Gracefully handle unnormalized types and normalization errors)
 - #131176 (.gitignore files for nix)
 - #131183 (Refactoring to `OpaqueTyOrigin`)
 - #131187 (Avoid ICE in coverage builds with bad `#[coverage(..)]` attributes)
 - #131192 (Handle `rustc_query_impl` cases of `rustc::potential_query_instability` lint)
 - #131197 (Avoid emptiness check in `PeekMut::pop`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-03 22:32:04 +00:00
Nicholas Nethercote
ee227dec8c Remove LatticeDir trait.
It's no longer necessary now that the `glb` and `lub` modules have been
merged.
2024-10-04 06:56:42 +10:00
Nicholas Nethercote
0aab10135d Merge rustc_infer::infer::relate::{glb,lub}.
Most of the code in these two modules is duplicated in the other module.
This commit eliminates the duplication by replacing them with a new
module `lattice_op`. The new `LatticeOpKind` enum is used to distinguish
between glb and lub in the few places where the behaviour differs.
2024-10-04 06:56:37 +10:00
Matthias Krüger
29580e12f2
Rollup merge of #131197 - EFanZh:avoid-emptyness-check-in-peekmut-pop, r=Amanieu
Avoid emptiness check in `PeekMut::pop`

This PR avoids an unnecessary emptiness check in `PeekMut::pop` by replacing `Option::unwrap` with `Option::unwrap_unchecked`.
2024-10-03 21:52:47 +02:00
Matthias Krüger
6753e07d46
Rollup merge of #131192 - ismailarilik:handle-potential-query-instability-lint-for-rustc-query-impl, r=compiler-errors
Handle `rustc_query_impl` cases of `rustc::potential_query_instability` lint

This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_query_impl/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_query_impl/src/lib.rs#L5) <s>and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors</s> (was not necessary for this PR).

A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447

r? ``@compiler-errors``
2024-10-03 21:52:47 +02:00
Matthias Krüger
28b64d8da6
Rollup merge of #131187 - Zalathar:bad-attr-ice, r=jieyouxu
Avoid ICE in coverage builds with bad `#[coverage(..)]` attributes

This code can sometimes witness malformed coverage attributes in builds that are going to fail, so use `span_delayed_bug` to avoid an inappropriate ICE in that case.

Fixes #127880.
2024-10-03 21:52:46 +02:00
Matthias Krüger
da81f64d84
Rollup merge of #131183 - compiler-errors:opaque-ty-origin, r=estebank
Refactoring to `OpaqueTyOrigin`

Pulled out of a larger PR that uses these changes to do cross-crate encoding of opaque origin, so we can use them for edition 2024 migrations. These changes should be self-explanatory on their own, tho 😄
2024-10-03 21:52:46 +02:00
Matthias Krüger
d3a3ac2b38
Rollup merge of #131176 - dev-ardi:gitignore, r=Noratrieb
.gitignore files for nix

This adds support for direnv and nix flakes / nix shell. I'm not sure if we should have a working nix configuration though.

r? ``@noratrieb``
2024-10-03 21:52:45 +02:00
Matthias Krüger
33b4947554
Rollup merge of #131112 - jswrenn:fix-130413, r=compiler-errors
TransmuteFrom: Gracefully handle unnormalized types and normalization errors

~~Refactor to share code between `TransmuteFrom`'s trait selection and error reporting code paths. Additionally normalizes the source and destination types, and gracefully handles normalization errors.~~

Fixes #130413

r​? `@compiler-errors`
2024-10-03 21:52:45 +02:00
Matthias Krüger
0d65f121a1
Rollup merge of #131024 - compiler-errors:deref-sugg, r=estebank
Don't give method suggestions when method probe fails due to bad implementation of `Deref`

If we have a bad `Deref` impl, we used to bail with `MethodError::NoMatch`, which makes the error reporting code think that there was no applicable method (and thus try to suggest importing something, even if it's in scope).

Suppress this error, which fixes #131003.
2024-10-03 21:52:44 +02:00
bors
9ff5fc4ffb Auto merge of #131145 - ismailarilik:handle_potential_query_instability_lint_for_rustc_metadata, r=compiler-errors
Handle `rustc_metadata` cases of `rustc::potential_query_instability` lint

This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_metadata/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_metadata/src/lib.rs#L3) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors.

A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
2024-10-03 19:43:54 +00:00
Michael Goulet
f0bfba2583 Disable jump threading UnOp::Not for non-bool 2024-10-03 15:37:31 -04:00
Michael Goulet
bc5f9520c1 Remove crashes, add comment 2024-10-03 15:19:23 -04:00
bors
56e35a5dbb Auto merge of #131205 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-10-03 16:44:39 +00:00
Philipp Krones
b823547eb1
Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into clippy-subtree-update 2024-10-03 16:32:51 +02:00
Kajetan Puchalski
456be106b7
bootstrap: Consolidate editor LSP setup
Consolidate LSP setup for different editors into one `./x setup editor`.
2024-10-03 15:22:44 +01:00
EFanZh
d47e388843 Avoid emptiness check in PeekMut::pop 2024-10-03 22:15:52 +08:00
bors
1e5719bdc4 Auto merge of #131196 - matthiaskrgr:rollup-3it3zqp, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #130419 (Streamline `HirCollector`)
 - #131163 (Add `get_line` confusable to `Stdin::read_line()`)
 - #131173 (Fix `target_abi` in SOLID targets)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-03 14:15:06 +00:00
Michael Goulet
9c91a4ef16 Failing diff test 2024-10-03 09:47:11 -04:00
bors
aa0d551351 Auto merge of #13492 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2024-10-03 13:34:02 +00:00
Philipp Krones
c994a60fd4
Bump nightly version -> 2024-10-03 2024-10-03 14:48:03 +02:00
Philipp Krones
d300cdfcda
Merge remote-tracking branch 'upstream/master' into rustup 2024-10-03 14:47:50 +02:00
Matthias Krüger
35ff9e2bc6
Rollup merge of #131173 - madsmtm:target-info-solid_asp3-abi, r=lcnr
Fix `target_abi` in SOLID targets

The `armv7a-kmc-solid_asp3-eabi` and `armv7a-kmc-solid_asp3-eabihf` targets clearly have the ABI in their name, so it should also be exposed in Rust's `target_abi` cfg variable.

CC target maintainer `@kawadakk.`
2024-10-03 13:48:00 +02:00
Matthias Krüger
aedf14bb0c
Rollup merge of #131163 - JakenHerman:master, r=Nadrieril
Add `get_line` confusable to `Stdin::read_line()`

This pull request resolves https://github.com/rust-lang/rust/issues/131091

---

I've updated tests for `tests/ui/attributes/rustc_confusables_std_cases` in order to verify this change is working as intended.

Before I submitted this pull request, I had a pull request to my local fork. If you're interested in seeing the conversation on that PR, go to https://github.com/JakenHerman/rust/pull/1.

---

**Testing**:
Run `./x.py test tests/ui/attributes/rustc_confusables_std_cases.rs`
2024-10-03 13:47:59 +02:00
Matthias Krüger
c9b907a567
Rollup merge of #130419 - nnethercote:streamline-HirCollector, r=GuillaumeGomez
Streamline `HirCollector`

r? `@GuillaumeGomez`
2024-10-03 13:47:59 +02:00
Michal Piotrowski
8918a9d265
Fix needless_lifetimes in stable_mir 2024-10-03 13:15:48 +02:00
Zalathar
8e382ba022 Avoid ICE in coverage builds with bad #[coverage(..)] attributes
This code can sometimes witness malformed coverage attributes in builds that
are going to fail, so use `span_delayed_bug` to avoid an inappropriate ICE in
that case.
2024-10-03 21:12:24 +10:00
ismailarilik
83d0d9f292 Handle rustc_query_impl cases of rustc::potential_query_instability lint 2024-10-03 12:47:08 +03:00
Orion Gonzalez
510e262deb add nix files to gitignore 2024-10-03 11:09:44 +02:00
Orion Gonzalez
3a0ed0c6e3 add direnv to gitignore 2024-10-03 11:09:44 +02:00
bors
f7c8928f03 Auto merge of #128711 - clarfonthey:default-iters-hash, r=dtolnay
impl `Default` for `HashMap`/`HashSet` iterators that don't already have it

This is a follow-up to #128261 that isn't included in that PR because it depends on:

* [x] rust-lang/hashbrown#542 (`Default`)
* [x] `hashbrown` release containing above

It also wasn't included in #128261 initially and should have its own FCP, since these are also insta-stable.

Changes added:

* `Default for hash_map::{Iter, IterMut, IntoIter, IntoKeys, IntoValues, Keys, Values, ValuesMut}`
* `Default for hash_set::{Iter, IntoIter}`

Changes that were added before FCP, but are being deferred to later:

* `Clone for hash_map::{IntoIter, IntoKeys, IntoValues} where K: Clone, V: Clone`
* `Clone for hash_set::IntoIter where K: Clone`
2024-10-03 08:44:51 +00:00
Jakub Beránek
2cf155924f
Do not include libstd.so in sysroot when we statically link to libstd 2024-10-03 09:43:55 +02:00
bors
bf71d65980 Auto merge of #3935 - RalfJung:rustup, r=RalfJung
Rustup
2024-10-03 06:20:27 +00:00
Ralf Jung
9b35886adf make sure we also detect mixed-size races that begin at different addresses 2024-10-03 08:19:07 +02:00
bors
8885239786 Auto merge of #131185 - workingjubilee:rollup-wkcqe2j, r=workingjubilee
Rollup of 3 pull requests

Successful merges:

 - #126930 (Add unstable support for outputting file checksums for use in cargo)
 - #130725 (Parser: better error messages for ``@`` in struct patterns)
 - #131166 (Fix `target_vendor` for `aarch64-nintendo-switch-freestanding`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-03 06:02:19 +00:00