Skip to content

Commit 46d09f7

Browse files
committedApr 19, 2021
remove E0723 error code
1 parent 04db4ab commit 46d09f7

File tree

4 files changed

+8
-31
lines changed

4 files changed

+8
-31
lines changed
 

‎compiler/rustc_error_codes/src/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ E0716: include_str!("./error_codes/E0716.md"),
416416
E0718: include_str!("./error_codes/E0718.md"),
417417
E0719: include_str!("./error_codes/E0719.md"),
418418
E0720: include_str!("./error_codes/E0720.md"),
419-
E0723: include_str!("./error_codes/E0723.md"),
420419
E0724: include_str!("./error_codes/E0724.md"),
421420
E0725: include_str!("./error_codes/E0725.md"),
422421
E0727: include_str!("./error_codes/E0727.md"),
@@ -636,6 +635,7 @@ E0781: include_str!("./error_codes/E0781.md"),
636635
E0717, // rustc_promotable without stability attribute
637636
// E0721, // `await` keyword
638637
E0722, // Malformed `#[optimize]` attribute
638+
// E0723, unstable feature in `const` context
639639
E0726, // non-explicit (not `'_`) elided lifetime in unsupported position
640640
// E0738, // Removed; errored on `#[track_caller] fn`s in `extern "Rust" { ... }`.
641641
E0757, // `#[ffi_const]` functions cannot be `#[ffi_pure]`

‎compiler/rustc_error_codes/src/error_codes/E0723.md

-20
This file was deleted.

‎compiler/rustc_mir/src/transform/check_consts/validation.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! The `Visitor` responsible for actually checking a `mir::Body` for invalid operations.
22
3-
use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorReported};
3+
use rustc_errors::{Applicability, Diagnostic, ErrorReported};
44
use rustc_hir::def_id::DefId;
55
use rustc_hir::{self as hir, HirId, LangItem};
66
use rustc_index::bit_set::BitSet;
@@ -234,13 +234,11 @@ impl Validator<'mir, 'tcx> {
234234
if self.is_const_stable_const_fn() {
235235
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
236236
if crate::const_eval::is_parent_const_impl_raw(tcx, hir_id) {
237-
struct_span_err!(
238-
self.ccx.tcx.sess,
239-
self.span,
240-
E0723,
241-
"trait methods cannot be stable const fn"
242-
)
243-
.emit();
237+
self.ccx
238+
.tcx
239+
.sess
240+
.struct_span_err(self.span, "trait methods cannot be stable const fn")
241+
.emit();
244242
}
245243
}
246244

‎src/test/ui/rfc-2632-const-trait-impl/stability.stderr

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0723]: trait methods cannot be stable const fn
1+
error: trait methods cannot be stable const fn
22
--> $DIR/stability.rs:14:5
33
|
44
LL | / fn sub(self, rhs: Self) -> Self {
@@ -17,4 +17,3 @@ LL | Int(1i32) + Int(2i32)
1717

1818
error: aborting due to 2 previous errors
1919

20-
For more information about this error, try `rustc --explain E0723`.

0 commit comments

Comments
 (0)
Please sign in to comment.