Skip to content

Commit 2d5d56b

Browse files
committed
Add feature and attribute definition
1 parent cd68ead commit 2d5d56b

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

compiler/rustc_feature/src/active.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ declare_features! (
391391
(active, doc_masked, "1.21.0", Some(44027), None),
392392
/// Allows `dyn* Trait` objects.
393393
(incomplete, dyn_star, "1.65.0", Some(102425), None),
394+
// Uses generic effect parameters for ~const bounds
395+
(active, effects, "CURRENT_RUSTC_VERSION", Some(102090), None),
394396
/// Allows `X..Y` patterns.
395397
(active, exclusive_range_pattern, "1.11.0", Some(37854), None),
396398
/// Allows exhaustive pattern matching on types that contain uninhabited types.

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,12 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
723723
and it is only intended to be used in `alloc`."
724724
),
725725

726+
rustc_attr!(
727+
rustc_host, AttributeType::Normal, template!(Word), ErrorFollowing,
728+
"#[rustc_host] annotates const generic parameters as the `host` effect param, \
729+
and it is only intended for internal use and as a desugaring."
730+
),
731+
726732
BuiltinAttribute {
727733
name: sym::rustc_diagnostic_item,
728734
// FIXME: This can be `true` once we always use `tcx.is_diagnostic_item`.

compiler/rustc_span/src/symbol.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,7 @@ symbols! {
656656
dyn_trait,
657657
e,
658658
edition_panic,
659+
effects,
659660
eh_catch_typeinfo,
660661
eh_personality,
661662
emit,
@@ -793,6 +794,7 @@ symbols! {
793794
hexagon_target_feature,
794795
hidden,
795796
homogeneous_aggregate,
797+
host,
796798
html_favicon_url,
797799
html_logo_url,
798800
html_no_source,
@@ -1284,6 +1286,7 @@ symbols! {
12841286
rustc_evaluate_where_clauses,
12851287
rustc_expected_cgu_reuse,
12861288
rustc_has_incoherent_inherent_impls,
1289+
rustc_host,
12871290
rustc_if_this_changed,
12881291
rustc_inherit_overflow_checks,
12891292
rustc_insignificant_dtor,

0 commit comments

Comments
 (0)