Commit Graph

239669 Commits

Author SHA1 Message Date
Michael Goulet
54ee79b3b8 Remove unused ObligationCauseCode::ProjectionWf 2023-11-25 22:10:37 +00:00
Nicholas Nethercote
af3fbb3607 Remove unnecessary dependencies. 2023-11-26 08:38:42 +11:00
Nicholas Nethercote
57cd5e6551 Use rustc_fluent_macro::fluent_messages! directly.
Currently we always do this:
```
use rustc_fluent_macro::fluent_messages;
...
fluent_messages! { "./example.ftl" }
```
But there is no need, we can just do this everywhere:
```
rustc_fluent_macro::fluent_messages! { "./example.ftl" }
```
which is shorter.
2023-11-26 08:38:40 +11:00
Nicholas Nethercote
1a4219da43 Add a useful comment. 2023-11-26 08:38:02 +11:00
Nicholas Nethercote
a733082be9 Avoid need for {D,Subd}iagnosticMessage imports.
The `fluent_messages!` macro produces uses of
`crate::{D,Subd}iagnosticMessage`, which means that every crate using
the macro must have this import:
```
use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
```

This commit changes the macro to instead use
`rustc_errors::{D,Subd}iagnosticMessage`, which avoids the need for the
imports.
2023-11-26 08:38:00 +11:00
Nicholas Nethercote
df9f83987a Remove rustc_error_messages/messages.ftl.
It's empty, and it doesn't even make sense, because
`rustc_error_messages` is a lower-level crate than `rustc_errors`.
2023-11-26 08:37:27 +11:00
bors
f5dc2653fd Auto merge of #118275 - weihanglo:update-cargo, r=ehuss
Update cargo

7 commits in 71cd3a926f0cf41eeaf9f2a7f2194b2aff85b0f6..9b13310ca596020a737aaa47daa4ed9ff8898a2f
2023-11-20 15:30:57 +0000 to 2023-11-24 16:20:51 +0000
- feat: Add `CARGO_RUSTC_CURRENT_DIR` (unstable) (rust-lang/cargo#12996)
- Exited with hard error when custom build file no existence or not in package (rust-lang/cargo#12995)
- try running on windows (rust-lang/cargo#13042)
- refactor(toml): Better abstract inheritance details (rust-lang/cargo#13021)
- cargo-test-support: Add features to the default Cargo.toml file (rust-lang/cargo#12997)
- Migrate rustfix to the cargo repo (rust-lang/cargo#13005)
- typo: rusc -> rustc (rust-lang/cargo#13019)

---

This also removes the check to ensure that `rustfix` between

* src/tools/cargo
* src/tools/compiletest

has the same version,
since `rust-lang/rustfix` has migrated to under `rust-lang/cargo`.

r? ghost
2023-11-25 21:03:30 +00:00
Michael Howell
bdcf91605c rustdoc: replace elemIsInParent with Node.contains
According to [MDN], this function is compatible with:

* Chrome 16 and Edge 12
* Firefox 9
* Safari 1.1 and iOS Safari 1

These browsers are well within our [support matrix], which requires
compatibility with Chrome 118, Firefox 115, Safari 17, and Edge 119.

[MDN]: https://developer.mozilla.org/en-US/docs/Web/API/Node/contains#browser_compatibility
[support matrix]: https://browsersl.ist/#q=last+2+Chrome+versions%2C+last+1+Firefox+version%2C+Firefox+ESR%2C+last+1+Safari+version%2C+last+1+iOS+version%2C+last+1+Edge+version%2C+last+1+UCAndroid+version
2023-11-25 12:33:04 -07:00
bors
ec1393f14e Auto merge of #118294 - GuillaumeGomez:rollup-ij2bzwt, r=GuillaumeGomez
Rollup of 6 pull requests

Successful merges:

 - #116446 (Yeet `mir::Const::from_anon_const`)
 - #117871 (remove unused pub fns)
 - #118017 (rustc_lint: address latent TODO)
 - #118199 (Remove `HirId` from `QPath::LangItem`)
 - #118272 (resolve: Avoid clones of `MacroData`)
 - #118291 (rustdoc-search: clean up some DOM code)

Failed merges:

 - #118201 (Miscellaneous `ObligationCauseCode` cleanups)
 - #118256 (rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-25 19:04:22 +00:00
Guillaume Gomez
e698de96ea
Rollup merge of #118291 - notriddle:notriddle/search-dom, r=GuillaumeGomez
rustdoc-search: clean up some DOM code
2023-11-25 19:51:56 +01:00
Guillaume Gomez
9b1da03102
Rollup merge of #118272 - petrochenkov:macrodata, r=cjgillot
resolve: Avoid clones of `MacroData`

And move declarative macro compilation to an earlier point in def collector, which is required for #118188.
2023-11-25 19:51:56 +01:00
Guillaume Gomez
8fb68fc3b0
Rollup merge of #118199 - compiler-errors:qpath, r=lcnr
Remove `HirId` from `QPath::LangItem`

Remove `HirId` from `QPath::LangItem`, since there was only *one* use-case (`ObligationCauseCode::AwaitableExpr`), which we can instead recover by walking the HIR tree.
2023-11-25 19:51:55 +01:00
Guillaume Gomez
5d2b6b3556
Rollup merge of #118017 - tamird:better-safety, r=cjgillot
rustc_lint: address latent TODO

See individual commits.
2023-11-25 19:51:54 +01:00
Guillaume Gomez
9a59b059d5
Rollup merge of #117871 - klensy:unused-pub, r=cjgillot
remove unused pub fns

This removes some unused `pub fn`; also fixes few obsoleted fn names or added fixmes with reminders to update them.
2023-11-25 19:51:54 +01:00
Guillaume Gomez
6361989b6d
Rollup merge of #116446 - compiler-errors:yeet-mir-from_anon_const, r=b-naber
Yeet `mir::Const::from_anon_const`

Only had one callsite which was easily simplified.

Uplifted a comment that I think is much more useful living in `ty::Const` world.
2023-11-25 19:51:53 +01:00
Michael Goulet
079a2e865f is_{some,ok}_and 2023-11-25 18:47:16 +00:00
Michael Goulet
4e23448c49 Appease the clippy 2023-11-25 18:02:11 +00:00
Michael Goulet
fa7633dda1 Remove HirId from QPath::LangItem 2023-11-25 18:02:11 +00:00
Michael Goulet
8bf9c18914 Review comment 2023-11-25 18:00:35 +00:00
Michael Goulet
82f23d56b7 make sure we still eagerly emit errors 2023-11-25 18:00:35 +00:00
Michael Goulet
a992defc8b Remove mir::Const::from_anon_const 2023-11-25 17:52:43 +00:00
Michael Goulet
1279f70bf4 Don't ICE when encountering placeholders in implied bounds computation 2023-11-25 17:40:52 +00:00
Michael Howell
884679ff63 rustdoc-search: clean up some DOM code 2023-11-25 10:39:45 -07:00
Michael Goulet
63b2f55e83 is_{some,ok}_and for rustdoc 2023-11-25 17:18:33 +00:00
bors
16087eeea8 Auto merge of #118127 - RalfJung:unadjusted-abi, r=compiler-errors
the unadjusted ABI needs to pass aggregates by-value

Fixes https://github.com/rust-lang/rust/issues/118124, a regression introduced in https://github.com/rust-lang/rust/pull/117500
2023-11-25 17:06:22 +00:00
bors
fe3038f263 Auto merge of #118284 - RalfJung:miri, r=RalfJung
Miri subtree update
2023-11-25 15:07:16 +00:00
bors
547598b67e Auto merge of #3191 - RalfJung:rustup, r=RalfJung
Rustup
2023-11-25 13:27:26 +00:00
Ralf Jung
feb37829e1 bless 2023-11-25 14:26:00 +01:00
Ralf Jung
a0cf02af71 Merge from rustc 2023-11-25 14:19:41 +01:00
Ralf Jung
2f825fb3d4 Preparing for merge from rustc 2023-11-25 14:19:37 +01:00
bors
3166210d68 Auto merge of #118279 - bjorn3:sync_cg_clif-2023-11-25, r=bjorn3
Subtree sync for rustc_codegen_cranelift

The main highlights this time are implementing a bunch of new vendor intrinsics and fixing some existing ones. And fixing polymorphization for coroutines.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-11-25 13:08:29 +00:00
bors
535db18002 Auto merge of #3189 - RalfJung:ci, r=RalfJung
run the provenance-gc=1 test on all targets, but only for the host tests

No need to slow down *all those tests* running on the Linux host... but lets cover each major OS at least once. We've had bugs that only some macOS-specific code in `getrandom` found, after all.

Let's see how much this affects timing on the macOS / Windows runners.
2023-11-25 12:12:38 +00:00
Ralf Jung
695f1a515e tweak ci.sh 2023-11-25 13:10:20 +01:00
Ralf Jung
2a89b74bc7 run the provenance-gc=1 test on all targets, but only for some of the tests
before: only on Linux host, all tests
after: only the test suite itself (not cargo-miri or the mir-opt-level=4 run),
on all hosts for the host target and on Linux for all "full" targets.
2023-11-25 13:06:59 +01:00
Vadim Petrochenkov
2c23386344 rustc: Make def_kind mandatory for all DefIds 2023-11-25 14:49:43 +03:00
bors
3668a8af1b Auto merge of #118277 - fmease:rollup-itucldm, r=fmease
Rollup of 9 pull requests

Successful merges:

 - #118220 (general improvements/fixes on bootstrap)
 - #118251 (rustdoc-search: avoid infinite where clause unbox)
 - #118253 (Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)`)
 - #118255 (Request that rust-analyzer changes are sent upstream first if possible)
 - #118259 (Move EagerResolution to rustc_infer::infer::resolve)
 - #118262 (Relate Inherent Associated Types using eq)
 - #118266 (Move stuff around on `stable_mir` and `rustc_smir` crate)
 - #118271 (Separate `NaN`/`Inf` floats with `_`)
 - #118274 (Fix smir's `Ty::Ref` pretty printing)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-25 11:08:37 +00:00
bors
2132d786d6 Auto merge of #3190 - RalfJung:freebsd32, r=RalfJung
test Miri on 32bit FreeBSD
2023-11-25 10:52:43 +00:00
bjorn3
aa51a27f8e Merge commit '710c67909d034e1c663174a016ca82b95c2d6c12' into sync_cg_clif-2023-11-25 2023-11-25 10:05:52 +00:00
bjorn3
710c67909d
Merge pull request #1431 from rust-lang/even_more_simd_intrinsics
Implement another batch of vendor intrinsics
2023-11-25 10:57:11 +01:00
bjorn3
86fc533a71 Re-enable rustc test that was disabled due to a rustc bug 2023-11-25 09:40:02 +00:00
Ralf Jung
b750b54958 run tests on 32bit freebsd 2023-11-25 10:33:30 +01:00
Ralf Jung
ce94b22cd6 read off_t at the right size for the current target 2023-11-25 10:33:30 +01:00
bjorn3
da3782a0b4 Rustup to rustc 1.76.0-nightly (37b2813a7 2023-11-24) 2023-11-25 09:32:50 +00:00
bjorn3
85c708132f Sync from rust 37b2813a7b 2023-11-25 09:24:52 +00:00
León Orell Valerian Liehr
20d243e854
Rollup merge of #118274 - celinval:smir-fix-pretty, r=ouz-a
Fix smir's `Ty::Ref` pretty printing

Add `&` or `&mut` to reference when generating a string for `TyKind::Ref`.

r? `@ouz-a`
2023-11-25 10:21:09 +01:00
León Orell Valerian Liehr
a663bb946f
Rollup merge of #118271 - compiler-errors:float, r=RalfJung
Separate `NaN`/`Inf` floats with `_`

r? RalfJung

Fixes #118221

No test 🤷 unless you know a good way to print an `ImmTy` in a unit test?
2023-11-25 10:21:08 +01:00
León Orell Valerian Liehr
3f513bd9ce
Rollup merge of #118266 - celinval:smir-break-files, r=compiler-errors
Move stuff around on `stable_mir` and `rustc_smir` crate

1. Break down rustc_smir/mod.rs file.
    - This file was getting too big and causing a lot of merge conflicts.
      All these changes shouldn't be visible to users since this module is private.
2.  Move the compiler interface defs to its own module
    - Separate items that are exposed in the `stable_mir` crate to be used
      by the compiler from items that we expect to be used by tool developers.
2023-11-25 10:21:08 +01:00
León Orell Valerian Liehr
23461fd694
Rollup merge of #118262 - spastorino:relate-iats-using-eq, r=compiler-errors
Relate Inherent Associated Types using eq

We should call `eq` instead of `sup` as we're relating `Ty` directly and not `Binder<TraitRef>`.

This is part of #118118 but unrelated to that PR.

r? `@compiler-errors` `@lcnr`
2023-11-25 10:21:08 +01:00
León Orell Valerian Liehr
7c2244a625
Rollup merge of #118259 - spastorino:move-eager-resolver-to-infer, r=compiler-errors
Move EagerResolution to rustc_infer::infer::resolve

`EagerResolver` fits better in `rustc_infer::infer::resolver`.

Started to disentagle #118118 that has a lot of unrelated things.

r? `@compiler-errors` `@lcnr`
2023-11-25 10:21:07 +01:00
León Orell Valerian Liehr
969a77360d
Rollup merge of #118255 - dtolnay:mentionsrustanalyzer, r=Mark-Simulacrum
Request that rust-analyzer changes are sent upstream first if possible

This automates `@lnicola's` comment https://github.com/rust-lang/rust/pull/118253#issuecomment-1825925242.

Rustbot will write a comment similar to https://github.com/rust-lang/rust/pull/116743#issuecomment-1763178813.
2023-11-25 10:21:07 +01:00