diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-11-09 20:28:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-09 20:28:44 -0800 |
| commit | d4c81c69874292e88ca2c4dc00c5dbad1a3327bc (patch) | |
| tree | 1b015ec0669a272a5d8c689a16039346f7d09b6e /compiler/rustc_session/src | |
| parent | 61f51931b2af33415630354d0f64d0bcf87b8e65 (diff) | |
| parent | f235b6f9c6788e213b6365103cfa9c6c798fe659 (diff) | |
| download | rust-d4c81c69874292e88ca2c4dc00c5dbad1a3327bc.tar.gz rust-d4c81c69874292e88ca2c4dc00c5dbad1a3327bc.zip | |
Rollup merge of #132823 - RalfJung:conditional-const-calls, r=fee1-dead,compiler-errors
require const_impl_trait gate for all conditional and trait const calls Alternative to https://github.com/rust-lang/rust/pull/132786. `@compiler-errors` this is basically what I meant with my proposals. I found it's easier to express this in code than English. ;) r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index f20ae85b8e8..21c11655110 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -155,6 +155,7 @@ pub fn feature_warn_issue( } /// Adds the diagnostics for a feature to an existing error. +/// Must be a language feature! pub fn add_feature_diagnostics<G: EmissionGuarantee>( err: &mut Diag<'_, G>, sess: &Session, diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 470e372ee48..9d9434a7776 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -300,6 +300,7 @@ impl Session { self.opts.test } + /// `feature` must be a language feature. #[track_caller] pub fn create_feature_err<'a>(&'a self, err: impl Diagnostic<'a>, feature: Symbol) -> Diag<'a> { let mut err = self.dcx().create_err(err); |
