rust/compiler/rustc_span
Matthias Krüger c92aae90e4
Rollup merge of #136584 - oli-obk:pattern-types-generic, r=BoxyUwU
Prevent generic pattern types from being used in libstd

Pattern types should follow the same rules that patterns follow. So a pattern type range must not wrap and not be empty. While we reject such invalid ranges at layout computation time, that only happens during monomorphization in the case of const generics. This is the exact same issue as other const generic math has, and since there's no solution there yet, I put these pattern types behind a separate incomplete feature.

These are not necessary for the pattern types MVP (replacing the layout range attributes in libcore and rustc).

cc #136574 (new tracking issue for the `generic_pattern_types` feature gate)

r? ``@lcnr``

cc ``@scottmcm`` ``@joshtriplett``
2025-02-11 02:53:44 +01:00
..
src Rollup merge of #136584 - oli-obk:pattern-types-generic, r=BoxyUwU 2025-02-11 02:53:44 +01:00
Cargo.toml Update unicode-width to 0.2.0 2024-10-12 21:57:50 +00:00