1
Fork 0
rust/compiler/rustc_hir/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
..
hir Bless and add tests 2025-01-23 06:01:36 +00:00
arena.rs Add hir::Attribute 2024-12-15 19:18:46 +01:00
def.rs Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
def_path_hash_map.rs Do not store stable crate id in on-disk hash map. 2023-12-24 17:22:48 +00:00
definitions.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
diagnostic_items.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir.rs Rollup merge of #136284 - oli-obk:push-zsxuwnzmonnl, r=lcnr 2025-02-04 18:49:37 +01:00
hir_id.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
intravisit.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
lang_items.rs Rollup merge of #136167 - pitaj:new_range, r=Nadrieril 2025-02-04 05:36:52 -05:00
lib.rs rustc_hir: replace debug_fn with unstable fmt::from_fn 2025-01-24 14:45:55 +00:00
pat_util.rs Eliminate PatKind::Path 2025-01-29 15:45:13 +00:00
stable_hash_impls.rs Add hir::Attribute 2024-12-15 19:18:46 +01:00
target.rs turn hir::ItemKind::Fn into a named-field variant 2025-01-04 11:35:31 +01:00
tests.rs update cfg(bootstrap) 2025-01-08 21:26:39 +01:00
weak_lang_items.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00