rust/compiler/rustc_feature/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
..
accepted.rs Rollup merge of #134367 - WaffleLapkin:trait_upcasting_as_a_treat, r=compiler-errors 2025-02-07 18:26:25 +01:00
builtin_attrs.rs Rollup merge of #136191 - klensy:const_a, r=compiler-errors 2025-02-07 12:01:57 +01:00
lib.rs rustc_feature: Avoid unsafe std::env::set_var() in UnstableFeatures tests 2025-01-08 11:37:19 +01:00
removed.rs replaces few consts with statics to reduce readonly section 2025-01-28 17:38:22 +03:00
tests.rs rustc_feature: Avoid unsafe std::env::set_var() in UnstableFeatures tests 2025-01-08 11:37:19 +01:00
unstable.rs Rollup merge of #136584 - oli-obk:pattern-types-generic, r=BoxyUwU 2025-02-11 02:53:44 +01:00