1
Fork 0
rust/compiler/rustc_hir
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
..
src Rollup merge of #136284 - oli-obk:push-zsxuwnzmonnl, r=lcnr 2025-02-04 18:49:37 +01:00
Cargo.toml Add hir::Attribute 2024-12-15 19:18:46 +01:00