rust/compiler/rustc_trait_selection/src/traits
Matthias Krüger 36c2b011cb
Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead
New const traits syntax

This PR only affects the AST and doesn't actually change anything semantically.

All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser

Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error

r? ``@fee1-dead``

cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
2025-06-27 22:13:00 +02:00
..
query TypeVisiting binders no longer requires TypeFolding its interior 2025-06-13 17:54:45 +00:00
select Auto merge of #142223 - compiler-errors:perf-wf, r=lcnr 2025-06-27 03:57:45 +00:00
specialize Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead 2025-06-27 22:13:00 +02:00
auto_trait.rs Rename 2025-05-26 08:48:19 +00:00
coherence.rs Compute hard errors without diagnostics in impl_intersection_has_impossible_obligation 2025-06-25 15:32:08 +00:00
const_evaluatable.rs compiler: Use size_of from the prelude instead of imported 2025-03-07 13:37:04 -08:00
dyn_compatibility.rs Change const trait bound syntax from ~const to [const] 2025-06-26 13:46:45 +00:00
effects.rs Change const trait bound syntax from ~const to [const] 2025-06-26 13:46:45 +00:00
engine.rs eagerly check nested obligations when coercing fndefs 2025-05-21 11:09:48 +00:00
fulfill.rs Auto merge of #142223 - compiler-errors:perf-wf, r=lcnr 2025-06-27 03:57:45 +00:00
misc.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
mod.rs const-eval: allow constants to refer to mutable/external memory, but reject such constants as patterns 2025-06-26 18:09:47 +02:00
normalize.rs apply clippy::or_fun_call 2025-06-17 13:59:53 +03:00
outlives_bounds.rs Rename 2025-05-26 08:48:19 +00:00
project.rs Remove some glob imports from the type system 2025-06-25 15:35:16 +00:00
structural_normalize.rs Unify normalization of terms in deeply normalize 2025-06-07 02:35:28 +00:00
util.rs trait_sel: skip elaboration of sizedness supertrait 2025-06-16 23:04:36 +00:00
vtable.rs Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
wf.rs trait_sel: skip nominal_obligations for Sized 2025-06-16 23:04:36 +00:00