Commit Graph

234041 Commits

Author SHA1 Message Date
Michael Howell
7e86fd61e8 rustdoc: merge theme css into rustdoc.css
Based on
https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119

Having them in separate files used to make more sense, before the
migration to CSS variables made the theme files as small as they are
nowadays. This is already how docs.rs and mdBook do it.
2023-09-15 07:40:17 -07:00
bors
33440d7fc6 Auto merge of #115871 - krasimirgg:llvm-18-en, r=durin42
llvm-wrapper: adapt for LLVM API changes

No functional changes intended.

Adapts the wrapper for 0a1aa6cda2.

Found by our experimental rust + llvm @ head CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22301#018a9926-a810-4e56-8ac2-e6f30b78f433/253-551
2023-09-15 14:36:20 +00:00
Krasimir Georgiev
af401b0ca3 llvm-wrapper: adapt for LLVM API changes
No functional changes intended.

Adapts the wrapper for 0a1aa6cda2.

Found by our experimental rust + llvm @ head CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22301#018a9926-a810-4e56-8ac2-e6f30b78f433/253-551
2023-09-15 14:31:43 +00:00
clubby789
8696ee8b09 Migrate 'missing fn lang items' diagnostic 2023-09-15 14:24:58 +00:00
clubby789
cb9f666fdf Migrate 'invalid callee' diagnostic 2023-09-15 14:24:58 +00:00
clubby789
b40f11c8a9 Migrate 'rust-call incorrect arguments' diagnostic 2023-09-15 14:24:58 +00:00
clubby789
9edeb19f96 Allow internal untranslatable diagnostic 2023-09-15 14:24:58 +00:00
clubby789
6e2adbf6a3 Migrate 'explicit destructor call' diagnostic 2023-09-15 14:24:58 +00:00
bors
e7f9f48d76 Auto merge of #115853 - obeis:hir-analysis-migrate-diagnostics-6, r=compiler-errors
Migrate `rustc_hir_analysis` to session diagnostic [Part 6]

Part 6: Finish `coherence/inherent_impls.rs` file
2023-09-15 11:55:27 +00:00
bors
56e1aaadb3 Auto merge of #115851 - Alexendoo:clippy-doc-hidden-headers, r=flip1995
Ignore `#[doc(hidden)]` functions in clippy doc lints

Fixes https://github.com/rust-lang/rust-clippy/issues/11501

The implementation before #115689 had a check for unsugared doc comments that also happened to catch `#[doc(hidden)]`, this adds the check back in more explicitly

852bf4e51b/src/tools/clippy/clippy_lints/src/doc.rs (L526-L529)

r? `@flip1995`
2023-09-15 09:55:31 +00:00
Ralf Jung
3ee65c28e9 cannot have Direct for unsized types 2023-09-15 10:45:37 +02:00
Ralf Jung
29a4b7b971 fix gcc, cranelift build 2023-09-15 10:43:44 +02:00
Ralf Jung
89139d4c46 clarify PassMode::Indirect as well 2023-09-15 10:43:44 +02:00
Ralf Jung
7740476a43 explain PassMode::Cast 2023-09-15 10:43:44 +02:00
Ralf Jung
06a76ab415 make interpreter type Debug impl independent of Ty debug impl 2023-09-15 09:54:06 +02:00
bors
915c8af550 Auto merge of #115850 - compiler-errors:effect-canon, r=fee1-dead
Canonicalize effect vars in new solver

No good reason not to fix this, we already have all the machinery to make this work.

r? `@fee1-dead`

Fixes #115792
2023-09-15 06:45:56 +00:00
Michael Goulet
280f058560 Canonicalize effect vars in new solver 2023-09-15 05:11:16 +00:00
bors
9cbc90c0ae Auto merge of #115861 - clubby789:migrate-remove-semi-diag, r=compiler-errors
Make 'remove semi to coerce match' diagnostic translatable
2023-09-15 04:56:26 +00:00
clubby789
b663464ea0 Make 'remove semi to coerce match' diagnostic translatable 2023-09-15 00:45:09 +00:00
bors
ae9465fee3 Auto merge of #115859 - compiler-errors:effect-fallback, r=fee1-dead
Fallback effects even if types also fallback

`||` is short circuiting, so if we do ty/int var fallback, we *don't* do effect fallback 😸

r? `@fee1-dead` or `@oli-obk`

Fixes #115791
Fixes #115842
2023-09-15 00:05:28 +00:00
bors
ca2b74f1ae Auto merge of #115857 - notriddle:notriddle/gui-test-themes, r=GuillaumeGomez
rusdoc: add gui test for custom CSS themes

Based on
https://github.com/rust-lang/rust/pull/115829#issuecomment-1720056602
2023-09-14 21:52:34 +00:00
Soveu
eea6149e03 Enable varargs support for AAPCS calling convention
This is the default calling convention for ARM - it is used for extern "C",
therefore it supports varargs.
2023-09-14 23:21:39 +02:00
Michael Goulet
5c907a7859 Fallback effects even if types also fall back 2023-09-14 21:08:42 +00:00
Michael Howell
cbccf800b8 rusdoc: add gui test for custom CSS themes
Based on
https://github.com/rust-lang/rust/pull/115829#issuecomment-1720056602
2023-09-14 13:24:23 -07:00
bors
dac91a82e1 Auto merge of #115677 - matthewjasper:let-expr-recovery, r=b-naber
Improve invalid let expression handling

- Move all of the checks for valid let expression positions to parsing.
- Add a field to ExprKind::Let in AST/HIR to mark whether it's in a valid location.
- Suppress some later errors and MIR construction for invalid let expressions.
- Fix a (drop) scope issue that was also responsible for #104172.

Fixes #104172
Fixes #104868
2023-09-14 19:56:55 +00:00
Obei Sideg
8723af5116 Migrate rustc_hir_analysis to session diagnostic
Part 6: Finish `coherence/inherent_impls.rs`
2023-09-14 21:50:22 +03:00
Alex Macleod
88f3f2315c Ignore #[doc(hidden)] functions in clippy doc lints 2023-09-14 17:52:36 +00:00
bors
ccf817b9bb Auto merge of #115848 - matthiaskrgr:rollup-lsul9dz, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #115772 (Improve Span in smir)
 - #115832 (Fix the error message for `#![feature(no_coverage)]`)
 - #115834 (Properly consider binder vars in `HasTypeFlagsVisitor`)
 - #115844 (Paper over an accidental regression)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-14 17:22:20 +00:00
Matthias Krüger
9362604518
Rollup merge of #115844 - oli-obk:opaque_lifetime_ambiguity, r=jackh726
Paper over an accidental regression

r? types

cc https://github.com/rust-lang/rust/issues/115781 (do not close issue until beta backport has been performed)

The PR reasons are explained with comments in the source.

In order to keep the diff simple, this PR effectively reverts https://github.com/rust-lang/rust/pull/113661, but only for RPITs. I will submit a follow up PR that fixes this correctly instead of just disabling the newly added check for RPITs. This PR should be significantly easier to review for beta backport
2023-09-14 19:12:33 +02:00
Matthias Krüger
57370828b9
Rollup merge of #115834 - compiler-errors:binder-vars, r=jackh726
Properly consider binder vars in `HasTypeFlagsVisitor`

Given a PolyTraitRef like `for<'a> Ty: Trait` (where neither `Ty` nor `Trait` mention `'a`), we do *not* return true for `.has_type_flags(TypeFlags::HAS_LATE_BOUND)`, even though binders are supposed to act as if they have late-bound vars even if they don't mention them in their bound value: 31ae3b2bdb. This is because we use `HasTypeFlagsVisitor`, which only computes the type flags for `Ty`, `Const` and `Region` and `Predicates`, and we consequently skip any binders (and setting flags for their vars) that are not contained in one of these types.

This ends up causing a problem, because when we call `TyCtxt::erase_regions` (which both erases regions *and* anonymizes bound vars), we will skip such a PolyTraitRef, not anonymizing it, and therefore not making it structurally equal to other binders. This breaks vtable computations.

This PR computes the flags for all binders we enter in `HasTypeFlagsVisitor` if we're looking for `TypeFlags::HAS_LATE_BOUND` (or `TypeFlags::HAS_{RE,TY,CT}_LATE_BOUND`).

Fixes #115807
2023-09-14 19:12:32 +02:00
Matthias Krüger
3dbcc28884
Rollup merge of #115832 - Zalathar:fix-no-coverage, r=oli-obk
Fix the error message for `#![feature(no_coverage)]`

When #114656 was written, the feature flag to replace `no_coverage` was originally spelled `coverage`, but it was eventually changed to `coverage_attribute` instead.

That update happened to miss this error message in `removed.rs`, and unfortunately I only noticed just *after* the original PR was approved and merged.

cc ``@bossmc`` (original author) ``@oli-obk`` (original reviewer)
``@rustbot`` label +A-code-coverage
2023-09-14 19:12:32 +02:00
Matthias Krüger
4f90a52ae6
Rollup merge of #115772 - ouz-a:smir_span2, r=oli-obk
Improve Span in smir

Addressing https://github.com/rust-lang/project-stable-mir/issues/31

r? ``@oli-obk``
2023-09-14 19:12:31 +02:00
bors
e437e57954 Auto merge of #115804 - RalfJung:valtree-to-const-val, r=oli-obk
consistently pass ty::Const through valtrees

Some drive-by things extracted from https://github.com/rust-lang/rust/pull/115748.
2023-09-14 15:34:31 +00:00
Oli Scherer
0277184977 Paper over an accidental regression 2023-09-14 15:16:48 +00:00
bors
5e71913156 Auto merge of #115817 - fee1-dead-contrib:fix-codegen, r=oli-obk
treat host effect params as erased in codegen

This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.

r? `@oli-obk`
2023-09-14 13:42:30 +00:00
lcnr
0cb800ec34 differentiate root and nested goals 2023-09-14 15:10:45 +02:00
bors
df63c5f140 Auto merge of #112038 - Nemo157:edition-2024-unsafe_op_in_unsafe_fn, r=RalfJung
Change `unsafe_op_in_unsafe_fn` to be `warn`-by-default from edition 2024

This was previously FCPed: https://github.com/rust-lang/rust/issues/71668#issuecomment-1189396886

There were two blocking requirements:
* Fix the `unused_unsafe` lint, done in https://github.com/rust-lang/rust/pull/100081
* Have `cargo fix` able to fix the lint, done in https://github.com/rust-lang/rust/pull/112017
2023-09-14 11:52:08 +00:00
bors
d97e04fbfc Auto merge of #115764 - RalfJung:const-by-ref-alloc-id, r=oli-obk
some ConstValue refactoring

In particular, use AllocId instead of Allocation in ConstValue::ByRef. This helps avoid redundant AllocIds when a  `ByRef` constant gets put back into the interpreter.

r? `@oli-obk`

Fixes https://github.com/rust-lang/rust/issues/105536
2023-09-14 10:04:45 +00:00
Ralf Jung
04a4df5f16 add regression test for something we fixed 2023-09-14 11:56:55 +02:00
Ralf Jung
b18c0a8c4e fix clippy (and MIR printing) handling of ConstValue::Indirect slices 2023-09-14 11:56:55 +02:00
Ralf Jung
0a6e263b9f bless all 2023-09-14 11:56:55 +02:00
Ralf Jung
7aa44eee99 don't force all slice-typed ConstValue to be ConstValue::Slice 2023-09-14 11:56:55 +02:00
lcnr
1b141b6d73 inspect: explicitly store added goals 2023-09-14 10:41:36 +02:00
Ralf Jung
9af39a69ac update SETTINGS_HASHES 2023-09-14 10:39:37 +02:00
lcnr
a3f9530b30 order added_goals_evaluation and nested_probes 2023-09-14 10:20:23 +02:00
bors
fea046037f Auto merge of #115828 - clubby789:clubby-off-vacation, r=lqd
Remove `clubby789` from `users_on_vacation`
2023-09-14 08:17:53 +00:00
Ralf Jung
6dbcf5fc81 update rust_analyzer_settings.json 2023-09-14 09:58:43 +02:00
lcnr
be9d7e0b94 GoalCandidate to Probe 2023-09-14 09:58:29 +02:00
Deadbeef
a0a801cd38 treat host effect params as erased generics in codegen
This fixes the changes brought to codegen tests when effect params are
added to libcore, by not attempting to monomorphize functions that get
the host param by being `const fn`.
2023-09-14 07:34:35 +00:00
bors
e17235105c Auto merge of #115825 - cjgillot:expr-field-lint, r=compiler-errors
Visit ExprField for lint levels.

Fixes https://github.com/rust-lang/rust/issues/115823
2023-09-14 06:29:23 +00:00