rust/compiler/rustc_trait_selection/src
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
..
error_reporting Rustfmt 2025-02-08 22:12:13 +00:00
errors introduce LateParamRegionKind 2024-12-18 16:05:44 +01:00
solve Rustfmt 2025-02-08 22:12:13 +00:00
traits Rollup merge of #136584 - oli-obk:pattern-types-generic, r=BoxyUwU 2025-02-11 02:53:44 +01:00
errors.rs Tweak fn pointer suggestion span 2025-02-02 00:46:02 +00:00
infer.rs Suggest Semicolon in Incorrect Repeat Expressions 2024-12-21 02:30:50 +00:00
lib.rs consistently handle global where-bounds 2024-12-17 08:50:47 +01:00
regions.rs Move param env bound deep normalization to OutlivesEnvironment building 2025-01-28 19:11:05 +00:00
solve.rs impossible obligations check fast path 2024-10-10 06:09:50 -04:00