rust/compiler/rustc_ast_lowering/src
Matthias Krüger b07fa7696b
Rollup merge of #136284 - oli-obk:push-zsxuwnzmonnl, r=lcnr
Allow using named consts in pattern types

This required a refactoring first: I had to stop using `hir::Pat`in `hir::TyKind::Pat` and instead create a separate `TyPat` that has `ConstArg` for range ends instead of `PatExpr`. Within the type system we should be using `ConstArg` for all constants, as otherwise we'd be maintaining two separate const systems that could diverge. The big advantage of this PR is that we now inherit all the rules from const generics and don't have a separate system. While this makes things harder for users (const generic rules wrt what is allowed in those consts), it also means we don't accidentally allow some things like referring to assoc consts or doing math on generic consts.
2025-02-04 18:49:37 +01:00
..
asm.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
block.rs (Re-)Implement impl_trait_in_bindings 2024-12-14 03:21:24 +00:00
delegation.rs Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
errors.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
expr.rs implement unstable new_range feature 2025-01-30 21:33:11 -07:00
format.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
index.rs Use a different hir type for patterns in pattern types than we use in match patterns 2025-02-03 08:18:30 +00:00
item.rs Enforce that all spans are lowered in ast lowering 2025-01-22 11:38:42 +00:00
lib.rs Use a different hir type for patterns in pattern types than we use in match patterns 2025-02-03 08:18:30 +00:00
pat.rs Allow using named consts in pattern types 2025-02-04 15:17:31 +00:00
path.rs Split hir TyKind and ConstArgKind in two and update hir::Visitor 2025-01-23 06:01:36 +00:00