Vadim Petrochenkov
7f398fd5f6
resolve: Optimize fn traits_in_module
2025-07-16 08:30:48 +03:00
Vadim Petrochenkov
1a9a226058
resolve: Import ty::Visibility everywhere
2025-07-16 08:30:48 +03:00
Scott McMurray
4fa23d96bc
Improve comments inside codegen_get_discr
2025-07-15 22:30:46 -07:00
Vadim Petrochenkov
01b546a19b
resolve: Remove trait ToNameBinding
2025-07-16 08:30:44 +03:00
Vadim Petrochenkov
babe2c0d0f
resolve: Merge NameBindingKind::Module into NameBindingKind::Res
2025-07-16 08:28:17 +03:00
Jacob Greenfield
c6e1b21777
Use hygenic macros for stable-mir
2025-07-15 20:47:09 -04:00
Jonathan Brouwer
8e400f97e5
Fix ice for feature-gated cfg attributes applied to the crate
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-15 23:28:15 +02:00
Deadbeef
fd48b7b8dd
Comment more code and make tests clearer
...
Co-Authored-By: Ralf Jung <post@ralfj.de >
2025-07-16 00:50:20 +08:00
Deadbeef
44b38ca45e
format pointer later instead of eagerly converting to string
2025-07-16 00:32:12 +08:00
Deadbeef
3f2dc2bd1a
add const_make_global; err for const_allocate ptrs if didn't call
...
Co-Authored-By: Ralf Jung <post@ralfj.de >
Co-Authored-By: Oli Scherer <github333195615777966@oli-obk.de >
2025-07-16 00:32:12 +08:00
Michael Goulet
3634f46fdb
Add alias for ArgOutlivesPredicate
2025-07-15 16:02:26 +00:00
Michael Goulet
512cf3ae88
Gate things properly
2025-07-15 16:02:26 +00:00
Michael Goulet
e3f643c706
Consider outlives assumptions when proving auto traits for coroutine interiors
2025-07-15 16:02:26 +00:00
Michael Goulet
3e7dfaa510
Deduce outlives obligations from WF of coroutine interior types
2025-07-15 16:02:26 +00:00
Michael Goulet
7976ca2442
Add outlives to CoroutineWitnessTypes
2025-07-15 15:58:08 +00:00
tiif
e331de149f
Fix CI
2025-07-15 13:48:30 +00:00
tiif
7356ff7517
Implement other logics
2025-07-15 13:48:30 +00:00
tiif
dd067a689a
Lint against having both #[unstable_feature_bound] and #[stable] on the same item
2025-07-15 13:48:30 +00:00
tiif
ab29256b96
Make stability attribute not to error when unstable feature bound is in effect
2025-07-15 13:48:30 +00:00
tiif
1e5c7b2877
Add the core logic in old and new solvers
2025-07-15 13:48:30 +00:00
tiif
2586185831
Lower the UnstableFeatureBound predicate to UnstableFeature predicate
2025-07-15 13:48:29 +00:00
tiif
fecd99881d
Setup unstable feature bound attribute
2025-07-15 13:48:29 +00:00
David Mládek
8b868fa534
Implement resolver warnings about reexporting private dependencies
2025-07-15 15:44:25 +02:00
David Mládek
4a77a62e56
rustc_resolve: rename check_hidden_glob_reexports to lint_reexports
2025-07-15 15:29:08 +02:00
Stypox
14f47009cc
Add InterpCx::fn_abi_of_instance/_fn_ptr with tracing, shadowing FnAbiOf
2025-07-15 15:04:53 +02:00
bors
e27f16a499
Auto merge of #143958 - samueltardieu:rollup-lh1s143, r=samueltardieu
...
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#142301 (tests: Fix duplicated-path-in-error fail with musl)
- rust-lang/rust#143630 (Drop `./x suggest`)
- rust-lang/rust#143736 (Give all bytes of TypeId provenance)
- rust-lang/rust#143752 (Don't panic if WASI_SDK_PATH not set when detecting compiler)
- rust-lang/rust#143837 (Adjust `run_make_support::symbols` helpers)
- rust-lang/rust#143878 (Port `#[pointee]` to the new attribute parsing infrastructure)
- rust-lang/rust#143905 (Recover and suggest to use `;` to construct array type)
- rust-lang/rust#143907 (core: make `str::split_at_unchecked()` inline)
- rust-lang/rust#143910 (Add experimental `backtrace-trace-only` std feature)
- rust-lang/rust#143927 (Preserve constness in trait objects up to hir ty lowering)
- rust-lang/rust#143935 (rustc_type_ir/walk: move docstring to `TypeWalker` itself)
- rust-lang/rust#143938 (Update books)
- rust-lang/rust#143941 (update `cfg_select!` documentation)
Failed merges:
- rust-lang/rust#143926 (Remove deprecated fields in bootstrap)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-15 11:42:55 +00:00
Samuel Tardieu
010e3ef113
Rollup merge of #143941 - folkertdev:cfg-select-docs, r=traviscross
...
update `cfg_select!` documentation
tracking issue: https://github.com/rust-lang/rust/issues/115585
After rust-lang/rust#143461 , and with an eye on a soon(ish) stabilization, I think the docs need some work.
The existing text read more like a motivation for the feature existing to me, so I've tried to now be a bit more descriptive. Still, suggestions are very welcome.
I also added a test for an empty `select! {}` because it's just the sort of thing that might break.
r? ``@traviscross``
2025-07-15 12:52:44 +02:00
Samuel Tardieu
790ce4bf39
Rollup merge of #143935 - ada4a:walk-docstring, r=compiler-errors
...
rustc_type_ir/walk: move docstring to `TypeWalker` itself
having it on the impl block is a bit weird imo
2025-07-15 12:52:43 +02:00
Samuel Tardieu
cc26852148
Rollup merge of #143927 - oli-obk:const-dyn-trait-hir-ty, r=fmease
...
Preserve constness in trait objects up to hir ty lowering
r? ``@compiler-errors``
While we don't support `dyn const Trait`, we can at least also inform the user that `const Trait` is only legal for `#[const_trait] trait Trait {}`
2025-07-15 12:52:43 +02:00
Samuel Tardieu
281990eb16
Rollup merge of #143905 - xizheyin:143828, r=compiler-errors
...
Recover and suggest to use `;` to construct array type
Fixes rust-lang/rust#143828
r? compiler
2025-07-15 12:52:40 +02:00
Samuel Tardieu
743e18364b
Rollup merge of #143878 - JonathanBrouwer:pointee_parser, r=jdonszelmann
...
Port `#[pointee]` to the new attribute parsing infrastructure
Ports `#[pointee]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163
r? ``@jdonszelmann``
2025-07-15 12:52:40 +02:00
Samuel Tardieu
e66f26fb74
Rollup merge of #143736 - oli-obk:uninspectable-type-id, r=RalfJung
...
Give all bytes of TypeId provenance
This makes all bytes of TypeId uninspectable at compile-time.
For context see https://github.com/rust-lang/rust/issues/77125#issuecomment-3057049217
r? ``@RalfJung``
2025-07-15 12:52:38 +02:00
Jonathan Brouwer
7a7c74ad89
New example for E0536
2025-07-15 09:21:27 +02:00
Jonathan Brouwer
c7f5ddc098
Changes to diagnostics
2025-07-15 09:21:27 +02:00
Jonathan Brouwer
6133c676d7
Define attribute parser & config evaluator
2025-07-15 09:21:26 +02:00
Jonathan Brouwer
30f4a9cd53
Move cfg -> cfg_old
2025-07-15 09:01:03 +02:00
Jonathan Brouwer
38dd6f5206
Allow Early stage to emit errors
2025-07-15 09:01:03 +02:00
Jonathan Brouwer
a14baf1e56
Define datastructures for #[cfg] attribute, move StrippedCfgItem
2025-07-15 09:01:00 +02:00
xizheyin
ed88af2163
Recover and suggest use ; to construct array type
...
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn >
2025-07-15 12:00:46 +08:00
Jonathan Brouwer
f0d0afab8e
Port #[pointee] to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-14 23:16:31 +02:00
Folkert de Vries
d0153f5872
update cfg_select! documentation
...
and make internal terminology consistent
Co-authored-by: Travis Cross <tc@traviscross.com >
2025-07-14 22:29:28 +02:00
Ada Alakbarova
1b8d65ed29
rustc_type_ir/walk: move docstring to TypeWalker itself
...
having it on the impl block is a bit weird imo
2025-07-14 18:14:02 +02:00
Samuel Tardieu
8fcef5674a
Rollup merge of #143901 - compiler-errors:region-constraint-nits, r=lcnr
...
Region constraint nits
Couple miscellaneous region constraints that have a bit to do with rust-lang/rust#143545 but stand on their own.
2025-07-14 18:05:47 +02:00
Samuel Tardieu
16b3f47658
Rollup merge of #143868 - jdonszelmann:fix-align-on-fields, r=workingjubilee
...
warn on align on fields to avoid breaking changes
r? `@workingjubilee`
2025-07-14 18:05:45 +02:00
Samuel Tardieu
bbda0c9fb5
Rollup merge of #143855 - JonathanBrouwer:omit_gdb_pretty_printer_section, r=jdonszelmann
...
Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing
Ports `#[omit_gdb_pretty_printer_section]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163
r? ```@jdonszelmann```
2025-07-14 18:05:45 +02:00
Samuel Tardieu
c59bc44ca9
Rollup merge of #143848 - makai410:smir-rename, r=oli-obk
...
Rename `stable_mir` and `rustc_smir`
This PR only renames the two crate names.
There is no doubt that we want to rename `stable_mir` to `rustc_public`, while it hasn't been discussed yet that what the new name for `rustc_smir` should be.
This PR proposes a new name for `rustc_smir`, that is `rustc_public_shim`, since `rustc_smir` now is mostly a proxy to do calls to rustc queries and the public API of rustc that is invoked by the `rustc_public` crate.
However, I don't think that name is good enough. I hope there would be a way better name.
r? `@oli-obk`
2025-07-14 18:05:44 +02:00
Jake Goulding
5530744318
Reword mismatched-lifetime-syntaxes text based on feedback
...
Key changes include:
- Removal of the word "syntax" from the lint message. More accurately,
it could have been something like "syntax group" or "syntax
category", but avoiding it completely is easier.
- The primary lint message now reflects exactly which mismatch is
occurring, instead of trying to be general. A new `help` line is
general across the mismatch kinds.
- Suggestions have been reduced to be more minimal, no longer also
changing non-idiomatic but unrelated aspects.
- Suggestion text no longer mentions changes when those changes don't
occur in that specific suggestion.
2025-07-14 09:52:58 -04:00
Oli Scherer
000e67aafb
Preserve constness in trait objects up to hir ty lowering
2025-07-14 12:52:44 +00:00
Makai
6598c61725
rename stable_mir to rustc_public, and rustc_smir to rustc_public_bridge
2025-07-14 09:25:54 +00:00
Jakub Beránek
a7ad680269
Rollup merge of #143875 - fee1-dead-contrib:push-zvqrmzrprpzt, r=compiler-errors
...
update issue number for `const_trait_impl`
r? project-const-traits
cc rust-lang/rust#67792 rust-lang/rust#143874
2025-07-14 11:04:55 +02:00