From 06cc9c26da18848fd97b6d0d6e4e1760497a3c0c Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Tue, 17 Nov 2020 10:55:13 +0100 Subject: [PATCH 1/4] stabilize min_const_generics --- compiler/rustc_arena/src/lib.rs | 2 +- compiler/rustc_ast/src/ast.rs | 2 +- compiler/rustc_ast_passes/src/ast_validation.rs | 10 ++++------ compiler/rustc_ast_passes/src/feature_gate.rs | 15 +-------------- compiler/rustc_data_structures/src/lib.rs | 2 +- compiler/rustc_feature/src/accepted.rs | 2 ++ compiler/rustc_feature/src/active.rs | 9 ++++----- compiler/rustc_lint/src/builtin.rs | 2 +- compiler/rustc_middle/src/ty/context.rs | 2 +- compiler/rustc_middle/src/ty/mod.rs | 2 -- compiler/rustc_parse/src/parser/generics.rs | 4 +--- compiler/rustc_resolve/src/late/diagnostics.rs | 6 +++--- compiler/rustc_resolve/src/late/lifetimes.rs | 4 ++-- compiler/rustc_resolve/src/lib.rs | 12 ++++++++++-- compiler/rustc_serialize/src/lib.rs | 2 +- compiler/rustc_typeck/src/check/wfcheck.rs | 14 +++++++------- compiler/rustc_typeck/src/collect.rs | 2 +- 17 files changed, 41 insertions(+), 51 deletions(-) diff --git a/compiler/rustc_arena/src/lib.rs b/compiler/rustc_arena/src/lib.rs index f468bad635a..a0493056b81 100644 --- a/compiler/rustc_arena/src/lib.rs +++ b/compiler/rustc_arena/src/lib.rs @@ -16,7 +16,7 @@ #![feature(new_uninit)] #![feature(maybe_uninit_slice)] #![feature(array_value_iter)] -#![feature(min_const_generics)] +#![cfg_attr(bootstrap, feature(min_const_generics))] #![feature(min_specialization)] #![cfg_attr(test, feature(test))] diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 220bbed7e78..45cc6d894e9 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -1128,7 +1128,7 @@ impl Expr { /// Is this expr either `N`, or `{ N }`. /// /// If this is not the case, name resolution does not resolve `N` when using - /// `feature(min_const_generics)` as more complex expressions are not supported. + /// `min_const_generics` as more complex expressions are not supported. pub fn is_potential_trivial_const_param(&self) -> bool { let this = if let ExprKind::Block(ref block, None) = self.kind { if block.stmts.len() == 1 { diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index bf6d3322176..686300c7c5f 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -773,14 +773,12 @@ fn validate_generic_param_order<'a>( err.span_suggestion( span, &format!( - "reorder the parameters: lifetimes{}", + "reorder the parameters: lifetimes, {}", if sess.features_untracked().const_generics { - ", then consts and types" - } else if sess.features_untracked().min_const_generics { - ", then types, then consts" + "then consts and types" } else { - ", then types" - }, + "then types, then consts" + } ), ordered_params.clone(), Applicability::MachineApplicable, diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index bb222675239..56e1f9989b0 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -1,7 +1,7 @@ use rustc_ast as ast; use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor}; use rustc_ast::{AssocTyConstraint, AssocTyConstraintKind, NodeId}; -use rustc_ast::{GenericParam, GenericParamKind, PatKind, RangeEnd, VariantData}; +use rustc_ast::{PatKind, RangeEnd, VariantData}; use rustc_errors::struct_span_err; use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP}; use rustc_feature::{Features, GateIssue}; @@ -529,19 +529,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { visit::walk_fn(self, fn_kind, span) } - fn visit_generic_param(&mut self, param: &'a GenericParam) { - if let GenericParamKind::Const { .. } = param.kind { - gate_feature_fn!( - &self, - |x: &Features| x.const_generics || x.min_const_generics, - param.ident.span, - sym::min_const_generics, - "const generics are unstable" - ); - } - visit::walk_generic_param(self, param) - } - fn visit_assoc_ty_constraint(&mut self, constraint: &'a AssocTyConstraint) { if let AssocTyConstraintKind::Bound { .. } = constraint.kind { gate_feature_post!( diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index d903a557c7f..01d3a759316 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -27,7 +27,7 @@ #![feature(thread_id_value)] #![feature(extend_one)] #![feature(const_panic)] -#![feature(min_const_generics)] +#![cfg_attr(bootstrap, feature(min_const_generics))] #![feature(new_uninit)] #![feature(once_cell)] #![feature(maybe_uninit_uninit_array)] diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index 4401ec0a04e..aa54ffb132d 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -273,6 +273,8 @@ declare_features! ( /// Allows patterns with concurrent by-move and by-ref bindings. /// For example, you can write `Foo(a, ref b)` where `a` is by-move and `b` is by-ref. (accepted, move_ref_pattern, "1.48.0", Some(68354), None), + /// The smallest useful subset of `const_generics`. + (accepted, min_const_generics, "1.51.0", Some(74878), None), // ------------------------------------------------------------------------- // feature-group-end: accepted features diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 845e03150d7..d60ae8ef75b 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -578,9 +578,6 @@ declare_features! ( /// Allows calling `transmute` in const fn (active, const_fn_transmute, "1.46.0", Some(53605), None), - /// The smallest useful subset of `const_generics`. - (active, min_const_generics, "1.47.0", Some(74878), None), - /// Allows `if let` guard in match arms. (active, if_let_guard, "1.47.0", Some(51114), None), @@ -651,5 +648,7 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[ /// Some features are not allowed to be used together at the same time, if /// the two are present, produce an error. -pub const INCOMPATIBLE_FEATURES: &[(Symbol, Symbol)] = - &[(sym::const_generics, sym::min_const_generics)]; +/// +/// Currently empty, but we will probably need this again in the future, +/// so let's keep it in for now. +pub const INCOMPATIBLE_FEATURES: &[(Symbol, Symbol)] = &[]; diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 676c85e4afd..fa943d0d748 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -2299,7 +2299,7 @@ impl EarlyLintPass for IncompleteFeatures { } } -const HAS_MIN_FEATURES: &[Symbol] = &[sym::const_generics, sym::specialization]; +const HAS_MIN_FEATURES: &[Symbol] = &[sym::specialization]; declare_lint! { /// The `invalid_value` lint detects creating a value that is not valid, diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 9b944f202a9..b2db09cbc80 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -1386,7 +1386,7 @@ impl<'tcx> TyCtxt<'tcx> { #[inline] pub fn lazy_normalization(self) -> bool { let features = self.features(); - // Note: We do not enable lazy normalization for `features.min_const_generics`. + // Note: We do not enable lazy normalization for `min_const_generics`. features.const_generics || features.lazy_normalization_consts } diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 8395692446d..1fe1400fabe 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -1638,8 +1638,6 @@ pub type PlaceholderConst<'tcx> = Placeholder>; /// which cause cycle errors. /// /// ```rust -/// #![feature(const_generics)] -/// /// struct A; /// impl A { /// fn foo(&self) -> [u8; N] { [0; N] } diff --git a/compiler/rustc_parse/src/parser/generics.rs b/compiler/rustc_parse/src/parser/generics.rs index ed8d4f78426..860e63020bb 100644 --- a/compiler/rustc_parse/src/parser/generics.rs +++ b/compiler/rustc_parse/src/parser/generics.rs @@ -5,7 +5,7 @@ use rustc_ast::{ self as ast, Attribute, GenericBounds, GenericParam, GenericParamKind, WhereClause, }; use rustc_errors::PResult; -use rustc_span::symbol::{kw, sym}; +use rustc_span::symbol::kw; impl<'a> Parser<'a> { /// Parses bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`. @@ -56,8 +56,6 @@ impl<'a> Parser<'a> { self.expect(&token::Colon)?; let ty = self.parse_ty()?; - self.sess.gated_spans.gate(sym::min_const_generics, const_span.to(self.prev_token.span)); - Ok(GenericParam { ident, id: ast::DUMMY_NODE_ID, diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 68f59baffce..d253a9dda86 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -1985,8 +1985,8 @@ impl<'tcx> LifetimeContext<'_, 'tcx> { } } - /// Non-static lifetimes are prohibited in anonymous constants under `min_const_generics` so - /// this function will emit an error if `min_const_generics` is enabled, the body identified by + /// Non-static lifetimes are prohibited in anonymous constants under `min_const_generics`. + /// This function will emit an error if `const_generics` is not enabled, the body identified by /// `body_id` is an anonymous constant and `lifetime_ref` is non-static. crate fn maybe_emit_forbidden_non_static_lifetime_error( &self, @@ -2002,7 +2002,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> { hir::LifetimeName::Implicit | hir::LifetimeName::Static | hir::LifetimeName::Underscore ); - if self.tcx.features().min_const_generics && is_anon_const && !is_allowed_lifetime { + if !self.tcx.lazy_normalization() && is_anon_const && !is_allowed_lifetime { feature_err( &self.tcx.sess.parse_sess, sym::const_generics, diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs index 69f28045bb5..d5ba6f3b53b 100644 --- a/compiler/rustc_resolve/src/late/lifetimes.rs +++ b/compiler/rustc_resolve/src/late/lifetimes.rs @@ -1769,8 +1769,8 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> { let result = loop { match *scope { Scope::Body { id, s } => { - // Non-static lifetimes are prohibited in anonymous constants under - // `min_const_generics`. + // Non-static lifetimes are prohibited in anonymous constants without + // `const_generics`. self.maybe_emit_forbidden_non_static_lifetime_error(id, lifetime_ref); outermost_body = Some(id); diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index f764fbc3f8d..5c79cfa9c1d 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -2624,8 +2624,12 @@ impl<'a> Resolver<'a> { continue; } ConstantItemRibKind(trivial) => { + let features = self.session.features_untracked(); // HACK(min_const_generics): We currently only allow `N` or `{ N }`. - if !trivial && self.session.features_untracked().min_const_generics { + if !(trivial + || features.const_generics + || features.lazy_normalization_consts) + { // HACK(min_const_generics): If we encounter `Self` in an anonymous constant // we can't easily tell if it's generic at this stage, so we instead remember // this and then enforce the self type to be concrete later on. @@ -2713,8 +2717,12 @@ impl<'a> Resolver<'a> { continue; } ConstantItemRibKind(trivial) => { + let features = self.session.features_untracked(); // HACK(min_const_generics): We currently only allow `N` or `{ N }`. - if !trivial && self.session.features_untracked().min_const_generics { + if !(trivial + || features.const_generics + || features.lazy_normalization_consts) + { if record_used { self.report_error( span, diff --git a/compiler/rustc_serialize/src/lib.rs b/compiler/rustc_serialize/src/lib.rs index fab29f29e87..ac1cdc6ad45 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -13,7 +13,7 @@ Core encoding and decoding interfaces. #![feature(never_type)] #![feature(nll)] #![feature(associated_type_bounds)] -#![feature(min_const_generics)] +#![cfg_attr(bootstrap, feature(min_const_generics))] #![cfg_attr(test, feature(test))] #![allow(rustc::internal)] diff --git a/compiler/rustc_typeck/src/check/wfcheck.rs b/compiler/rustc_typeck/src/check/wfcheck.rs index c09f8cce5b4..cd871a4da97 100644 --- a/compiler/rustc_typeck/src/check/wfcheck.rs +++ b/compiler/rustc_typeck/src/check/wfcheck.rs @@ -293,7 +293,13 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) { let err_ty_str; let mut is_ptr = true; - let err = if tcx.features().min_const_generics { + let err = if tcx.features().const_generics { + match ty.peel_refs().kind() { + ty::FnPtr(_) => Some("function pointers"), + ty::RawPtr(_) => Some("raw pointers"), + _ => None, + } + } else { match ty.kind() { ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Error(_) => None, ty::FnPtr(_) => Some("function pointers"), @@ -304,12 +310,6 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) { Some(err_ty_str.as_str()) } } - } else { - match ty.peel_refs().kind() { - ty::FnPtr(_) => Some("function pointers"), - ty::RawPtr(_) => Some("raw pointers"), - _ => None, - } }; if let Some(unsupported_type) = err { if is_ptr { diff --git a/compiler/rustc_typeck/src/collect.rs b/compiler/rustc_typeck/src/collect.rs index bc6b2037c18..dd4bfc7a751 100644 --- a/compiler/rustc_typeck/src/collect.rs +++ b/compiler/rustc_typeck/src/collect.rs @@ -1260,7 +1260,7 @@ fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Generics { // used with const generics, e.g. `Foo<{N+1}>`, can work at all. // // Note that we do not supply the parent generics when using - // `feature(min_const_generics)`. + // `min_const_generics`. Some(parent_def_id.to_def_id()) } else { let parent_node = tcx.hir().get(tcx.hir().get_parent_node(hir_id)); From 49f890bdb33f02b4a4a20d1fa1926c28ae0f4601 Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Tue, 17 Nov 2020 11:42:16 +0100 Subject: [PATCH 2/4] delete no longer relevant tests --- .../const-param-in-trait-ungated.rs | 3 -- .../const-param-in-trait-ungated.stderr | 12 ------- .../ui/const-generics/issues/issue-60263.rs | 9 ----- .../const-generics/issues/issue-60263.stderr | 12 ------- .../const-generics/min-and-full-same-time.rs | 7 ---- .../min-and-full-same-time.stderr | 13 -------- .../feature-gate-min_const_generics.rs | 4 --- .../feature-gate-min_const_generics.stderr | 12 ------- .../feature-gate-const_generics-ptr.rs | 9 ----- .../feature-gate-const_generics-ptr.stderr | 33 ------------------- 10 files changed, 114 deletions(-) delete mode 100644 src/test/ui/const-generics/const-param-in-trait-ungated.rs delete mode 100644 src/test/ui/const-generics/const-param-in-trait-ungated.stderr delete mode 100644 src/test/ui/const-generics/issues/issue-60263.rs delete mode 100644 src/test/ui/const-generics/issues/issue-60263.stderr delete mode 100644 src/test/ui/const-generics/min-and-full-same-time.rs delete mode 100644 src/test/ui/const-generics/min-and-full-same-time.stderr delete mode 100644 src/test/ui/const-generics/min_const_generics/feature-gate-min_const_generics.rs delete mode 100644 src/test/ui/const-generics/min_const_generics/feature-gate-min_const_generics.stderr delete mode 100644 src/test/ui/feature-gates/feature-gate-const_generics-ptr.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-const_generics-ptr.stderr diff --git a/src/test/ui/const-generics/const-param-in-trait-ungated.rs b/src/test/ui/const-generics/const-param-in-trait-ungated.rs deleted file mode 100644 index 8a81bcc1a80..00000000000 --- a/src/test/ui/const-generics/const-param-in-trait-ungated.rs +++ /dev/null @@ -1,3 +0,0 @@ -trait Trait {} //~ ERROR const generics are unstable - -fn main() {} diff --git a/src/test/ui/const-generics/const-param-in-trait-ungated.stderr b/src/test/ui/const-generics/const-param-in-trait-ungated.stderr deleted file mode 100644 index d53a4ac2d4c..00000000000 --- a/src/test/ui/const-generics/const-param-in-trait-ungated.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: const generics are unstable - --> $DIR/const-param-in-trait-ungated.rs:1:19 - | -LL | trait Trait {} - | ^ - | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/const-generics/issues/issue-60263.rs b/src/test/ui/const-generics/issues/issue-60263.rs deleted file mode 100644 index 70cbc242c41..00000000000 --- a/src/test/ui/const-generics/issues/issue-60263.rs +++ /dev/null @@ -1,9 +0,0 @@ -struct B; //~ ERROR const generics are unstable - -impl B<0> { - fn bug() -> Self { - panic!() - } -} - -fn main() {} diff --git a/src/test/ui/const-generics/issues/issue-60263.stderr b/src/test/ui/const-generics/issues/issue-60263.stderr deleted file mode 100644 index aeef296f385..00000000000 --- a/src/test/ui/const-generics/issues/issue-60263.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: const generics are unstable - --> $DIR/issue-60263.rs:1:16 - | -LL | struct B; - | ^ - | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/const-generics/min-and-full-same-time.rs b/src/test/ui/const-generics/min-and-full-same-time.rs deleted file mode 100644 index 2365adc3a86..00000000000 --- a/src/test/ui/const-generics/min-and-full-same-time.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![feature(const_generics)] -//~^ ERROR features `const_generics` and `min_const_generics` are incompatible -#![allow(incomplete_features)] -#![feature(min_const_generics)] - - -fn main() {} diff --git a/src/test/ui/const-generics/min-and-full-same-time.stderr b/src/test/ui/const-generics/min-and-full-same-time.stderr deleted file mode 100644 index 907fec9bbe1..00000000000 --- a/src/test/ui/const-generics/min-and-full-same-time.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: features `const_generics` and `min_const_generics` are incompatible, using them at the same time is not allowed - --> $DIR/min-and-full-same-time.rs:1:12 - | -LL | #![feature(const_generics)] - | ^^^^^^^^^^^^^^ -... -LL | #![feature(min_const_generics)] - | ^^^^^^^^^^^^^^^^^^ - | - = help: remove one of these features - -error: aborting due to previous error - diff --git a/src/test/ui/const-generics/min_const_generics/feature-gate-min_const_generics.rs b/src/test/ui/const-generics/min_const_generics/feature-gate-min_const_generics.rs deleted file mode 100644 index 423deae4600..00000000000 --- a/src/test/ui/const-generics/min_const_generics/feature-gate-min_const_generics.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn test() {} -//~^ ERROR const generics are unstable - -fn main() {} diff --git a/src/test/ui/const-generics/min_const_generics/feature-gate-min_const_generics.stderr b/src/test/ui/const-generics/min_const_generics/feature-gate-min_const_generics.stderr deleted file mode 100644 index 7f82a960da2..00000000000 --- a/src/test/ui/const-generics/min_const_generics/feature-gate-min_const_generics.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: const generics are unstable - --> $DIR/feature-gate-min_const_generics.rs:1:15 - | -LL | fn test() {} - | ^ - | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/feature-gate-const_generics-ptr.rs b/src/test/ui/feature-gates/feature-gate-const_generics-ptr.rs deleted file mode 100644 index dc602ba7e6f..00000000000 --- a/src/test/ui/feature-gates/feature-gate-const_generics-ptr.rs +++ /dev/null @@ -1,9 +0,0 @@ -struct ConstFn; -//~^ ERROR const generics are unstable -//~^^ ERROR using function pointers as const generic parameters is forbidden - -struct ConstPtr; -//~^ ERROR const generics are unstable -//~^^ ERROR using raw pointers as const generic parameters is forbidden - -fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-const_generics-ptr.stderr b/src/test/ui/feature-gates/feature-gate-const_generics-ptr.stderr deleted file mode 100644 index eef465318a3..00000000000 --- a/src/test/ui/feature-gates/feature-gate-const_generics-ptr.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error[E0658]: const generics are unstable - --> $DIR/feature-gate-const_generics-ptr.rs:1:22 - | -LL | struct ConstFn; - | ^ - | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable - -error[E0658]: const generics are unstable - --> $DIR/feature-gate-const_generics-ptr.rs:5:23 - | -LL | struct ConstPtr; - | ^ - | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable - -error: using function pointers as const generic parameters is forbidden - --> $DIR/feature-gate-const_generics-ptr.rs:1:25 - | -LL | struct ConstFn; - | ^^^^ - -error: using raw pointers as const generic parameters is forbidden - --> $DIR/feature-gate-const_generics-ptr.rs:5:26 - | -LL | struct ConstPtr; - | ^^^^^^^^^^ - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0658`. From 18fa7789cdeced758cb4e4db22061c31b4dbad80 Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Tue, 17 Nov 2020 11:42:53 +0100 Subject: [PATCH 3/4] update error codes --- compiler/rustc_error_codes/src/error_codes/E0730.md | 2 -- compiler/rustc_error_codes/src/error_codes/E0770.md | 1 - 2 files changed, 3 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0730.md b/compiler/rustc_error_codes/src/error_codes/E0730.md index 016b3f38aa3..56d0e6afa18 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0730.md +++ b/compiler/rustc_error_codes/src/error_codes/E0730.md @@ -3,8 +3,6 @@ An array without a fixed length was pattern-matched. Erroneous code example: ```compile_fail,E0730 -#![feature(const_generics)] - fn is_123(x: [u32; N]) -> bool { match x { [1, 2, ..] => true, // error: cannot pattern-match on an diff --git a/compiler/rustc_error_codes/src/error_codes/E0770.md b/compiler/rustc_error_codes/src/error_codes/E0770.md index 278bf9b907b..b39163a9de3 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0770.md +++ b/compiler/rustc_error_codes/src/error_codes/E0770.md @@ -10,6 +10,5 @@ fn foo() {} // error! To fix this error, use a concrete type for the const parameter: ``` -#![feature(const_generics)] fn foo() {} ``` From c4ba60a191bccd2f2568572efb76e0e37e88dd21 Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Tue, 17 Nov 2020 11:44:21 +0100 Subject: [PATCH 4/4] update tests --- .../error-in-impl-trait/const-generics.rs | 1 - src/test/rustdoc/async-fn.rs | 2 - .../const-generics/auxiliary/extern_crate.rs | 2 - .../const-generics/const-generics-docs.rs | 1 - src/test/rustdoc/const-generics/type-alias.rs | 1 - .../match_arr_unknown_len.stderr | 1 - .../associated-const-type-parameter-arrays.rs | 5 +- ...ociated-const-type-parameter-arrays.stderr | 16 +-- .../associated-item-duplicate-bounds.rs | 2 +- .../associated-item-duplicate-bounds.stderr | 10 +- .../issues/issue-78654.full.stderr | 4 +- .../async-await/issues/issue-78654.min.stderr | 4 +- src/test/ui/async-await/issues/issue-78654.rs | 1 - src/test/ui/binding/const-param.full.stderr | 9 ++ src/test/ui/binding/const-param.min.stderr | 9 ++ src/test/ui/binding/const-param.rs | 5 +- src/test/ui/binding/const-param.stderr | 19 --- .../const-generics/apit-with-const-param.rs | 1 - .../const-generics/argument_order.full.stderr | 4 +- .../const-generics/argument_order.min.stderr | 8 +- src/test/ui/const-generics/argument_order.rs | 1 - ...y-size-in-generic-struct-param.full.stderr | 4 +- ...ay-size-in-generic-struct-param.min.stderr | 6 +- .../array-size-in-generic-struct-param.rs | 1 - .../array-wrapper-struct-ctor.rs | 1 - .../associated-type-bound-fail.full.stderr | 2 +- .../associated-type-bound-fail.min.stderr | 2 +- .../associated-type-bound-fail.rs | 1 - .../const-generics/associated-type-bound.rs | 1 - .../auxiliary/const_generic_lib.rs | 1 - .../ui/const-generics/auxiliary/crayte.rs | 1 - .../ui/const-generics/auxiliary/impl-const.rs | 1 - src/test/ui/const-generics/broken-mir-1.rs | 1 - src/test/ui/const-generics/broken-mir-2.rs | 1 - .../cannot-infer-type-for-const-param.rs | 1 - .../closing-args-token.full.stderr | 10 +- .../closing-args-token.min.stderr | 10 +- .../ui/const-generics/closing-args-token.rs | 1 - .../ui/const-generics/coerce_unsized_array.rs | 1 - .../concrete-const-as-fn-arg.rs | 1 - .../concrete-const-impl-method.rs | 1 - .../condition-in-trait-const-arg.rs | 1 - .../const-arg-in-const-arg.min.stderr | 46 +++---- .../const-generics/const-arg-in-const-arg.rs | 1 - src/test/ui/const-generics/const-arg-in-fn.rs | 1 - .../const-arg-type-arg-misordered.full.stderr | 2 +- .../const-arg-type-arg-misordered.min.stderr | 2 +- .../const-arg-type-arg-misordered.rs | 1 - .../const-argument-if-length.full.stderr | 4 +- .../const-argument-if-length.min.stderr | 4 +- .../const-argument-if-length.rs | 1 - .../const-expression-parameter.full.stderr | 2 +- .../const-expression-parameter.min.stderr | 2 +- .../const-expression-parameter.rs | 1 - .../const-fn-with-const-param.rs | 1 - .../const-generic-array-wrapper.rs | 1 - .../const-generics/const-generic-type_name.rs | 1 - .../const-param-after-const-literal-arg.rs | 1 - ...onst-param-before-other-params.full.stderr | 2 +- ...const-param-before-other-params.min.stderr | 8 +- .../const-param-before-other-params.rs | 1 - .../const-param-elided-lifetime.full.stderr | 10 +- .../const-param-elided-lifetime.min.stderr | 20 +-- .../const-param-elided-lifetime.rs | 1 - .../const-param-from-outer-fn.full.stderr | 2 +- .../const-param-from-outer-fn.min.stderr | 2 +- .../const-param-from-outer-fn.rs | 1 - .../ui/const-generics/const-param-hygiene.rs | 1 - .../ui/const-generics/const-param-in-async.rs | 1 - .../ui/const-generics/const-param-in-trait.rs | 1 - .../const-generics/const-param-shadowing.rs | 2 - .../const-param-shadowing.stderr | 2 +- ...am-type-depends-on-const-param.full.stderr | 4 +- ...ram-type-depends-on-const-param.min.stderr | 8 +- ...const-param-type-depends-on-const-param.rs | 1 - ...aram-type-depends-on-type-param-ungated.rs | 2 +- ...-type-depends-on-type-param-ungated.stderr | 14 +- ...ram-type-depends-on-type-param.full.stderr | 4 +- ...aram-type-depends-on-type-param.min.stderr | 4 +- .../const-param-type-depends-on-type-param.rs | 1 - ...const-parameter-uppercase-lint.full.stderr | 4 +- .../const-parameter-uppercase-lint.min.stderr | 4 +- .../const-parameter-uppercase-lint.rs | 1 - src/test/ui/const-generics/const-types.rs | 1 - ...gate-const_evaluatable_checked.full.stderr | 2 +- ...-gate-const_evaluatable_checked.min.stderr | 2 +- .../feature-gate-const_evaluatable_checked.rs | 1 - .../simple.min.stderr | 4 +- .../const_evaluatable_checked/simple.rs | 1 - .../simple_fail.full.stderr | 2 +- .../simple_fail.min.stderr | 2 +- .../const_evaluatable_checked/simple_fail.rs | 1 - src/test/ui/const-generics/core-types.rs | 1 - .../ui/const-generics/cross_crate_complex.rs | 1 - .../defaults/complex-unord-param.min.stderr | 2 +- .../defaults/complex-unord-param.rs | 1 - .../defaults/intermixed-lifetime.full.stderr | 4 +- .../defaults/intermixed-lifetime.min.stderr | 8 +- .../defaults/intermixed-lifetime.rs | 1 - .../defaults/needs-feature.min.stderr | 2 +- .../defaults/needs-feature.none.stderr | 16 +-- .../const-generics/defaults/needs-feature.rs | 7 +- .../defaults/simple-defaults.min.stderr | 2 +- .../defaults/simple-defaults.rs | 1 - .../defaults/wrong-order.full.stderr | 3 +- .../defaults/wrong-order.min.stderr | 2 +- .../ui/const-generics/defaults/wrong-order.rs | 1 - .../derive-debug-array-wrapper.rs | 1 - .../different_byref.full.stderr | 2 +- .../const-generics/different_byref.min.stderr | 2 +- src/test/ui/const-generics/different_byref.rs | 1 - .../different_byref_simple.full.stderr | 2 +- .../different_byref_simple.min.stderr | 2 +- .../const-generics/different_byref_simple.rs | 1 - src/test/ui/const-generics/dyn-supertraits.rs | 1 - .../exhaustive-value.full.stderr | 2 +- .../exhaustive-value.min.stderr | 2 +- .../ui/const-generics/exhaustive-value.rs | 1 - .../fn-const-param-call.full.stderr | 4 +- .../fn-const-param-call.min.stderr | 4 +- .../ui/const-generics/fn-const-param-call.rs | 1 - .../fn-const-param-infer.full.stderr | 2 +- .../fn-const-param-infer.min.stderr | 2 +- .../ui/const-generics/fn-const-param-infer.rs | 1 - .../fn-taking-const-generic-array.rs | 1 - ...bid-non-structural_match-types.full.stderr | 2 +- ...rbid-non-structural_match-types.min.stderr | 6 +- .../forbid-non-structural_match-types.rs | 1 - .../foreign-item-const-parameter.full.stderr | 4 +- .../foreign-item-const-parameter.min.stderr | 4 +- .../foreign-item-const-parameter.rs | 1 - ...-function-call-in-array-length.full.stderr | 2 +- ...c-function-call-in-array-length.min.stderr | 4 +- .../generic-function-call-in-array-length.rs | 1 - .../generic-param-mismatch.full.stderr | 2 +- .../generic-param-mismatch.min.stderr | 2 +- .../const-generics/generic-param-mismatch.rs | 1 - .../generic-sum-in-array-length.full.stderr | 2 +- .../generic-sum-in-array-length.min.stderr | 4 +- .../generic-sum-in-array-length.rs | 1 - .../impl-const-generic-struct.rs | 1 - ...mpl-trait-with-const-arguments.full.stderr | 2 +- ...impl-trait-with-const-arguments.min.stderr | 2 +- .../impl-trait-with-const-arguments.rs | 1 - ...incorrect-number-of-const-args.full.stderr | 4 +- .../incorrect-number-of-const-args.min.stderr | 4 +- .../incorrect-number-of-const-args.rs | 1 - .../infer/cannot-infer-const-args.full.stderr | 2 +- .../infer/cannot-infer-const-args.min.stderr | 2 +- .../infer/cannot-infer-const-args.rs | 1 - .../ui/const-generics/infer/issue-77092.rs | 2 - .../const-generics/infer/issue-77092.stderr | 2 +- .../infer/method-chain.full.stderr | 2 +- .../infer/method-chain.min.stderr | 2 +- .../ui/const-generics/infer/method-chain.rs | 1 - .../infer/uninferred-consts.full.stderr | 2 +- .../infer/uninferred-consts.min.stderr | 2 +- .../const-generics/infer/uninferred-consts.rs | 1 - .../ui/const-generics/infer_arg_from_pat.rs | 1 - .../const-generics/infer_arr_len_from_pat.rs | 1 - ...ger-literal-generic-arg-in-where-clause.rs | 1 - ...cs-type_name-as-const-argument.full.stderr | 2 +- ...ics-type_name-as-const-argument.min.stderr | 4 +- .../intrinsics-type_name-as-const-argument.rs | 1 - .../issue-61522-array-len-succ.full.stderr | 4 +- .../issue-61522-array-len-succ.min.stderr | 4 +- .../issue-61522-array-len-succ.rs | 1 - ...96-impl-trait-for-str-const-arg.min.stderr | 2 +- ...ssue-66596-impl-trait-for-str-const-arg.rs | 1 - .../ui/const-generics/issue-67375.full.stderr | 4 +- .../ui/const-generics/issue-67375.min.stderr | 4 +- src/test/ui/const-generics/issue-67375.rs | 1 - .../const-generics/issue-67945-1.full.stderr | 4 +- .../const-generics/issue-67945-1.min.stderr | 6 +- src/test/ui/const-generics/issue-67945-1.rs | 1 - .../const-generics/issue-67945-2.full.stderr | 4 +- .../const-generics/issue-67945-2.min.stderr | 6 +- src/test/ui/const-generics/issue-67945-2.rs | 1 - .../const-generics/issue-67945-3.full.stderr | 2 +- .../const-generics/issue-67945-3.min.stderr | 2 +- src/test/ui/const-generics/issue-67945-3.rs | 1 - .../issue-68104-print-stack-overflow.rs | 1 - .../issue-70180-1-stalled_on.rs | 1 - .../issue-70180-2-stalled_on.rs | 1 - src/test/ui/const-generics/issue-71986.rs | 1 - src/test/ui/const-generics/issue-74906.rs | 1 - .../auxiliary/const_generic_issues_lib.rs | 1 - .../issues/issue-56445.full.stderr | 3 +- .../issues/issue-56445.min.stderr | 2 +- .../ui/const-generics/issues/issue-56445.rs | 1 - ...ssue-60818-struct-constructors.full.stderr | 1 - .../issues/issue-60818-struct-constructors.rs | 1 - .../issues/issue-61336-1.full.stderr | 1 - .../ui/const-generics/issues/issue-61336-1.rs | 1 - .../issues/issue-61336-2.full.stderr | 3 +- .../issues/issue-61336-2.min.stderr | 2 +- .../ui/const-generics/issues/issue-61336-2.rs | 1 - .../issues/issue-61336.full.stderr | 3 +- .../issues/issue-61336.min.stderr | 2 +- .../ui/const-generics/issues/issue-61336.rs | 1 - .../issues/issue-61422.full.stderr | 1 - .../ui/const-generics/issues/issue-61422.rs | 1 - .../issues/issue-61432.full.stderr | 1 - .../ui/const-generics/issues/issue-61432.rs | 1 - .../issues/issue-61747.full.stderr | 3 +- .../issues/issue-61747.min.stderr | 2 +- .../ui/const-generics/issues/issue-61747.rs | 1 - .../issues/issue-61935.full.stderr | 2 +- .../issues/issue-61935.min.stderr | 2 +- .../ui/const-generics/issues/issue-61935.rs | 1 - ...sue-62187-encountered-polymorphic-const.rs | 1 - .../issues/issue-62220.full.stderr | 2 +- .../issues/issue-62220.min.stderr | 2 +- .../ui/const-generics/issues/issue-62220.rs | 1 - .../issues/issue-62456.full.stderr | 2 +- .../issues/issue-62456.min.stderr | 2 +- .../ui/const-generics/issues/issue-62456.rs | 1 - .../issues/issue-62504.full.stderr | 2 +- .../issues/issue-62504.min.stderr | 4 +- .../ui/const-generics/issues/issue-62504.rs | 1 - .../issues/issue-62579-no-match.min.stderr | 2 +- .../issues/issue-62579-no-match.rs | 1 - .../issues/issue-62878.full.stderr | 6 +- .../issues/issue-62878.min.stderr | 4 +- .../ui/const-generics/issues/issue-62878.rs | 1 - .../issues/issue-63322-forbid-dyn.full.stderr | 2 +- .../issues/issue-63322-forbid-dyn.min.stderr | 4 +- .../issues/issue-63322-forbid-dyn.rs | 1 - .../issues/issue-64494.full.stderr | 4 +- .../issues/issue-64494.min.stderr | 6 +- .../ui/const-generics/issues/issue-64494.rs | 1 - .../ui/const-generics/issues/issue-64519.rs | 1 - .../issues/issue-66205.full.stderr | 2 +- .../issues/issue-66205.min.stderr | 2 +- .../ui/const-generics/issues/issue-66205.rs | 1 - .../ui/const-generics/issues/issue-66906.rs | 1 - .../ui/const-generics/issues/issue-67185-1.rs | 1 - .../issues/issue-67185-2.full.stderr | 12 +- .../issues/issue-67185-2.min.stderr | 12 +- .../ui/const-generics/issues/issue-67185-2.rs | 1 - .../issues/issue-67739.full.stderr | 2 +- .../issues/issue-67739.min.stderr | 2 +- .../ui/const-generics/issues/issue-67739.rs | 1 - .../issues/issue-68366.full.stderr | 4 +- .../issues/issue-68366.min.stderr | 6 +- .../ui/const-generics/issues/issue-68366.rs | 1 - .../ui/const-generics/issues/issue-68596.rs | 1 - .../issues/issue-68615-adt.min.stderr | 2 +- .../const-generics/issues/issue-68615-adt.rs | 1 - .../issues/issue-68615-array.min.stderr | 2 +- .../issues/issue-68615-array.rs | 1 - .../issues/issue-68977.full.stderr | 2 +- .../issues/issue-68977.min.stderr | 4 +- .../ui/const-generics/issues/issue-68977.rs | 1 - .../ui/const-generics/issues/issue-70125-1.rs | 1 - .../ui/const-generics/issues/issue-70125-2.rs | 1 - .../ui/const-generics/issues/issue-70167.rs | 1 - .../issues/issue-71169.full.stderr | 4 +- .../issues/issue-71169.min.stderr | 4 +- .../ui/const-generics/issues/issue-71169.rs | 1 - .../issues/issue-71381.full.stderr | 8 +- .../issues/issue-71381.min.stderr | 8 +- .../ui/const-generics/issues/issue-71381.rs | 1 - .../issues/issue-71382.full.stderr | 2 +- .../issues/issue-71382.min.stderr | 2 +- .../ui/const-generics/issues/issue-71382.rs | 1 - .../issues/issue-71611.full.stderr | 4 +- .../issues/issue-71611.min.stderr | 4 +- .../ui/const-generics/issues/issue-71611.rs | 1 - .../issues/issue-72352.full.stderr | 2 +- .../issues/issue-72352.min.stderr | 2 +- .../ui/const-generics/issues/issue-72352.rs | 1 - .../issues/issue-72787.full.stderr | 10 +- .../issues/issue-72787.min.stderr | 12 +- .../ui/const-generics/issues/issue-72787.rs | 1 - ...ue-72819-generic-in-const-eval.full.stderr | 2 +- ...sue-72819-generic-in-const-eval.min.stderr | 2 +- .../issue-72819-generic-in-const-eval.rs | 1 - .../issues/issue-73491.min.stderr | 2 +- .../ui/const-generics/issues/issue-73491.rs | 1 - .../issues/issue-73508.full.stderr | 2 +- .../issues/issue-73508.min.stderr | 2 +- .../ui/const-generics/issues/issue-73508.rs | 1 - .../issues/issue-74101.min.stderr | 4 +- .../ui/const-generics/issues/issue-74101.rs | 1 - .../issues/issue-74255.min.stderr | 2 +- .../ui/const-generics/issues/issue-74255.rs | 1 - .../issues/issue-74950.min.stderr | 10 +- .../ui/const-generics/issues/issue-74950.rs | 1 - .../issues/issue-75047.min.stderr | 2 +- .../ui/const-generics/issues/issue-75047.rs | 1 - .../issue-76701-ty-param-in-const.full.stderr | 4 +- .../issue-76701-ty-param-in-const.min.stderr | 4 +- .../issues/issue-76701-ty-param-in-const.rs | 1 - .../issues/issue70273-assoc-fn.rs | 1 - .../macro_rules-braces.full.stderr | 12 +- .../macro_rules-braces.min.stderr | 12 +- .../ui/const-generics/macro_rules-braces.rs | 1 - .../min_const_generics/assoc_const.rs | 2 - .../min_const_generics/complex-expression.rs | 2 - .../complex-expression.stderr | 16 +-- .../min_const_generics/complex-types.rs | 1 - .../min_const_generics/complex-types.stderr | 14 +- .../const-evaluatable-unchecked.rs | 1 - .../const-evaluatable-unchecked.stderr | 6 +- ...uggest-missing-braces-without-turbofish.rs | 2 - ...st-missing-braces-without-turbofish.stderr | 26 ++-- ...const-expression-suggest-missing-braces.rs | 2 - ...t-expression-suggest-missing-braces.stderr | 30 ++--- .../const_fn_in_generics.rs | 2 - .../default_function_param.rs | 2 - .../default_function_param.stderr | 2 +- .../min_const_generics/default_trait_param.rs | 2 - .../default_trait_param.stderr | 2 +- .../forbid-non-static-lifetimes.rs | 2 - .../forbid-non-static-lifetimes.stderr | 4 +- .../min_const_generics/invalid-patterns.rs | 1 - .../invalid-patterns.stderr | 16 +-- .../min_const_generics/macro-fail.rs | 2 - .../min_const_generics/macro-fail.stderr | 16 +-- .../min_const_generics/macro.rs | 2 - .../min_const_generics/self-ty-in-const-1.rs | 2 - .../self-ty-in-const-1.stderr | 6 +- .../min_const_generics/self-ty-in-const-2.rs | 2 - .../self-ty-in-const-2.stderr | 4 +- .../static-reference-array-const-param.rs | 2 - .../static-reference-array-const-param.stderr | 2 +- .../transmute-const-param-static-reference.rs | 2 - ...nsmute-const-param-static-reference.stderr | 2 +- .../mut-ref-const-param-array.rs | 1 - .../ui/const-generics/nested-type.full.stderr | 2 +- .../ui/const-generics/nested-type.min.stderr | 4 +- src/test/ui/const-generics/nested-type.rs | 1 - .../occurs-check/unify-fixpoint.stderr | 1 - ...ms-in-ct-in-ty-param-lazy-norm.full.stderr | 6 +- ...ams-in-ct-in-ty-param-lazy-norm.min.stderr | 6 +- .../params-in-ct-in-ty-param-lazy-norm.rs | 1 - src/test/ui/const-generics/promotion.rs | 2 - .../raw-ptr-const-param-deref.full.stderr | 4 +- .../raw-ptr-const-param-deref.min.stderr | 4 +- .../raw-ptr-const-param-deref.rs | 1 - .../raw-ptr-const-param.full.stderr | 2 +- .../raw-ptr-const-param.min.stderr | 2 +- .../ui/const-generics/raw-ptr-const-param.rs | 1 - .../slice-const-param-mismatch.full.stderr | 6 +- .../slice-const-param-mismatch.min.stderr | 4 +- .../slice-const-param-mismatch.rs | 1 - .../slice-const-param.min.stderr | 4 +- .../ui/const-generics/slice-const-param.rs | 1 - .../std/const-generics-range.min.stderr | 12 +- .../std/const-generics-range.rs | 1 - ...truct-with-invalid-const-param.full.stderr | 2 +- ...struct-with-invalid-const-param.min.stderr | 2 +- .../struct-with-invalid-const-param.rs | 1 - .../ui/const-generics/trait-const-args.rs | 1 - .../transparent-maybeunit-array-wrapper.rs | 1 - .../type-after-const-ok.min.stderr | 2 +- .../ui/const-generics/type-after-const-ok.rs | 1 - .../auxiliary/type_dependent_lib.rs | 1 - .../type-dependent/const-arg-in-const-arg.rs | 1 - .../type-dependent/issue-61936.rs | 1 - .../type-dependent/issue-63695.rs | 1 - .../type-dependent/issue-67144-1.rs | 1 - .../type-dependent/issue-67144-2.rs | 1 - .../type-dependent/issue-69816.rs | 1 - .../type-dependent/issue-70217.rs | 1 - .../type-dependent/issue-70507.rs | 1 - .../type-dependent/issue-70586.rs | 1 - .../type-dependent/issue-71348.min.stderr | 4 +- .../type-dependent/issue-71348.rs | 1 - .../type-dependent/issue-71382.full.stderr | 2 +- .../type-dependent/issue-71382.min.stderr | 2 +- .../type-dependent/issue-71382.rs | 1 - .../type-dependent/issue-71805.rs | 1 - .../type-dependent/issue-73730.rs | 1 - .../type-dependent/non-local.rs | 1 - .../ui/const-generics/type-dependent/qpath.rs | 1 - .../const-generics/type-dependent/simple.rs | 1 - .../type-dependent/type-mismatch.full.stderr | 2 +- .../type-dependent/type-mismatch.min.stderr | 2 +- .../type-dependent/type-mismatch.rs | 1 - .../ui/const-generics/type_of_anon_const.rs | 1 - .../types-mismatch-const-args.full.stderr | 4 +- .../types-mismatch-const-args.min.stderr | 4 +- .../types-mismatch-const-args.rs | 1 - .../uninferred-consts-during-codegen-1.rs | 1 - .../uninferred-consts-during-codegen-2.rs | 1 - .../ui/const-generics/unknown_adt.full.stderr | 2 +- .../ui/const-generics/unknown_adt.min.stderr | 2 +- src/test/ui/const-generics/unknown_adt.rs | 1 - .../ui/const-generics/unused-const-param.rs | 1 - .../const-generics/unused_braces.full.fixed | 1 - .../const-generics/unused_braces.full.stderr | 4 +- .../ui/const-generics/unused_braces.min.fixed | 1 - .../const-generics/unused_braces.min.stderr | 4 +- src/test/ui/const-generics/unused_braces.rs | 1 - .../ui/const-generics/wf-misc.full.stderr | 4 +- src/test/ui/const-generics/wf-misc.min.stderr | 4 +- src/test/ui/const-generics/wf-misc.rs | 1 - src/test/ui/const-generics/where-clauses.rs | 1 - .../dropck/reject-specialized-drops-8142.rs | 2 - .../reject-specialized-drops-8142.stderr | 62 ++++----- .../issue-70453-generics-in-discr-ice-2.rs | 2 +- ...issue-70453-generics-in-discr-ice-2.stderr | 9 +- .../issue-70453-generics-in-discr-ice.rs | 2 +- .../issue-70453-generics-in-discr-ice.stderr | 9 +- .../issue-70453-polymorphic-ctfe.rs | 4 +- .../issue-70453-polymorphic-ctfe.stderr | 13 +- src/test/ui/enum/issue-67945-1.rs | 4 +- src/test/ui/enum/issue-67945-1.stderr | 27 ++-- src/test/ui/enum/issue-67945-2.rs | 5 +- src/test/ui/enum/issue-67945-2.stderr | 25 ++-- src/test/ui/error-codes/E0730.stderr | 1 - src/test/ui/error-codes/E0771.stderr | 1 - .../feature-gate-const_generics.rs | 4 +- .../feature-gate-const_generics.stderr | 22 +--- .../param-in-ct-in-ty-param-default.rs | 2 +- .../param-in-ct-in-ty-param-default.stderr | 7 +- src/test/ui/hygiene/generic_params.stderr | 1 - .../issue-61574-const-parameters.stderr | 1 - src/test/ui/issues/issue-39559.rs | 2 +- src/test/ui/issues/issue-39559.stderr | 10 +- src/test/ui/issues/issue-59508-1.stderr | 1 - src/test/ui/issues/issue-59508.stderr | 2 +- .../feature-gate-lazy_normalization_consts.rs | 2 +- ...ture-gate-lazy_normalization_consts.stderr | 16 +-- .../ui/lifetime-before-type-params.stderr | 8 +- src/test/ui/lint/function-item-references.rs | 2 +- .../array-clone-with-generic-size.rs | 2 - src/test/ui/parser/issue-14303-enum.stderr | 2 +- src/test/ui/parser/issue-14303-fn-def.stderr | 2 +- src/test/ui/parser/issue-14303-impl.stderr | 2 +- src/test/ui/parser/issue-14303-struct.stderr | 2 +- src/test/ui/parser/issue-14303-trait.stderr | 2 +- .../const_parameters/closures.stderr | 1 - .../const_parameters/functions.stderr | 1 - .../ui/polymorphization/generators.stderr | 1 - ...e-65035-static-with-parent-generics.stderr | 1 - .../disallowed-positions.stderr | 1 - src/test/ui/simd/simd-array-type.rs | 2 +- src/test/ui/simd/simd-generics.rs | 2 +- ...intrinsic-generic-arithmetic-saturating.rs | 2 +- .../simd/simd-intrinsic-generic-arithmetic.rs | 2 +- .../suggestions/suggest-move-lifetimes.stderr | 8 +- .../symbol-names/const-generics-demangling.rs | 3 +- .../const-generics-demangling.stderr | 24 ++-- src/test/ui/symbol-names/const-generics.rs | 122 +++++++++--------- src/test/ui/symbol-names/issue-76365.rs | 3 +- .../assoc-type-const.stderr | 1 - 449 files changed, 658 insertions(+), 950 deletions(-) create mode 100644 src/test/ui/binding/const-param.full.stderr create mode 100644 src/test/ui/binding/const-param.min.stderr delete mode 100644 src/test/ui/binding/const-param.stderr diff --git a/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs b/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs index 97760cbf8fb..ed62f0208aa 100644 --- a/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs +++ b/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs @@ -1,6 +1,5 @@ // check-pass // edition:2018 -#![feature(min_const_generics)] trait ValidTrait {} /// This has docs diff --git a/src/test/rustdoc/async-fn.rs b/src/test/rustdoc/async-fn.rs index f0fd9703915..aa4ad261c80 100644 --- a/src/test/rustdoc/async-fn.rs +++ b/src/test/rustdoc/async-fn.rs @@ -1,7 +1,5 @@ // ignore-tidy-linelength // edition:2018 -#![feature(min_const_generics)] - // @has async_fn/fn.foo.html '//pre[@class="rust fn"]' 'pub async fn foo() -> Option' pub async fn foo() -> Option { None diff --git a/src/test/rustdoc/const-generics/auxiliary/extern_crate.rs b/src/test/rustdoc/const-generics/auxiliary/extern_crate.rs index b8bd040f7a4..55b632a48f2 100644 --- a/src/test/rustdoc/const-generics/auxiliary/extern_crate.rs +++ b/src/test/rustdoc/const-generics/auxiliary/extern_crate.rs @@ -1,6 +1,4 @@ // edition:2018 -#![feature(min_const_generics)] - pub fn extern_fn() -> impl Iterator { [[0; N]; N].iter().copied() } diff --git a/src/test/rustdoc/const-generics/const-generics-docs.rs b/src/test/rustdoc/const-generics/const-generics-docs.rs index 9c68e067c6f..21bf216c304 100644 --- a/src/test/rustdoc/const-generics/const-generics-docs.rs +++ b/src/test/rustdoc/const-generics/const-generics-docs.rs @@ -1,6 +1,5 @@ // edition:2018 // aux-build: extern_crate.rs -#![feature(min_const_generics)] #![crate_name = "foo"] extern crate extern_crate; diff --git a/src/test/rustdoc/const-generics/type-alias.rs b/src/test/rustdoc/const-generics/type-alias.rs index 3064d0701e3..85160dc07a7 100644 --- a/src/test/rustdoc/const-generics/type-alias.rs +++ b/src/test/rustdoc/const-generics/type-alias.rs @@ -1,5 +1,4 @@ // ignore-tidy-linelength -#![feature(min_const_generics)] #![crate_name = "foo"] // @has foo/type.CellIndex.html '//pre[@class="rust typedef"]' 'type CellIndex = [i64; D];' diff --git a/src/test/ui/array-slice-vec/match_arr_unknown_len.stderr b/src/test/ui/array-slice-vec/match_arr_unknown_len.stderr index 7c1a92c79d9..0ad05b3adeb 100644 --- a/src/test/ui/array-slice-vec/match_arr_unknown_len.stderr +++ b/src/test/ui/array-slice-vec/match_arr_unknown_len.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error[E0308]: mismatched types --> $DIR/match_arr_unknown_len.rs:6:9 diff --git a/src/test/ui/associated-consts/associated-const-type-parameter-arrays.rs b/src/test/ui/associated-consts/associated-const-type-parameter-arrays.rs index d51821059fc..5152d784047 100644 --- a/src/test/ui/associated-consts/associated-const-type-parameter-arrays.rs +++ b/src/test/ui/associated-consts/associated-const-type-parameter-arrays.rs @@ -14,8 +14,7 @@ impl Foo for Def { pub fn test() { let _array: [u32; ::Y]; - //~^ ERROR the trait bound `A: Foo` is not satisfied [E0277] + //~^ ERROR generic parameters may not be used } -fn main() { -} +fn main() {} diff --git a/src/test/ui/associated-consts/associated-const-type-parameter-arrays.stderr b/src/test/ui/associated-consts/associated-const-type-parameter-arrays.stderr index ac40e390cfb..d3a1cd30e2b 100644 --- a/src/test/ui/associated-consts/associated-const-type-parameter-arrays.stderr +++ b/src/test/ui/associated-consts/associated-const-type-parameter-arrays.stderr @@ -1,17 +1,11 @@ -error[E0277]: the trait bound `A: Foo` is not satisfied - --> $DIR/associated-const-type-parameter-arrays.rs:16:23 +error: generic parameters may not be used in const operations + --> $DIR/associated-const-type-parameter-arrays.rs:16:24 | -LL | const Y: usize; - | --------------- required by `Foo::Y` -... LL | let _array: [u32; ::Y]; - | ^^^^^^^^^^^^^ the trait `Foo` is not implemented for `A` + | ^ cannot perform const operation using `A` | -help: consider further restricting this bound - | -LL | pub fn test() { - | ^^^^^ + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: aborting due to previous error -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/associated-item/associated-item-duplicate-bounds.rs b/src/test/ui/associated-item/associated-item-duplicate-bounds.rs index bec922b0721..242a02353a1 100644 --- a/src/test/ui/associated-item/associated-item-duplicate-bounds.rs +++ b/src/test/ui/associated-item/associated-item-duplicate-bounds.rs @@ -5,7 +5,7 @@ trait Adapter { struct Foo { adapter: A, links: [u32; A::LINKS], // Shouldn't suggest bounds already there. - //~^ ERROR: no associated item named `LINKS` found + //~^ ERROR generic parameters may not be used in const operations } fn main() {} diff --git a/src/test/ui/associated-item/associated-item-duplicate-bounds.stderr b/src/test/ui/associated-item/associated-item-duplicate-bounds.stderr index ff1ad4c006e..0d84dca5b80 100644 --- a/src/test/ui/associated-item/associated-item-duplicate-bounds.stderr +++ b/src/test/ui/associated-item/associated-item-duplicate-bounds.stderr @@ -1,11 +1,11 @@ -error[E0599]: no associated item named `LINKS` found for type parameter `A` in the current scope - --> $DIR/associated-item-duplicate-bounds.rs:7:21 +error: generic parameters may not be used in const operations + --> $DIR/associated-item-duplicate-bounds.rs:7:18 | LL | links: [u32; A::LINKS], // Shouldn't suggest bounds already there. - | ^^^^^ associated item not found in `A` + | ^^^^^^^^ cannot perform const operation using `A` | - = help: items from traits can only be used if the type parameter is bounded by the trait + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: aborting due to previous error -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/async-await/issues/issue-78654.full.stderr b/src/test/ui/async-await/issues/issue-78654.full.stderr index ff0260523db..a9208ade740 100644 --- a/src/test/ui/async-await/issues/issue-78654.full.stderr +++ b/src/test/ui/async-await/issues/issue-78654.full.stderr @@ -1,11 +1,11 @@ error[E0573]: expected type, found built-in attribute `feature` - --> $DIR/issue-78654.rs:10:15 + --> $DIR/issue-78654.rs:9:15 | LL | impl Foo { | ^^^^^^^ not a type error[E0207]: the const parameter `H` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-78654.rs:10:12 + --> $DIR/issue-78654.rs:9:12 | LL | impl Foo { | ^ unconstrained const parameter diff --git a/src/test/ui/async-await/issues/issue-78654.min.stderr b/src/test/ui/async-await/issues/issue-78654.min.stderr index ff0260523db..a9208ade740 100644 --- a/src/test/ui/async-await/issues/issue-78654.min.stderr +++ b/src/test/ui/async-await/issues/issue-78654.min.stderr @@ -1,11 +1,11 @@ error[E0573]: expected type, found built-in attribute `feature` - --> $DIR/issue-78654.rs:10:15 + --> $DIR/issue-78654.rs:9:15 | LL | impl Foo { | ^^^^^^^ not a type error[E0207]: the const parameter `H` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-78654.rs:10:12 + --> $DIR/issue-78654.rs:9:12 | LL | impl Foo { | ^ unconstrained const parameter diff --git a/src/test/ui/async-await/issues/issue-78654.rs b/src/test/ui/async-await/issues/issue-78654.rs index b57ed35f8e3..37ebb4ecac8 100644 --- a/src/test/ui/async-await/issues/issue-78654.rs +++ b/src/test/ui/async-await/issues/issue-78654.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo; diff --git a/src/test/ui/binding/const-param.full.stderr b/src/test/ui/binding/const-param.full.stderr new file mode 100644 index 00000000000..0200c6def24 --- /dev/null +++ b/src/test/ui/binding/const-param.full.stderr @@ -0,0 +1,9 @@ +error[E0158]: const parameters cannot be referenced in patterns + --> $DIR/const-param.rs:8:9 + | +LL | N => {} + | ^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0158`. diff --git a/src/test/ui/binding/const-param.min.stderr b/src/test/ui/binding/const-param.min.stderr new file mode 100644 index 00000000000..0200c6def24 --- /dev/null +++ b/src/test/ui/binding/const-param.min.stderr @@ -0,0 +1,9 @@ +error[E0158]: const parameters cannot be referenced in patterns + --> $DIR/const-param.rs:8:9 + | +LL | N => {} + | ^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0158`. diff --git a/src/test/ui/binding/const-param.rs b/src/test/ui/binding/const-param.rs index 3c7f4d071f6..4aec801cb15 100644 --- a/src/test/ui/binding/const-param.rs +++ b/src/test/ui/binding/const-param.rs @@ -1,6 +1,7 @@ // Identifier pattern referring to a const generic parameter is an error (issue #68853). - -#![feature(const_generics)] //~ WARN the feature `const_generics` is incomplete +// revisions: full min +#![cfg_attr(full, feature(const_generics))] +#![cfg_attr(full, allow(incomplete_features))] fn check() { match 1 { diff --git a/src/test/ui/binding/const-param.stderr b/src/test/ui/binding/const-param.stderr deleted file mode 100644 index d3d06a2d834..00000000000 --- a/src/test/ui/binding/const-param.stderr +++ /dev/null @@ -1,19 +0,0 @@ -warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-param.rs:3:12 - | -LL | #![feature(const_generics)] - | ^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete - -error[E0158]: const parameters cannot be referenced in patterns - --> $DIR/const-param.rs:7:9 - | -LL | N => {} - | ^ - -error: aborting due to previous error; 1 warning emitted - -For more information about this error, try `rustc --explain E0158`. diff --git a/src/test/ui/const-generics/apit-with-const-param.rs b/src/test/ui/const-generics/apit-with-const-param.rs index facc0bcf513..3bc62141927 100644 --- a/src/test/ui/const-generics/apit-with-const-param.rs +++ b/src/test/ui/const-generics/apit-with-const-param.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Trait {} diff --git a/src/test/ui/const-generics/argument_order.full.stderr b/src/test/ui/const-generics/argument_order.full.stderr index b52e5050703..e533d4f7fb8 100644 --- a/src/test/ui/const-generics/argument_order.full.stderr +++ b/src/test/ui/const-generics/argument_order.full.stderr @@ -1,11 +1,11 @@ error: lifetime parameters must be declared prior to const parameters - --> $DIR/argument_order.rs:12:32 + --> $DIR/argument_order.rs:11:32 | LL | struct AlsoBad { | -----------------^^-----^^-------------------- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, const N: usize, T, const M: usize, U>` error[E0747]: lifetime provided when a type was expected - --> $DIR/argument_order.rs:20:23 + --> $DIR/argument_order.rs:19:23 | LL | let _: AlsoBad<7, 'static, u32, 'static, 17, u16>; | ^^^^^^^ diff --git a/src/test/ui/const-generics/argument_order.min.stderr b/src/test/ui/const-generics/argument_order.min.stderr index 728ae69b41f..f23bc6d6a2b 100644 --- a/src/test/ui/const-generics/argument_order.min.stderr +++ b/src/test/ui/const-generics/argument_order.min.stderr @@ -1,23 +1,23 @@ error: type parameters must be declared prior to const parameters - --> $DIR/argument_order.rs:6:28 + --> $DIR/argument_order.rs:5:28 | LL | struct Bad { | -----------------^- help: reorder the parameters: lifetimes, then types, then consts: `` error: lifetime parameters must be declared prior to const parameters - --> $DIR/argument_order.rs:12:32 + --> $DIR/argument_order.rs:11:32 | LL | struct AlsoBad { | -----------------^^-----^^-------------------- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T, U, const N: usize, const M: usize>` error: type parameters must be declared prior to const parameters - --> $DIR/argument_order.rs:12:36 + --> $DIR/argument_order.rs:11:36 | LL | struct AlsoBad { | ---------------------^----------------------^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T, U, const N: usize, const M: usize>` error[E0747]: lifetime provided when a type was expected - --> $DIR/argument_order.rs:20:23 + --> $DIR/argument_order.rs:19:23 | LL | let _: AlsoBad<7, 'static, u32, 'static, 17, u16>; | ^^^^^^^ diff --git a/src/test/ui/const-generics/argument_order.rs b/src/test/ui/const-generics/argument_order.rs index 507baf5fd75..95eaeea5818 100644 --- a/src/test/ui/const-generics/argument_order.rs +++ b/src/test/ui/const-generics/argument_order.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Bad { //[min]~^ ERROR type parameters must be declared prior to const parameters diff --git a/src/test/ui/const-generics/array-size-in-generic-struct-param.full.stderr b/src/test/ui/const-generics/array-size-in-generic-struct-param.full.stderr index cf4487b5829..0fb23e41b01 100644 --- a/src/test/ui/const-generics/array-size-in-generic-struct-param.full.stderr +++ b/src/test/ui/const-generics/array-size-in-generic-struct-param.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/array-size-in-generic-struct-param.rs:9:38 + --> $DIR/array-size-in-generic-struct-param.rs:8:38 | LL | struct ArithArrayLen([u32; 0 + N]); | ^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | struct ArithArrayLen([u32; 0 + N]); = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/array-size-in-generic-struct-param.rs:20:10 + --> $DIR/array-size-in-generic-struct-param.rs:19:10 | LL | arr: [u8; CFG.arr_size], | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/array-size-in-generic-struct-param.min.stderr b/src/test/ui/const-generics/array-size-in-generic-struct-param.min.stderr index 73c9ea59c95..7af23103ce7 100644 --- a/src/test/ui/const-generics/array-size-in-generic-struct-param.min.stderr +++ b/src/test/ui/const-generics/array-size-in-generic-struct-param.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/array-size-in-generic-struct-param.rs:9:48 + --> $DIR/array-size-in-generic-struct-param.rs:8:48 | LL | struct ArithArrayLen([u32; 0 + N]); | ^ cannot perform const operation using `N` @@ -8,7 +8,7 @@ LL | struct ArithArrayLen([u32; 0 + N]); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/array-size-in-generic-struct-param.rs:20:15 + --> $DIR/array-size-in-generic-struct-param.rs:19:15 | LL | arr: [u8; CFG.arr_size], | ^^^ cannot perform const operation using `CFG` @@ -17,7 +17,7 @@ LL | arr: [u8; CFG.arr_size], = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: `Config` is forbidden as the type of a const generic parameter - --> $DIR/array-size-in-generic-struct-param.rs:18:21 + --> $DIR/array-size-in-generic-struct-param.rs:17:21 | LL | struct B { | ^^^^^^ diff --git a/src/test/ui/const-generics/array-size-in-generic-struct-param.rs b/src/test/ui/const-generics/array-size-in-generic-struct-param.rs index 768180d0813..cd0a9742cd1 100644 --- a/src/test/ui/const-generics/array-size-in-generic-struct-param.rs +++ b/src/test/ui/const-generics/array-size-in-generic-struct-param.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #[allow(dead_code)] struct ArithArrayLen([u32; 0 + N]); diff --git a/src/test/ui/const-generics/array-wrapper-struct-ctor.rs b/src/test/ui/const-generics/array-wrapper-struct-ctor.rs index 390b6cc2049..732a1871456 100644 --- a/src/test/ui/const-generics/array-wrapper-struct-ctor.rs +++ b/src/test/ui/const-generics/array-wrapper-struct-ctor.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![allow(dead_code)] diff --git a/src/test/ui/const-generics/associated-type-bound-fail.full.stderr b/src/test/ui/const-generics/associated-type-bound-fail.full.stderr index 8ccbe5dee0e..6644e74f97a 100644 --- a/src/test/ui/const-generics/associated-type-bound-fail.full.stderr +++ b/src/test/ui/const-generics/associated-type-bound-fail.full.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `u16: Bar` is not satisfied - --> $DIR/associated-type-bound-fail.rs:14:5 + --> $DIR/associated-type-bound-fail.rs:13:5 | LL | type Assoc: Bar; | ------ required by this bound in `Foo::Assoc` diff --git a/src/test/ui/const-generics/associated-type-bound-fail.min.stderr b/src/test/ui/const-generics/associated-type-bound-fail.min.stderr index 8ccbe5dee0e..6644e74f97a 100644 --- a/src/test/ui/const-generics/associated-type-bound-fail.min.stderr +++ b/src/test/ui/const-generics/associated-type-bound-fail.min.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `u16: Bar` is not satisfied - --> $DIR/associated-type-bound-fail.rs:14:5 + --> $DIR/associated-type-bound-fail.rs:13:5 | LL | type Assoc: Bar; | ------ required by this bound in `Foo::Assoc` diff --git a/src/test/ui/const-generics/associated-type-bound-fail.rs b/src/test/ui/const-generics/associated-type-bound-fail.rs index 3440b1356c2..83b26700805 100644 --- a/src/test/ui/const-generics/associated-type-bound-fail.rs +++ b/src/test/ui/const-generics/associated-type-bound-fail.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] trait Bar {} diff --git a/src/test/ui/const-generics/associated-type-bound.rs b/src/test/ui/const-generics/associated-type-bound.rs index 374a49194b1..02f77396c0b 100644 --- a/src/test/ui/const-generics/associated-type-bound.rs +++ b/src/test/ui/const-generics/associated-type-bound.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] trait Bar {} diff --git a/src/test/ui/const-generics/auxiliary/const_generic_lib.rs b/src/test/ui/const-generics/auxiliary/const_generic_lib.rs index 899a5a1836c..8d4cd9c0d6b 100644 --- a/src/test/ui/const-generics/auxiliary/const_generic_lib.rs +++ b/src/test/ui/const-generics/auxiliary/const_generic_lib.rs @@ -1,6 +1,5 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct Struct(pub [u8; N]); diff --git a/src/test/ui/const-generics/auxiliary/crayte.rs b/src/test/ui/const-generics/auxiliary/crayte.rs index 725005971e1..d9baab956c9 100644 --- a/src/test/ui/const-generics/auxiliary/crayte.rs +++ b/src/test/ui/const-generics/auxiliary/crayte.rs @@ -1,7 +1,6 @@ // edition:2018 #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub trait Foo {} struct Local; diff --git a/src/test/ui/const-generics/auxiliary/impl-const.rs b/src/test/ui/const-generics/auxiliary/impl-const.rs index 2e25dadf119..4a6b5784221 100644 --- a/src/test/ui/const-generics/auxiliary/impl-const.rs +++ b/src/test/ui/const-generics/auxiliary/impl-const.rs @@ -1,6 +1,5 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct Num; diff --git a/src/test/ui/const-generics/broken-mir-1.rs b/src/test/ui/const-generics/broken-mir-1.rs index d13ae12c03b..34255fa9f58 100644 --- a/src/test/ui/const-generics/broken-mir-1.rs +++ b/src/test/ui/const-generics/broken-mir-1.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub trait Foo { fn foo(&self); diff --git a/src/test/ui/const-generics/broken-mir-2.rs b/src/test/ui/const-generics/broken-mir-2.rs index 2f9afe0b464..ac358b01672 100644 --- a/src/test/ui/const-generics/broken-mir-2.rs +++ b/src/test/ui/const-generics/broken-mir-2.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::fmt::Debug; diff --git a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs index 931f6ade7f1..44aef859f2d 100644 --- a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs +++ b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] // This test confirms that the types can be inferred correctly for this example with const // generics. Previously this would ICE, and more recently error. diff --git a/src/test/ui/const-generics/closing-args-token.full.stderr b/src/test/ui/const-generics/closing-args-token.full.stderr index 1c3ddd345a5..7737705440e 100644 --- a/src/test/ui/const-generics/closing-args-token.full.stderr +++ b/src/test/ui/const-generics/closing-args-token.full.stderr @@ -1,5 +1,5 @@ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/closing-args-token.rs:11:9 + --> $DIR/closing-args-token.rs:10:9 | LL | S::<5 + 2 >> 7>; | ^^^^^ @@ -10,7 +10,7 @@ LL | S::<{ 5 + 2 } >> 7>; | ^ ^ error: comparison operators cannot be chained - --> $DIR/closing-args-token.rs:11:16 + --> $DIR/closing-args-token.rs:10:16 | LL | S::<5 + 2 >> 7>; | ^ ^ @@ -21,7 +21,7 @@ LL | S::<5 + 2 >> 7 && 7>; | ^^^^ error: comparison operators cannot be chained - --> $DIR/closing-args-token.rs:17:20 + --> $DIR/closing-args-token.rs:16:20 | LL | S::<{ 5 + 2 } >> 7>; | ^ ^ @@ -32,13 +32,13 @@ LL | S::<{ 5 + 2 } >> 7 && 7>; | ^^^^ error: expected expression, found `;` - --> $DIR/closing-args-token.rs:22:16 + --> $DIR/closing-args-token.rs:21:16 | LL | T::<0 >= 3>; | ^ expected expression error: comparison operators cannot be chained - --> $DIR/closing-args-token.rs:28:12 + --> $DIR/closing-args-token.rs:27:12 | LL | T::>= 2 > 0>; | ^^ ^ diff --git a/src/test/ui/const-generics/closing-args-token.min.stderr b/src/test/ui/const-generics/closing-args-token.min.stderr index 1c3ddd345a5..7737705440e 100644 --- a/src/test/ui/const-generics/closing-args-token.min.stderr +++ b/src/test/ui/const-generics/closing-args-token.min.stderr @@ -1,5 +1,5 @@ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/closing-args-token.rs:11:9 + --> $DIR/closing-args-token.rs:10:9 | LL | S::<5 + 2 >> 7>; | ^^^^^ @@ -10,7 +10,7 @@ LL | S::<{ 5 + 2 } >> 7>; | ^ ^ error: comparison operators cannot be chained - --> $DIR/closing-args-token.rs:11:16 + --> $DIR/closing-args-token.rs:10:16 | LL | S::<5 + 2 >> 7>; | ^ ^ @@ -21,7 +21,7 @@ LL | S::<5 + 2 >> 7 && 7>; | ^^^^ error: comparison operators cannot be chained - --> $DIR/closing-args-token.rs:17:20 + --> $DIR/closing-args-token.rs:16:20 | LL | S::<{ 5 + 2 } >> 7>; | ^ ^ @@ -32,13 +32,13 @@ LL | S::<{ 5 + 2 } >> 7 && 7>; | ^^^^ error: expected expression, found `;` - --> $DIR/closing-args-token.rs:22:16 + --> $DIR/closing-args-token.rs:21:16 | LL | T::<0 >= 3>; | ^ expected expression error: comparison operators cannot be chained - --> $DIR/closing-args-token.rs:28:12 + --> $DIR/closing-args-token.rs:27:12 | LL | T::>= 2 > 0>; | ^^ ^ diff --git a/src/test/ui/const-generics/closing-args-token.rs b/src/test/ui/const-generics/closing-args-token.rs index 8699637c54e..a9b552ebed7 100644 --- a/src/test/ui/const-generics/closing-args-token.rs +++ b/src/test/ui/const-generics/closing-args-token.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct S; struct T; diff --git a/src/test/ui/const-generics/coerce_unsized_array.rs b/src/test/ui/const-generics/coerce_unsized_array.rs index a3c295f73c7..8e20df28103 100644 --- a/src/test/ui/const-generics/coerce_unsized_array.rs +++ b/src/test/ui/const-generics/coerce_unsized_array.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn foo(v: &[u8; N]) -> &[u8] { v diff --git a/src/test/ui/const-generics/concrete-const-as-fn-arg.rs b/src/test/ui/const-generics/concrete-const-as-fn-arg.rs index 7771bf33601..8c31c8651a2 100644 --- a/src/test/ui/const-generics/concrete-const-as-fn-arg.rs +++ b/src/test/ui/const-generics/concrete-const-as-fn-arg.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct A; // ok diff --git a/src/test/ui/const-generics/concrete-const-impl-method.rs b/src/test/ui/const-generics/concrete-const-impl-method.rs index edb403ce8fd..3d3bd2664c8 100644 --- a/src/test/ui/const-generics/concrete-const-impl-method.rs +++ b/src/test/ui/const-generics/concrete-const-impl-method.rs @@ -5,7 +5,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct A; diff --git a/src/test/ui/const-generics/condition-in-trait-const-arg.rs b/src/test/ui/const-generics/condition-in-trait-const-arg.rs index 77b68052fc0..ad40b48afe5 100644 --- a/src/test/ui/const-generics/condition-in-trait-const-arg.rs +++ b/src/test/ui/const-generics/condition-in-trait-const-arg.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait IsZeroTrait{} diff --git a/src/test/ui/const-generics/const-arg-in-const-arg.min.stderr b/src/test/ui/const-generics/const-arg-in-const-arg.min.stderr index 042fa9ad958..bfa4ba30686 100644 --- a/src/test/ui/const-generics/const-arg-in-const-arg.min.stderr +++ b/src/test/ui/const-generics/const-arg-in-const-arg.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/const-arg-in-const-arg.rs:14:23 + --> $DIR/const-arg-in-const-arg.rs:13:23 | LL | let _: [u8; foo::()]; | ^ cannot perform const operation using `T` @@ -8,7 +8,7 @@ LL | let _: [u8; foo::()]; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/const-arg-in-const-arg.rs:15:23 + --> $DIR/const-arg-in-const-arg.rs:14:23 | LL | let _: [u8; bar::()]; | ^ cannot perform const operation using `N` @@ -17,7 +17,7 @@ LL | let _: [u8; bar::()]; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/const-arg-in-const-arg.rs:25:23 + --> $DIR/const-arg-in-const-arg.rs:24:23 | LL | let _ = [0; bar::()]; | ^ cannot perform const operation using `N` @@ -26,7 +26,7 @@ LL | let _ = [0; bar::()]; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/const-arg-in-const-arg.rs:30:24 + --> $DIR/const-arg-in-const-arg.rs:29:24 | LL | let _: Foo<{ foo::() }>; | ^ cannot perform const operation using `T` @@ -35,7 +35,7 @@ LL | let _: Foo<{ foo::() }>; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/const-arg-in-const-arg.rs:31:24 + --> $DIR/const-arg-in-const-arg.rs:30:24 | LL | let _: Foo<{ bar::() }>; | ^ cannot perform const operation using `N` @@ -44,7 +44,7 @@ LL | let _: Foo<{ bar::() }>; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/const-arg-in-const-arg.rs:36:27 + --> $DIR/const-arg-in-const-arg.rs:35:27 | LL | let _ = Foo::<{ foo::() }>; | ^ cannot perform const operation using `T` @@ -53,7 +53,7 @@ LL | let _ = Foo::<{ foo::() }>; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/const-arg-in-const-arg.rs:37:27 + --> $DIR/const-arg-in-const-arg.rs:36:27 | LL | let _ = Foo::<{ bar::() }>; | ^ cannot perform const operation using `N` @@ -62,7 +62,7 @@ LL | let _ = Foo::<{ bar::() }>; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:16:23 + --> $DIR/const-arg-in-const-arg.rs:15:23 | LL | let _: [u8; faz::<'a>(&())]; | ^^ @@ -71,7 +71,7 @@ LL | let _: [u8; faz::<'a>(&())]; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:17:23 + --> $DIR/const-arg-in-const-arg.rs:16:23 | LL | let _: [u8; baz::<'a>(&())]; | ^^ @@ -80,7 +80,7 @@ LL | let _: [u8; baz::<'a>(&())]; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:18:23 + --> $DIR/const-arg-in-const-arg.rs:17:23 | LL | let _: [u8; faz::<'b>(&())]; | ^^ @@ -89,7 +89,7 @@ LL | let _: [u8; faz::<'b>(&())]; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:19:23 + --> $DIR/const-arg-in-const-arg.rs:18:23 | LL | let _: [u8; baz::<'b>(&())]; | ^^ @@ -98,7 +98,7 @@ LL | let _: [u8; baz::<'b>(&())]; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:26:23 + --> $DIR/const-arg-in-const-arg.rs:25:23 | LL | let _ = [0; faz::<'a>(&())]; | ^^ @@ -107,7 +107,7 @@ LL | let _ = [0; faz::<'a>(&())]; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:27:23 + --> $DIR/const-arg-in-const-arg.rs:26:23 | LL | let _ = [0; baz::<'a>(&())]; | ^^ @@ -116,7 +116,7 @@ LL | let _ = [0; baz::<'a>(&())]; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:28:23 + --> $DIR/const-arg-in-const-arg.rs:27:23 | LL | let _ = [0; faz::<'b>(&())]; | ^^ @@ -125,7 +125,7 @@ LL | let _ = [0; faz::<'b>(&())]; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:29:23 + --> $DIR/const-arg-in-const-arg.rs:28:23 | LL | let _ = [0; baz::<'b>(&())]; | ^^ @@ -134,7 +134,7 @@ LL | let _ = [0; baz::<'b>(&())]; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:32:24 + --> $DIR/const-arg-in-const-arg.rs:31:24 | LL | let _: Foo<{ faz::<'a>(&()) }>; | ^^ @@ -143,7 +143,7 @@ LL | let _: Foo<{ faz::<'a>(&()) }>; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:33:24 + --> $DIR/const-arg-in-const-arg.rs:32:24 | LL | let _: Foo<{ baz::<'a>(&()) }>; | ^^ @@ -152,7 +152,7 @@ LL | let _: Foo<{ baz::<'a>(&()) }>; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:34:24 + --> $DIR/const-arg-in-const-arg.rs:33:24 | LL | let _: Foo<{ faz::<'b>(&()) }>; | ^^ @@ -161,7 +161,7 @@ LL | let _: Foo<{ faz::<'b>(&()) }>; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:35:24 + --> $DIR/const-arg-in-const-arg.rs:34:24 | LL | let _: Foo<{ baz::<'b>(&()) }>; | ^^ @@ -170,7 +170,7 @@ LL | let _: Foo<{ baz::<'b>(&()) }>; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:38:27 + --> $DIR/const-arg-in-const-arg.rs:37:27 | LL | let _ = Foo::<{ faz::<'a>(&()) }>; | ^^ @@ -179,7 +179,7 @@ LL | let _ = Foo::<{ faz::<'a>(&()) }>; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:39:27 + --> $DIR/const-arg-in-const-arg.rs:38:27 | LL | let _ = Foo::<{ baz::<'a>(&()) }>; | ^^ @@ -188,7 +188,7 @@ LL | let _ = Foo::<{ baz::<'a>(&()) }>; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:40:27 + --> $DIR/const-arg-in-const-arg.rs:39:27 | LL | let _ = Foo::<{ faz::<'b>(&()) }>; | ^^ @@ -197,7 +197,7 @@ LL | let _ = Foo::<{ faz::<'b>(&()) }>; = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/const-arg-in-const-arg.rs:41:27 + --> $DIR/const-arg-in-const-arg.rs:40:27 | LL | let _ = Foo::<{ baz::<'b>(&()) }>; | ^^ diff --git a/src/test/ui/const-generics/const-arg-in-const-arg.rs b/src/test/ui/const-generics/const-arg-in-const-arg.rs index 9927538ef50..8279f4a3f61 100644 --- a/src/test/ui/const-generics/const-arg-in-const-arg.rs +++ b/src/test/ui/const-generics/const-arg-in-const-arg.rs @@ -2,7 +2,6 @@ // FIXME(const_generics): This test currently causes an ICE because // we don't yet correctly deal with lifetimes, reenable this test once // this is fixed. -#![cfg_attr(min, feature(min_const_generics))] const fn foo() -> usize { std::mem::size_of::() } const fn bar() -> usize { N } diff --git a/src/test/ui/const-generics/const-arg-in-fn.rs b/src/test/ui/const-generics/const-arg-in-fn.rs index 5c438efd82a..43ed12efb89 100644 --- a/src/test/ui/const-generics/const-arg-in-fn.rs +++ b/src/test/ui/const-generics/const-arg-in-fn.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn const_u32_identity() -> u32 { X diff --git a/src/test/ui/const-generics/const-arg-type-arg-misordered.full.stderr b/src/test/ui/const-generics/const-arg-type-arg-misordered.full.stderr index 3827002ff4b..d0ea51ea417 100644 --- a/src/test/ui/const-generics/const-arg-type-arg-misordered.full.stderr +++ b/src/test/ui/const-generics/const-arg-type-arg-misordered.full.stderr @@ -1,5 +1,5 @@ error[E0747]: constant provided when a type was expected - --> $DIR/const-arg-type-arg-misordered.rs:8:35 + --> $DIR/const-arg-type-arg-misordered.rs:7:35 | LL | fn foo() -> Array { | ^ diff --git a/src/test/ui/const-generics/const-arg-type-arg-misordered.min.stderr b/src/test/ui/const-generics/const-arg-type-arg-misordered.min.stderr index 2c5fc8dcc01..d7b7df0eb55 100644 --- a/src/test/ui/const-generics/const-arg-type-arg-misordered.min.stderr +++ b/src/test/ui/const-generics/const-arg-type-arg-misordered.min.stderr @@ -1,5 +1,5 @@ error[E0747]: constant provided when a type was expected - --> $DIR/const-arg-type-arg-misordered.rs:8:35 + --> $DIR/const-arg-type-arg-misordered.rs:7:35 | LL | fn foo() -> Array { | ^ diff --git a/src/test/ui/const-generics/const-arg-type-arg-misordered.rs b/src/test/ui/const-generics/const-arg-type-arg-misordered.rs index 6680f772fa3..5415791d21b 100644 --- a/src/test/ui/const-generics/const-arg-type-arg-misordered.rs +++ b/src/test/ui/const-generics/const-arg-type-arg-misordered.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] type Array = [T; N]; diff --git a/src/test/ui/const-generics/const-argument-if-length.full.stderr b/src/test/ui/const-generics/const-argument-if-length.full.stderr index 4d627f05adc..5dca01f0dc0 100644 --- a/src/test/ui/const-generics/const-argument-if-length.full.stderr +++ b/src/test/ui/const-generics/const-argument-if-length.full.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/const-argument-if-length.rs:8:28 + --> $DIR/const-argument-if-length.rs:7:28 | LL | pub const fn is_zst() -> usize { | - this type parameter needs to be `Sized` @@ -12,7 +12,7 @@ LL | pub const fn size_of() -> usize { | - required by this bound in `std::mem::size_of` error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/const-argument-if-length.rs:17:12 + --> $DIR/const-argument-if-length.rs:16:12 | LL | pub struct AtLeastByte { | - this type parameter needs to be `Sized` diff --git a/src/test/ui/const-generics/const-argument-if-length.min.stderr b/src/test/ui/const-generics/const-argument-if-length.min.stderr index 8a1074392a5..ea177c19746 100644 --- a/src/test/ui/const-generics/const-argument-if-length.min.stderr +++ b/src/test/ui/const-generics/const-argument-if-length.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/const-argument-if-length.rs:19:24 + --> $DIR/const-argument-if-length.rs:18:24 | LL | pad: [u8; is_zst::()], | ^ cannot perform const operation using `T` @@ -8,7 +8,7 @@ LL | pad: [u8; is_zst::()], = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/const-argument-if-length.rs:17:12 + --> $DIR/const-argument-if-length.rs:16:12 | LL | pub struct AtLeastByte { | - this type parameter needs to be `Sized` diff --git a/src/test/ui/const-generics/const-argument-if-length.rs b/src/test/ui/const-generics/const-argument-if-length.rs index 80907383124..67ed85f96af 100644 --- a/src/test/ui/const-generics/const-argument-if-length.rs +++ b/src/test/ui/const-generics/const-argument-if-length.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] pub const fn is_zst() -> usize { if std::mem::size_of::() == 0 { diff --git a/src/test/ui/const-generics/const-expression-parameter.full.stderr b/src/test/ui/const-generics/const-expression-parameter.full.stderr index 0615a4c206d..93c5173554f 100644 --- a/src/test/ui/const-generics/const-expression-parameter.full.stderr +++ b/src/test/ui/const-generics/const-expression-parameter.full.stderr @@ -1,5 +1,5 @@ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/const-expression-parameter.rs:16:20 + --> $DIR/const-expression-parameter.rs:15:20 | LL | i32_identity::<1 + 2>(); | ^^^^^ diff --git a/src/test/ui/const-generics/const-expression-parameter.min.stderr b/src/test/ui/const-generics/const-expression-parameter.min.stderr index 0615a4c206d..93c5173554f 100644 --- a/src/test/ui/const-generics/const-expression-parameter.min.stderr +++ b/src/test/ui/const-generics/const-expression-parameter.min.stderr @@ -1,5 +1,5 @@ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/const-expression-parameter.rs:16:20 + --> $DIR/const-expression-parameter.rs:15:20 | LL | i32_identity::<1 + 2>(); | ^^^^^ diff --git a/src/test/ui/const-generics/const-expression-parameter.rs b/src/test/ui/const-generics/const-expression-parameter.rs index 3ef7c8b32e0..cb609a56416 100644 --- a/src/test/ui/const-generics/const-expression-parameter.rs +++ b/src/test/ui/const-generics/const-expression-parameter.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn i32_identity() -> i32 { 5 diff --git a/src/test/ui/const-generics/const-fn-with-const-param.rs b/src/test/ui/const-generics/const-fn-with-const-param.rs index add1290b1d9..5c1ee4e0d5a 100644 --- a/src/test/ui/const-generics/const-fn-with-const-param.rs +++ b/src/test/ui/const-generics/const-fn-with-const-param.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] const fn const_u32_identity() -> u32 { X diff --git a/src/test/ui/const-generics/const-generic-array-wrapper.rs b/src/test/ui/const-generics/const-generic-array-wrapper.rs index 34edd0b4a8e..224fc794e32 100644 --- a/src/test/ui/const-generics/const-generic-array-wrapper.rs +++ b/src/test/ui/const-generics/const-generic-array-wrapper.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo([T; N]); diff --git a/src/test/ui/const-generics/const-generic-type_name.rs b/src/test/ui/const-generics/const-generic-type_name.rs index a954c026352..95632f79896 100644 --- a/src/test/ui/const-generics/const-generic-type_name.rs +++ b/src/test/ui/const-generics/const-generic-type_name.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #[derive(Debug)] struct S; diff --git a/src/test/ui/const-generics/const-param-after-const-literal-arg.rs b/src/test/ui/const-generics/const-param-after-const-literal-arg.rs index 3982f7a7f12..6c2b14f2770 100644 --- a/src/test/ui/const-generics/const-param-after-const-literal-arg.rs +++ b/src/test/ui/const-generics/const-param-after-const-literal-arg.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo; diff --git a/src/test/ui/const-generics/const-param-before-other-params.full.stderr b/src/test/ui/const-generics/const-param-before-other-params.full.stderr index c2acaabbd88..09a4f66de39 100644 --- a/src/test/ui/const-generics/const-param-before-other-params.full.stderr +++ b/src/test/ui/const-generics/const-param-before-other-params.full.stderr @@ -1,5 +1,5 @@ error: lifetime parameters must be declared prior to const parameters - --> $DIR/const-param-before-other-params.rs:6:21 + --> $DIR/const-param-before-other-params.rs:5:21 | LL | fn bar(_: &'a ()) { | --------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const X: ()>` diff --git a/src/test/ui/const-generics/const-param-before-other-params.min.stderr b/src/test/ui/const-generics/const-param-before-other-params.min.stderr index 354c6d0615f..1e49588f1b4 100644 --- a/src/test/ui/const-generics/const-param-before-other-params.min.stderr +++ b/src/test/ui/const-generics/const-param-before-other-params.min.stderr @@ -1,17 +1,17 @@ error: lifetime parameters must be declared prior to const parameters - --> $DIR/const-param-before-other-params.rs:6:21 + --> $DIR/const-param-before-other-params.rs:5:21 | LL | fn bar(_: &'a ()) { | --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>` error: type parameters must be declared prior to const parameters - --> $DIR/const-param-before-other-params.rs:11:21 + --> $DIR/const-param-before-other-params.rs:10:21 | LL | fn foo(_: &T) {} | --------------^- help: reorder the parameters: lifetimes, then types, then consts: `` error: `()` is forbidden as the type of a const generic parameter - --> $DIR/const-param-before-other-params.rs:6:17 + --> $DIR/const-param-before-other-params.rs:5:17 | LL | fn bar(_: &'a ()) { | ^^ @@ -20,7 +20,7 @@ LL | fn bar(_: &'a ()) { = help: more complex types are supported with `#[feature(const_generics)]` error: `()` is forbidden as the type of a const generic parameter - --> $DIR/const-param-before-other-params.rs:11:17 + --> $DIR/const-param-before-other-params.rs:10:17 | LL | fn foo(_: &T) {} | ^^ diff --git a/src/test/ui/const-generics/const-param-before-other-params.rs b/src/test/ui/const-generics/const-param-before-other-params.rs index f1be90cf2e4..508bb3e6a68 100644 --- a/src/test/ui/const-generics/const-param-before-other-params.rs +++ b/src/test/ui/const-generics/const-param-before-other-params.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn bar(_: &'a ()) { //~^ ERROR lifetime parameters must be declared prior to const parameters diff --git a/src/test/ui/const-generics/const-param-elided-lifetime.full.stderr b/src/test/ui/const-generics/const-param-elided-lifetime.full.stderr index aa29d61d917..119f932745b 100644 --- a/src/test/ui/const-generics/const-param-elided-lifetime.full.stderr +++ b/src/test/ui/const-generics/const-param-elided-lifetime.full.stderr @@ -1,29 +1,29 @@ error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:11:19 + --> $DIR/const-param-elided-lifetime.rs:10:19 | LL | struct A; | ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:16:15 + --> $DIR/const-param-elided-lifetime.rs:15:15 | LL | impl A { | ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:19:21 + --> $DIR/const-param-elided-lifetime.rs:18:21 | LL | fn foo(&self) {} | ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:24:15 + --> $DIR/const-param-elided-lifetime.rs:23:15 | LL | impl B for A {} | ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:28:17 + --> $DIR/const-param-elided-lifetime.rs:27:17 | LL | fn bar() {} | ^ explicit lifetime name needed here diff --git a/src/test/ui/const-generics/const-param-elided-lifetime.min.stderr b/src/test/ui/const-generics/const-param-elided-lifetime.min.stderr index ed30182690a..5d3c8f7b2e6 100644 --- a/src/test/ui/const-generics/const-param-elided-lifetime.min.stderr +++ b/src/test/ui/const-generics/const-param-elided-lifetime.min.stderr @@ -1,35 +1,35 @@ error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:11:19 + --> $DIR/const-param-elided-lifetime.rs:10:19 | LL | struct A; | ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:16:15 + --> $DIR/const-param-elided-lifetime.rs:15:15 | LL | impl A { | ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:19:21 + --> $DIR/const-param-elided-lifetime.rs:18:21 | LL | fn foo(&self) {} | ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:24:15 + --> $DIR/const-param-elided-lifetime.rs:23:15 | LL | impl B for A {} | ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/const-param-elided-lifetime.rs:28:17 + --> $DIR/const-param-elided-lifetime.rs:27:17 | LL | fn bar() {} | ^ explicit lifetime name needed here error: `&'static u8` is forbidden as the type of a const generic parameter - --> $DIR/const-param-elided-lifetime.rs:11:19 + --> $DIR/const-param-elided-lifetime.rs:10:19 | LL | struct A; | ^^^ @@ -38,7 +38,7 @@ LL | struct A; = help: more complex types are supported with `#[feature(const_generics)]` error: `&'static u8` is forbidden as the type of a const generic parameter - --> $DIR/const-param-elided-lifetime.rs:16:15 + --> $DIR/const-param-elided-lifetime.rs:15:15 | LL | impl A { | ^^^ @@ -47,7 +47,7 @@ LL | impl A { = help: more complex types are supported with `#[feature(const_generics)]` error: `&'static u8` is forbidden as the type of a const generic parameter - --> $DIR/const-param-elided-lifetime.rs:24:15 + --> $DIR/const-param-elided-lifetime.rs:23:15 | LL | impl B for A {} | ^^^ @@ -56,7 +56,7 @@ LL | impl B for A {} = help: more complex types are supported with `#[feature(const_generics)]` error: `&'static u8` is forbidden as the type of a const generic parameter - --> $DIR/const-param-elided-lifetime.rs:28:17 + --> $DIR/const-param-elided-lifetime.rs:27:17 | LL | fn bar() {} | ^^^ @@ -65,7 +65,7 @@ LL | fn bar() {} = help: more complex types are supported with `#[feature(const_generics)]` error: `&'static u8` is forbidden as the type of a const generic parameter - --> $DIR/const-param-elided-lifetime.rs:19:21 + --> $DIR/const-param-elided-lifetime.rs:18:21 | LL | fn foo(&self) {} | ^^^ diff --git a/src/test/ui/const-generics/const-param-elided-lifetime.rs b/src/test/ui/const-generics/const-param-elided-lifetime.rs index 633e876f1d7..89715a7b8e9 100644 --- a/src/test/ui/const-generics/const-param-elided-lifetime.rs +++ b/src/test/ui/const-generics/const-param-elided-lifetime.rs @@ -6,7 +6,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct A; //~^ ERROR `&` without an explicit lifetime name cannot be used here diff --git a/src/test/ui/const-generics/const-param-from-outer-fn.full.stderr b/src/test/ui/const-generics/const-param-from-outer-fn.full.stderr index 5a126f5c3c6..c2ec7359c9f 100644 --- a/src/test/ui/const-generics/const-param-from-outer-fn.full.stderr +++ b/src/test/ui/const-generics/const-param-from-outer-fn.full.stderr @@ -1,5 +1,5 @@ error[E0401]: can't use generic parameters from outer function - --> $DIR/const-param-from-outer-fn.rs:9:9 + --> $DIR/const-param-from-outer-fn.rs:8:9 | LL | fn foo() { | - const parameter from outer function diff --git a/src/test/ui/const-generics/const-param-from-outer-fn.min.stderr b/src/test/ui/const-generics/const-param-from-outer-fn.min.stderr index 5a126f5c3c6..c2ec7359c9f 100644 --- a/src/test/ui/const-generics/const-param-from-outer-fn.min.stderr +++ b/src/test/ui/const-generics/const-param-from-outer-fn.min.stderr @@ -1,5 +1,5 @@ error[E0401]: can't use generic parameters from outer function - --> $DIR/const-param-from-outer-fn.rs:9:9 + --> $DIR/const-param-from-outer-fn.rs:8:9 | LL | fn foo() { | - const parameter from outer function diff --git a/src/test/ui/const-generics/const-param-from-outer-fn.rs b/src/test/ui/const-generics/const-param-from-outer-fn.rs index e1376c6e108..27b9ca9c291 100644 --- a/src/test/ui/const-generics/const-param-from-outer-fn.rs +++ b/src/test/ui/const-generics/const-param-from-outer-fn.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn foo() { fn bar() -> u32 { diff --git a/src/test/ui/const-generics/const-param-hygiene.rs b/src/test/ui/const-generics/const-param-hygiene.rs index c8cefc36732..9cafb05fbcb 100644 --- a/src/test/ui/const-generics/const-param-hygiene.rs +++ b/src/test/ui/const-generics/const-param-hygiene.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] macro_rules! bar { ($($t:tt)*) => { impl $($t)* }; diff --git a/src/test/ui/const-generics/const-param-in-async.rs b/src/test/ui/const-generics/const-param-in-async.rs index e8601985287..9dc9c80241d 100644 --- a/src/test/ui/const-generics/const-param-in-async.rs +++ b/src/test/ui/const-generics/const-param-in-async.rs @@ -3,7 +3,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] async fn foo(arg: [u8; N]) -> usize { arg.len() } diff --git a/src/test/ui/const-generics/const-param-in-trait.rs b/src/test/ui/const-generics/const-param-in-trait.rs index 9d31162c1c6..79b3ae2037e 100644 --- a/src/test/ui/const-generics/const-param-in-trait.rs +++ b/src/test/ui/const-generics/const-param-in-trait.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Trait {} diff --git a/src/test/ui/const-generics/const-param-shadowing.rs b/src/test/ui/const-generics/const-param-shadowing.rs index 8440e47968e..ddd15dbc41b 100644 --- a/src/test/ui/const-generics/const-param-shadowing.rs +++ b/src/test/ui/const-generics/const-param-shadowing.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - type N = u32; struct Foo; fn test() -> Foo { //~ ERROR type provided when diff --git a/src/test/ui/const-generics/const-param-shadowing.stderr b/src/test/ui/const-generics/const-param-shadowing.stderr index df170278026..7447ca3ff36 100644 --- a/src/test/ui/const-generics/const-param-shadowing.stderr +++ b/src/test/ui/const-generics/const-param-shadowing.stderr @@ -1,5 +1,5 @@ error[E0747]: type provided when a constant was expected - --> $DIR/const-param-shadowing.rs:5:34 + --> $DIR/const-param-shadowing.rs:3:34 | LL | fn test() -> Foo { | ^ diff --git a/src/test/ui/const-generics/const-param-type-depends-on-const-param.full.stderr b/src/test/ui/const-generics/const-param-type-depends-on-const-param.full.stderr index f7ad579dbca..f639e276f46 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-const-param.full.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-const-param.full.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/const-param-type-depends-on-const-param.rs:12:52 + --> $DIR/const-param-type-depends-on-const-param.rs:11:52 | LL | pub struct Dependent([(); N]); | ^ the type must not depend on the parameter `N` error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/const-param-type-depends-on-const-param.rs:16:40 + --> $DIR/const-param-type-depends-on-const-param.rs:15:40 | LL | pub struct SelfDependent; | ^ the type must not depend on the parameter `N` diff --git a/src/test/ui/const-generics/const-param-type-depends-on-const-param.min.stderr b/src/test/ui/const-generics/const-param-type-depends-on-const-param.min.stderr index 6b7a218ada5..d63bc236320 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-const-param.min.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-const-param.min.stderr @@ -1,17 +1,17 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/const-param-type-depends-on-const-param.rs:12:52 + --> $DIR/const-param-type-depends-on-const-param.rs:11:52 | LL | pub struct Dependent([(); N]); | ^ the type must not depend on the parameter `N` error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/const-param-type-depends-on-const-param.rs:16:40 + --> $DIR/const-param-type-depends-on-const-param.rs:15:40 | LL | pub struct SelfDependent; | ^ the type must not depend on the parameter `N` error: `[u8; _]` is forbidden as the type of a const generic parameter - --> $DIR/const-param-type-depends-on-const-param.rs:12:47 + --> $DIR/const-param-type-depends-on-const-param.rs:11:47 | LL | pub struct Dependent([(); N]); | ^^^^^^^ @@ -20,7 +20,7 @@ LL | pub struct Dependent([(); N]); = help: more complex types are supported with `#[feature(const_generics)]` error: `[u8; _]` is forbidden as the type of a const generic parameter - --> $DIR/const-param-type-depends-on-const-param.rs:16:35 + --> $DIR/const-param-type-depends-on-const-param.rs:15:35 | LL | pub struct SelfDependent; | ^^^^^^^ diff --git a/src/test/ui/const-generics/const-param-type-depends-on-const-param.rs b/src/test/ui/const-generics/const-param-type-depends-on-const-param.rs index 29371eeb21d..62b146e016a 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-const-param.rs +++ b/src/test/ui/const-generics/const-param-type-depends-on-const-param.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] // Currently, const parameters cannot depend on other generic parameters, // as our current implementation can't really support this. diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs index ea75a3d0403..781f50e6173 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs @@ -3,7 +3,7 @@ use std::marker::PhantomData; -struct B(PhantomData<[T; N]>); //~ ERROR const generics are unstable +struct B(PhantomData<[T; N]>); //~^ ERROR the type of const parameters must not depend on other generic parameters fn main() {} diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr index 5d379ff083c..8e14defd65d 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr @@ -4,16 +4,6 @@ error[E0770]: the type of const parameters must not depend on other generic para LL | struct B(PhantomData<[T; N]>); | ^ the type must not depend on the parameter `T` -error[E0658]: const generics are unstable - --> $DIR/const-param-type-depends-on-type-param-ungated.rs:6:19 - | -LL | struct B(PhantomData<[T; N]>); - | ^ - | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable +error: aborting due to previous error -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0658, E0770. -For more information about an error, try `rustc --explain E0658`. +For more information about this error, try `rustc --explain E0770`. diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr index f860788e778..a83ee627187 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/const-param-type-depends-on-type-param.rs:12:34 + --> $DIR/const-param-type-depends-on-type-param.rs:11:34 | LL | pub struct Dependent([(); X]); | ^ the type must not depend on the parameter `T` error[E0392]: parameter `T` is never used - --> $DIR/const-param-type-depends-on-type-param.rs:12:22 + --> $DIR/const-param-type-depends-on-type-param.rs:11:22 | LL | pub struct Dependent([(); X]); | ^ unused parameter diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.min.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.min.stderr index f860788e778..a83ee627187 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.min.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.min.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/const-param-type-depends-on-type-param.rs:12:34 + --> $DIR/const-param-type-depends-on-type-param.rs:11:34 | LL | pub struct Dependent([(); X]); | ^ the type must not depend on the parameter `T` error[E0392]: parameter `T` is never used - --> $DIR/const-param-type-depends-on-type-param.rs:12:22 + --> $DIR/const-param-type-depends-on-type-param.rs:11:22 | LL | pub struct Dependent([(); X]); | ^ unused parameter diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.rs b/src/test/ui/const-generics/const-param-type-depends-on-type-param.rs index 93ae1117512..910a9643502 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.rs +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] // Currently, const parameters cannot depend on other generic parameters, // as our current implementation can't really support this. diff --git a/src/test/ui/const-generics/const-parameter-uppercase-lint.full.stderr b/src/test/ui/const-generics/const-parameter-uppercase-lint.full.stderr index 0f4f007f9d2..923964a4070 100644 --- a/src/test/ui/const-generics/const-parameter-uppercase-lint.full.stderr +++ b/src/test/ui/const-generics/const-parameter-uppercase-lint.full.stderr @@ -1,11 +1,11 @@ error: const parameter `x` should have an upper case name - --> $DIR/const-parameter-uppercase-lint.rs:9:15 + --> $DIR/const-parameter-uppercase-lint.rs:8:15 | LL | fn noop() { | ^ help: convert the identifier to upper case (notice the capitalization): `X` | note: the lint level is defined here - --> $DIR/const-parameter-uppercase-lint.rs:7:9 + --> $DIR/const-parameter-uppercase-lint.rs:6:9 | LL | #![deny(non_upper_case_globals)] | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/const-parameter-uppercase-lint.min.stderr b/src/test/ui/const-generics/const-parameter-uppercase-lint.min.stderr index 0f4f007f9d2..923964a4070 100644 --- a/src/test/ui/const-generics/const-parameter-uppercase-lint.min.stderr +++ b/src/test/ui/const-generics/const-parameter-uppercase-lint.min.stderr @@ -1,11 +1,11 @@ error: const parameter `x` should have an upper case name - --> $DIR/const-parameter-uppercase-lint.rs:9:15 + --> $DIR/const-parameter-uppercase-lint.rs:8:15 | LL | fn noop() { | ^ help: convert the identifier to upper case (notice the capitalization): `X` | note: the lint level is defined here - --> $DIR/const-parameter-uppercase-lint.rs:7:9 + --> $DIR/const-parameter-uppercase-lint.rs:6:9 | LL | #![deny(non_upper_case_globals)] | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/const-parameter-uppercase-lint.rs b/src/test/ui/const-generics/const-parameter-uppercase-lint.rs index b9bd6666af3..5d97907c2e7 100644 --- a/src/test/ui/const-generics/const-parameter-uppercase-lint.rs +++ b/src/test/ui/const-generics/const-parameter-uppercase-lint.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![deny(non_upper_case_globals)] diff --git a/src/test/ui/const-generics/const-types.rs b/src/test/ui/const-generics/const-types.rs index cd34cfc0478..fb150f892ed 100644 --- a/src/test/ui/const-generics/const-types.rs +++ b/src/test/ui/const-generics/const-types.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![allow(dead_code, unused_variables)] diff --git a/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.full.stderr b/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.full.stderr index b2816367ea1..d6a54ead131 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.full.stderr +++ b/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/feature-gate-const_evaluatable_checked.rs:9:30 + --> $DIR/feature-gate-const_evaluatable_checked.rs:8:30 | LL | fn test() -> Arr where Arr: Default { | ^^^^^^ diff --git a/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.min.stderr b/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.min.stderr index 573bc66b7c7..7de4bfcdd05 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.min.stderr +++ b/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/feature-gate-const_evaluatable_checked.rs:6:33 + --> $DIR/feature-gate-const_evaluatable_checked.rs:5:33 | LL | type Arr = [u8; N - 1]; | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.rs b/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.rs index 9746adab29b..f49ca0251aa 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.rs +++ b/src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] type Arr = [u8; N - 1]; //[min]~^ ERROR generic parameters may not be used in const operations diff --git a/src/test/ui/const-generics/const_evaluatable_checked/simple.min.stderr b/src/test/ui/const-generics/const_evaluatable_checked/simple.min.stderr index d476a7eb645..9f3d94bbd8a 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/simple.min.stderr +++ b/src/test/ui/const-generics/const_evaluatable_checked/simple.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/simple.rs:8:53 + --> $DIR/simple.rs:7:53 | LL | fn test() -> [u8; N - 1] where [u8; N - 1]: Default { | ^ cannot perform const operation using `N` @@ -8,7 +8,7 @@ LL | fn test() -> [u8; N - 1] where [u8; N - 1]: Default { = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/simple.rs:8:35 + --> $DIR/simple.rs:7:35 | LL | fn test() -> [u8; N - 1] where [u8; N - 1]: Default { | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/const_evaluatable_checked/simple.rs b/src/test/ui/const-generics/const_evaluatable_checked/simple.rs index dcf0071cb29..94ad71b6c1a 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/simple.rs +++ b/src/test/ui/const-generics/const_evaluatable_checked/simple.rs @@ -1,7 +1,6 @@ // [full] run-pass // revisions: full min #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] #![feature(const_evaluatable_checked)] #![allow(incomplete_features)] diff --git a/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.full.stderr b/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.full.stderr index f95d6d2d570..c8549f101da 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.full.stderr +++ b/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.full.stderr @@ -1,5 +1,5 @@ error[E0080]: evaluation of constant value failed - --> $DIR/simple_fail.rs:7:33 + --> $DIR/simple_fail.rs:6:33 | LL | type Arr = [u8; N - 1]; | ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow diff --git a/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.min.stderr b/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.min.stderr index bd81e0bc5a8..df54b4cbca5 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.min.stderr +++ b/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/simple_fail.rs:7:33 + --> $DIR/simple_fail.rs:6:33 | LL | type Arr = [u8; N - 1]; | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.rs b/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.rs index 5e2c080927f..3cbc077f4f1 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.rs +++ b/src/test/ui/const-generics/const_evaluatable_checked/simple_fail.rs @@ -1,6 +1,5 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] #![feature(const_evaluatable_checked)] #![allow(incomplete_features)] diff --git a/src/test/ui/const-generics/core-types.rs b/src/test/ui/const-generics/core-types.rs index c4351e059de..b6fa478f48d 100644 --- a/src/test/ui/const-generics/core-types.rs +++ b/src/test/ui/const-generics/core-types.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct A; struct B; diff --git a/src/test/ui/const-generics/cross_crate_complex.rs b/src/test/ui/const-generics/cross_crate_complex.rs index 30749b8bc6d..1d495c9562d 100644 --- a/src/test/ui/const-generics/cross_crate_complex.rs +++ b/src/test/ui/const-generics/cross_crate_complex.rs @@ -5,7 +5,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] extern crate crayte; use crayte::*; diff --git a/src/test/ui/const-generics/defaults/complex-unord-param.min.stderr b/src/test/ui/const-generics/defaults/complex-unord-param.min.stderr index 0574ddfb255..cec56d7038a 100644 --- a/src/test/ui/const-generics/defaults/complex-unord-param.min.stderr +++ b/src/test/ui/const-generics/defaults/complex-unord-param.min.stderr @@ -1,5 +1,5 @@ error: type parameters must be declared prior to const parameters - --> $DIR/complex-unord-param.rs:9:41 + --> $DIR/complex-unord-param.rs:8:41 | LL | struct NestedArrays<'a, const N: usize, A: 'a, const M: usize, T:'a =u32> { | ---------------------^----------------------^--------- help: reorder the parameters: lifetimes, then types, then consts: `<'a, A: 'a, T: 'a, const N: usize, const M: usize>` diff --git a/src/test/ui/const-generics/defaults/complex-unord-param.rs b/src/test/ui/const-generics/defaults/complex-unord-param.rs index e83a96388c1..82b3627d22f 100644 --- a/src/test/ui/const-generics/defaults/complex-unord-param.rs +++ b/src/test/ui/const-generics/defaults/complex-unord-param.rs @@ -3,7 +3,6 @@ // Checks a complicated usage of unordered params #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![allow(dead_code)] struct NestedArrays<'a, const N: usize, A: 'a, const M: usize, T:'a =u32> { diff --git a/src/test/ui/const-generics/defaults/intermixed-lifetime.full.stderr b/src/test/ui/const-generics/defaults/intermixed-lifetime.full.stderr index 9cc3e9c0da6..98352addaef 100644 --- a/src/test/ui/const-generics/defaults/intermixed-lifetime.full.stderr +++ b/src/test/ui/const-generics/defaults/intermixed-lifetime.full.stderr @@ -1,11 +1,11 @@ error: lifetime parameters must be declared prior to const parameters - --> $DIR/intermixed-lifetime.rs:7:28 + --> $DIR/intermixed-lifetime.rs:6:28 | LL | struct Foo(&'a (), T); | -----------------^^---------- help: reorder the parameters: lifetimes, then consts and types: `<'a, const N: usize, T>` error: lifetime parameters must be declared prior to type parameters - --> $DIR/intermixed-lifetime.rs:11:37 + --> $DIR/intermixed-lifetime.rs:10:37 | LL | struct Bar(&'a (), T); | --------------------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const N: usize, T>` diff --git a/src/test/ui/const-generics/defaults/intermixed-lifetime.min.stderr b/src/test/ui/const-generics/defaults/intermixed-lifetime.min.stderr index 4d80fdb5bcb..532f6d700b2 100644 --- a/src/test/ui/const-generics/defaults/intermixed-lifetime.min.stderr +++ b/src/test/ui/const-generics/defaults/intermixed-lifetime.min.stderr @@ -1,23 +1,23 @@ error: lifetime parameters must be declared prior to const parameters - --> $DIR/intermixed-lifetime.rs:7:28 + --> $DIR/intermixed-lifetime.rs:6:28 | LL | struct Foo(&'a (), T); | -----------------^^---------- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, const N: usize>` error: type parameters must be declared prior to const parameters - --> $DIR/intermixed-lifetime.rs:7:32 + --> $DIR/intermixed-lifetime.rs:6:32 | LL | struct Foo(&'a (), T); | ---------------------^------- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, const N: usize>` error: lifetime parameters must be declared prior to const parameters - --> $DIR/intermixed-lifetime.rs:11:37 + --> $DIR/intermixed-lifetime.rs:10:37 | LL | struct Bar(&'a (), T); | --------------------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, const N: usize>` error: type parameters must be declared prior to const parameters - --> $DIR/intermixed-lifetime.rs:11:28 + --> $DIR/intermixed-lifetime.rs:10:28 | LL | struct Bar(&'a (), T); | -----------------^----------- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, const N: usize>` diff --git a/src/test/ui/const-generics/defaults/intermixed-lifetime.rs b/src/test/ui/const-generics/defaults/intermixed-lifetime.rs index cc0d1c6c0c9..9e83bf92a59 100644 --- a/src/test/ui/const-generics/defaults/intermixed-lifetime.rs +++ b/src/test/ui/const-generics/defaults/intermixed-lifetime.rs @@ -2,7 +2,6 @@ // Checks that lifetimes cannot be interspersed between consts and types. #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo(&'a (), T); //~^ Error lifetime parameters must be declared prior to const parameters diff --git a/src/test/ui/const-generics/defaults/needs-feature.min.stderr b/src/test/ui/const-generics/defaults/needs-feature.min.stderr index 7058327fdce..86d6173fa02 100644 --- a/src/test/ui/const-generics/defaults/needs-feature.min.stderr +++ b/src/test/ui/const-generics/defaults/needs-feature.min.stderr @@ -1,5 +1,5 @@ error: type parameters must be declared prior to const parameters - --> $DIR/needs-feature.rs:10:26 + --> $DIR/needs-feature.rs:9:26 | LL | struct A(T); | -----------------^----- help: reorder the parameters: lifetimes, then types, then consts: `` diff --git a/src/test/ui/const-generics/defaults/needs-feature.none.stderr b/src/test/ui/const-generics/defaults/needs-feature.none.stderr index 3b6f63a8efe..86d6173fa02 100644 --- a/src/test/ui/const-generics/defaults/needs-feature.none.stderr +++ b/src/test/ui/const-generics/defaults/needs-feature.none.stderr @@ -1,18 +1,8 @@ error: type parameters must be declared prior to const parameters - --> $DIR/needs-feature.rs:10:26 + --> $DIR/needs-feature.rs:9:26 | LL | struct A(T); - | -----------------^----- help: reorder the parameters: lifetimes, then types: `` + | -----------------^----- help: reorder the parameters: lifetimes, then types, then consts: `` -error[E0658]: const generics are unstable - --> $DIR/needs-feature.rs:10:16 - | -LL | struct A(T); - | ^ - | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable +error: aborting due to previous error -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/const-generics/defaults/needs-feature.rs b/src/test/ui/const-generics/defaults/needs-feature.rs index ec02dbf407d..7eb7764a644 100644 --- a/src/test/ui/const-generics/defaults/needs-feature.rs +++ b/src/test/ui/const-generics/defaults/needs-feature.rs @@ -1,16 +1,13 @@ //[full] run-pass // Verifies that having generic parameters after constants is not permitted without the // `const_generics` feature. -// revisions: none min full +// revisions: min full #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct A(T); -//[none]~^ ERROR type parameters must be declared prior -//[none]~| ERROR const generics are unstable -//[min]~^^^ ERROR type parameters must be declared prior +//[min]~^ ERROR type parameters must be declared prior fn main() { let _: A<3> = A(0); diff --git a/src/test/ui/const-generics/defaults/simple-defaults.min.stderr b/src/test/ui/const-generics/defaults/simple-defaults.min.stderr index 59cc6f28af8..01fb4210dd6 100644 --- a/src/test/ui/const-generics/defaults/simple-defaults.min.stderr +++ b/src/test/ui/const-generics/defaults/simple-defaults.min.stderr @@ -1,5 +1,5 @@ error: type parameters must be declared prior to const parameters - --> $DIR/simple-defaults.rs:9:40 + --> $DIR/simple-defaults.rs:8:40 | LL | struct FixedOutput<'a, const N: usize, T=u32> { | ---------------------^----- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, const N: usize>` diff --git a/src/test/ui/const-generics/defaults/simple-defaults.rs b/src/test/ui/const-generics/defaults/simple-defaults.rs index 78abe351998..1f1b6c2260d 100644 --- a/src/test/ui/const-generics/defaults/simple-defaults.rs +++ b/src/test/ui/const-generics/defaults/simple-defaults.rs @@ -3,7 +3,6 @@ // Checks some basic test cases for defaults. #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![allow(dead_code)] struct FixedOutput<'a, const N: usize, T=u32> { diff --git a/src/test/ui/const-generics/defaults/wrong-order.full.stderr b/src/test/ui/const-generics/defaults/wrong-order.full.stderr index 99f46309bf6..96deb4a8b5a 100644 --- a/src/test/ui/const-generics/defaults/wrong-order.full.stderr +++ b/src/test/ui/const-generics/defaults/wrong-order.full.stderr @@ -1,5 +1,5 @@ error: type parameters with a default must be trailing - --> $DIR/wrong-order.rs:5:10 + --> $DIR/wrong-order.rs:4:10 | LL | struct A { | ^ @@ -14,7 +14,6 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/const-generics/defaults/wrong-order.min.stderr b/src/test/ui/const-generics/defaults/wrong-order.min.stderr index 29a46367004..b19da76f415 100644 --- a/src/test/ui/const-generics/defaults/wrong-order.min.stderr +++ b/src/test/ui/const-generics/defaults/wrong-order.min.stderr @@ -1,5 +1,5 @@ error: type parameters with a default must be trailing - --> $DIR/wrong-order.rs:5:10 + --> $DIR/wrong-order.rs:4:10 | LL | struct A { | ^ diff --git a/src/test/ui/const-generics/defaults/wrong-order.rs b/src/test/ui/const-generics/defaults/wrong-order.rs index cb36d456f38..4f1c05011b0 100644 --- a/src/test/ui/const-generics/defaults/wrong-order.rs +++ b/src/test/ui/const-generics/defaults/wrong-order.rs @@ -1,6 +1,5 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] struct A { //~^ ERROR type parameters with a default must be trailing diff --git a/src/test/ui/const-generics/derive-debug-array-wrapper.rs b/src/test/ui/const-generics/derive-debug-array-wrapper.rs index 13fd87f1e3e..ce1481d97e9 100644 --- a/src/test/ui/const-generics/derive-debug-array-wrapper.rs +++ b/src/test/ui/const-generics/derive-debug-array-wrapper.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #[derive(Debug)] struct X { diff --git a/src/test/ui/const-generics/different_byref.full.stderr b/src/test/ui/const-generics/different_byref.full.stderr index 4463ed7fcdd..d6b32323e2d 100644 --- a/src/test/ui/const-generics/different_byref.full.stderr +++ b/src/test/ui/const-generics/different_byref.full.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/different_byref.rs:13:9 + --> $DIR/different_byref.rs:12:9 | LL | x = Const::<{ [4] }> {}; | ^^^^^^^^^^^^^^^^^^^ expected `3_usize`, found `4_usize` diff --git a/src/test/ui/const-generics/different_byref.min.stderr b/src/test/ui/const-generics/different_byref.min.stderr index e5b393ffe99..05720d15404 100644 --- a/src/test/ui/const-generics/different_byref.min.stderr +++ b/src/test/ui/const-generics/different_byref.min.stderr @@ -1,5 +1,5 @@ error: `[usize; 1]` is forbidden as the type of a const generic parameter - --> $DIR/different_byref.rs:8:23 + --> $DIR/different_byref.rs:7:23 | LL | struct Const {} | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/different_byref.rs b/src/test/ui/const-generics/different_byref.rs index cd3960eeb8e..7977560ecbc 100644 --- a/src/test/ui/const-generics/different_byref.rs +++ b/src/test/ui/const-generics/different_byref.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Const {} //[min]~^ ERROR `[usize; 1]` is forbidden diff --git a/src/test/ui/const-generics/different_byref_simple.full.stderr b/src/test/ui/const-generics/different_byref_simple.full.stderr index b6729c852ab..027e282c398 100644 --- a/src/test/ui/const-generics/different_byref_simple.full.stderr +++ b/src/test/ui/const-generics/different_byref_simple.full.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/different_byref_simple.rs:12:9 + --> $DIR/different_byref_simple.rs:11:9 | LL | u = ConstUsize::<4> {}; | ^^^^^^^^^^^^^^^^^^ expected `3_usize`, found `4_usize` diff --git a/src/test/ui/const-generics/different_byref_simple.min.stderr b/src/test/ui/const-generics/different_byref_simple.min.stderr index b6729c852ab..027e282c398 100644 --- a/src/test/ui/const-generics/different_byref_simple.min.stderr +++ b/src/test/ui/const-generics/different_byref_simple.min.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/different_byref_simple.rs:12:9 + --> $DIR/different_byref_simple.rs:11:9 | LL | u = ConstUsize::<4> {}; | ^^^^^^^^^^^^^^^^^^ expected `3_usize`, found `4_usize` diff --git a/src/test/ui/const-generics/different_byref_simple.rs b/src/test/ui/const-generics/different_byref_simple.rs index 93289f93331..b48189fc2cb 100644 --- a/src/test/ui/const-generics/different_byref_simple.rs +++ b/src/test/ui/const-generics/different_byref_simple.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct ConstUsize {} diff --git a/src/test/ui/const-generics/dyn-supertraits.rs b/src/test/ui/const-generics/dyn-supertraits.rs index 0295255d809..73ed23521c3 100644 --- a/src/test/ui/const-generics/dyn-supertraits.rs +++ b/src/test/ui/const-generics/dyn-supertraits.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Foo { fn myfun(&self) -> usize; diff --git a/src/test/ui/const-generics/exhaustive-value.full.stderr b/src/test/ui/const-generics/exhaustive-value.full.stderr index fdea1fb0c3e..e0e1423ba01 100644 --- a/src/test/ui/const-generics/exhaustive-value.full.stderr +++ b/src/test/ui/const-generics/exhaustive-value.full.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `(): Foo` is not satisfied - --> $DIR/exhaustive-value.rs:267:5 + --> $DIR/exhaustive-value.rs:266:5 | LL | fn test() {} | --------- required by `Foo::test` diff --git a/src/test/ui/const-generics/exhaustive-value.min.stderr b/src/test/ui/const-generics/exhaustive-value.min.stderr index fdea1fb0c3e..e0e1423ba01 100644 --- a/src/test/ui/const-generics/exhaustive-value.min.stderr +++ b/src/test/ui/const-generics/exhaustive-value.min.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `(): Foo` is not satisfied - --> $DIR/exhaustive-value.rs:267:5 + --> $DIR/exhaustive-value.rs:266:5 | LL | fn test() {} | --------- required by `Foo::test` diff --git a/src/test/ui/const-generics/exhaustive-value.rs b/src/test/ui/const-generics/exhaustive-value.rs index fce036b0da6..921f9a46707 100644 --- a/src/test/ui/const-generics/exhaustive-value.rs +++ b/src/test/ui/const-generics/exhaustive-value.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Foo { fn test() {} diff --git a/src/test/ui/const-generics/fn-const-param-call.full.stderr b/src/test/ui/const-generics/fn-const-param-call.full.stderr index f1bd8def9ff..d984449e6ca 100644 --- a/src/test/ui/const-generics/fn-const-param-call.full.stderr +++ b/src/test/ui/const-generics/fn-const-param-call.full.stderr @@ -1,11 +1,11 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/fn-const-param-call.rs:12:25 + --> $DIR/fn-const-param-call.rs:11:25 | LL | struct Wrapper u32>; | ^^^^^^^^^^^ error: using function pointers as const generic parameters is forbidden - --> $DIR/fn-const-param-call.rs:14:15 + --> $DIR/fn-const-param-call.rs:13:15 | LL | impl u32> Wrapper { | ^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/fn-const-param-call.min.stderr b/src/test/ui/const-generics/fn-const-param-call.min.stderr index f1bd8def9ff..d984449e6ca 100644 --- a/src/test/ui/const-generics/fn-const-param-call.min.stderr +++ b/src/test/ui/const-generics/fn-const-param-call.min.stderr @@ -1,11 +1,11 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/fn-const-param-call.rs:12:25 + --> $DIR/fn-const-param-call.rs:11:25 | LL | struct Wrapper u32>; | ^^^^^^^^^^^ error: using function pointers as const generic parameters is forbidden - --> $DIR/fn-const-param-call.rs:14:15 + --> $DIR/fn-const-param-call.rs:13:15 | LL | impl u32> Wrapper { | ^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/fn-const-param-call.rs b/src/test/ui/const-generics/fn-const-param-call.rs index bba6c1f7a16..70a104e2222 100644 --- a/src/test/ui/const-generics/fn-const-param-call.rs +++ b/src/test/ui/const-generics/fn-const-param-call.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn function() -> u32 { 17 diff --git a/src/test/ui/const-generics/fn-const-param-infer.full.stderr b/src/test/ui/const-generics/fn-const-param-infer.full.stderr index 4bdc9b89af6..f0767a10994 100644 --- a/src/test/ui/const-generics/fn-const-param-infer.full.stderr +++ b/src/test/ui/const-generics/fn-const-param-infer.full.stderr @@ -1,5 +1,5 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/fn-const-param-infer.rs:7:25 + --> $DIR/fn-const-param-infer.rs:6:25 | LL | struct Checked bool>; | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/fn-const-param-infer.min.stderr b/src/test/ui/const-generics/fn-const-param-infer.min.stderr index 4bdc9b89af6..f0767a10994 100644 --- a/src/test/ui/const-generics/fn-const-param-infer.min.stderr +++ b/src/test/ui/const-generics/fn-const-param-infer.min.stderr @@ -1,5 +1,5 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/fn-const-param-infer.rs:7:25 + --> $DIR/fn-const-param-infer.rs:6:25 | LL | struct Checked bool>; | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/fn-const-param-infer.rs b/src/test/ui/const-generics/fn-const-param-infer.rs index 3ed75e7b00d..d090479d4c3 100644 --- a/src/test/ui/const-generics/fn-const-param-infer.rs +++ b/src/test/ui/const-generics/fn-const-param-infer.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Checked bool>; //~^ ERROR: using function pointers as const generic parameters diff --git a/src/test/ui/const-generics/fn-taking-const-generic-array.rs b/src/test/ui/const-generics/fn-taking-const-generic-array.rs index 950684aaa8d..58c1b95893e 100644 --- a/src/test/ui/const-generics/fn-taking-const-generic-array.rs +++ b/src/test/ui/const-generics/fn-taking-const-generic-array.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::fmt::Display; diff --git a/src/test/ui/const-generics/forbid-non-structural_match-types.full.stderr b/src/test/ui/const-generics/forbid-non-structural_match-types.full.stderr index adcaa759963..5c0f17537fa 100644 --- a/src/test/ui/const-generics/forbid-non-structural_match-types.full.stderr +++ b/src/test/ui/const-generics/forbid-non-structural_match-types.full.stderr @@ -1,5 +1,5 @@ error[E0741]: `C` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter - --> $DIR/forbid-non-structural_match-types.rs:15:19 + --> $DIR/forbid-non-structural_match-types.rs:14:19 | LL | struct D; | ^ `C` doesn't derive both `PartialEq` and `Eq` diff --git a/src/test/ui/const-generics/forbid-non-structural_match-types.min.stderr b/src/test/ui/const-generics/forbid-non-structural_match-types.min.stderr index 014200178b9..3912cf57751 100644 --- a/src/test/ui/const-generics/forbid-non-structural_match-types.min.stderr +++ b/src/test/ui/const-generics/forbid-non-structural_match-types.min.stderr @@ -1,5 +1,5 @@ error: `A` is forbidden as the type of a const generic parameter - --> $DIR/forbid-non-structural_match-types.rs:10:19 + --> $DIR/forbid-non-structural_match-types.rs:9:19 | LL | struct B; // ok | ^ @@ -8,7 +8,7 @@ LL | struct B; // ok = help: more complex types are supported with `#[feature(const_generics)]` error: `C` is forbidden as the type of a const generic parameter - --> $DIR/forbid-non-structural_match-types.rs:15:19 + --> $DIR/forbid-non-structural_match-types.rs:14:19 | LL | struct D; | ^ @@ -17,7 +17,7 @@ LL | struct D; = help: more complex types are supported with `#[feature(const_generics)]` error[E0741]: `C` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter - --> $DIR/forbid-non-structural_match-types.rs:15:19 + --> $DIR/forbid-non-structural_match-types.rs:14:19 | LL | struct D; | ^ `C` doesn't derive both `PartialEq` and `Eq` diff --git a/src/test/ui/const-generics/forbid-non-structural_match-types.rs b/src/test/ui/const-generics/forbid-non-structural_match-types.rs index e7356d485db..0fdb3ed4a5a 100644 --- a/src/test/ui/const-generics/forbid-non-structural_match-types.rs +++ b/src/test/ui/const-generics/forbid-non-structural_match-types.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #[derive(PartialEq, Eq)] struct A; diff --git a/src/test/ui/const-generics/foreign-item-const-parameter.full.stderr b/src/test/ui/const-generics/foreign-item-const-parameter.full.stderr index 0ac51e8c9e6..b827e482977 100644 --- a/src/test/ui/const-generics/foreign-item-const-parameter.full.stderr +++ b/src/test/ui/const-generics/foreign-item-const-parameter.full.stderr @@ -1,5 +1,5 @@ error[E0044]: foreign items may not have const parameters - --> $DIR/foreign-item-const-parameter.rs:8:5 + --> $DIR/foreign-item-const-parameter.rs:7:5 | LL | fn foo(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't have const parameters @@ -7,7 +7,7 @@ LL | fn foo(); = help: replace the const parameters with concrete consts error[E0044]: foreign items may not have type or const parameters - --> $DIR/foreign-item-const-parameter.rs:10:5 + --> $DIR/foreign-item-const-parameter.rs:9:5 | LL | fn bar(_: T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't have type or const parameters diff --git a/src/test/ui/const-generics/foreign-item-const-parameter.min.stderr b/src/test/ui/const-generics/foreign-item-const-parameter.min.stderr index 0ac51e8c9e6..b827e482977 100644 --- a/src/test/ui/const-generics/foreign-item-const-parameter.min.stderr +++ b/src/test/ui/const-generics/foreign-item-const-parameter.min.stderr @@ -1,5 +1,5 @@ error[E0044]: foreign items may not have const parameters - --> $DIR/foreign-item-const-parameter.rs:8:5 + --> $DIR/foreign-item-const-parameter.rs:7:5 | LL | fn foo(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't have const parameters @@ -7,7 +7,7 @@ LL | fn foo(); = help: replace the const parameters with concrete consts error[E0044]: foreign items may not have type or const parameters - --> $DIR/foreign-item-const-parameter.rs:10:5 + --> $DIR/foreign-item-const-parameter.rs:9:5 | LL | fn bar(_: T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't have type or const parameters diff --git a/src/test/ui/const-generics/foreign-item-const-parameter.rs b/src/test/ui/const-generics/foreign-item-const-parameter.rs index 44b6d0332c3..83caa89f033 100644 --- a/src/test/ui/const-generics/foreign-item-const-parameter.rs +++ b/src/test/ui/const-generics/foreign-item-const-parameter.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] extern "C" { fn foo(); //~ ERROR foreign items may not have const parameters diff --git a/src/test/ui/const-generics/generic-function-call-in-array-length.full.stderr b/src/test/ui/const-generics/generic-function-call-in-array-length.full.stderr index 43b42d82d0c..2d19a58a145 100644 --- a/src/test/ui/const-generics/generic-function-call-in-array-length.full.stderr +++ b/src/test/ui/const-generics/generic-function-call-in-array-length.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/generic-function-call-in-array-length.rs:9:29 + --> $DIR/generic-function-call-in-array-length.rs:8:29 | LL | fn bar() -> [u32; foo(N)] { | ^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/generic-function-call-in-array-length.min.stderr b/src/test/ui/const-generics/generic-function-call-in-array-length.min.stderr index 526f98fe8cd..d7a3f04a8da 100644 --- a/src/test/ui/const-generics/generic-function-call-in-array-length.min.stderr +++ b/src/test/ui/const-generics/generic-function-call-in-array-length.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/generic-function-call-in-array-length.rs:9:39 + --> $DIR/generic-function-call-in-array-length.rs:8:39 | LL | fn bar() -> [u32; foo(N)] { | ^ cannot perform const operation using `N` @@ -8,7 +8,7 @@ LL | fn bar() -> [u32; foo(N)] { = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/generic-function-call-in-array-length.rs:12:13 + --> $DIR/generic-function-call-in-array-length.rs:11:13 | LL | [0; foo(N)] | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/generic-function-call-in-array-length.rs b/src/test/ui/const-generics/generic-function-call-in-array-length.rs index c838070dc95..a6d2bbd17ea 100644 --- a/src/test/ui/const-generics/generic-function-call-in-array-length.rs +++ b/src/test/ui/const-generics/generic-function-call-in-array-length.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] const fn foo(n: usize) -> usize { n * 2 } diff --git a/src/test/ui/const-generics/generic-param-mismatch.full.stderr b/src/test/ui/const-generics/generic-param-mismatch.full.stderr index 6befa9d1f69..aff8780fb0d 100644 --- a/src/test/ui/const-generics/generic-param-mismatch.full.stderr +++ b/src/test/ui/const-generics/generic-param-mismatch.full.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/generic-param-mismatch.rs:7:5 + --> $DIR/generic-param-mismatch.rs:6:5 | LL | fn test() -> [u8; M] { | ------- expected `[u8; M]` because of return type diff --git a/src/test/ui/const-generics/generic-param-mismatch.min.stderr b/src/test/ui/const-generics/generic-param-mismatch.min.stderr index 6befa9d1f69..aff8780fb0d 100644 --- a/src/test/ui/const-generics/generic-param-mismatch.min.stderr +++ b/src/test/ui/const-generics/generic-param-mismatch.min.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/generic-param-mismatch.rs:7:5 + --> $DIR/generic-param-mismatch.rs:6:5 | LL | fn test() -> [u8; M] { | ------- expected `[u8; M]` because of return type diff --git a/src/test/ui/const-generics/generic-param-mismatch.rs b/src/test/ui/const-generics/generic-param-mismatch.rs index e409094eb73..22fffe47dcc 100644 --- a/src/test/ui/const-generics/generic-param-mismatch.rs +++ b/src/test/ui/const-generics/generic-param-mismatch.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] fn test() -> [u8; M] { [0; N] //~ ERROR mismatched types diff --git a/src/test/ui/const-generics/generic-sum-in-array-length.full.stderr b/src/test/ui/const-generics/generic-sum-in-array-length.full.stderr index d311e1c0bae..c13882e7fe1 100644 --- a/src/test/ui/const-generics/generic-sum-in-array-length.full.stderr +++ b/src/test/ui/const-generics/generic-sum-in-array-length.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/generic-sum-in-array-length.rs:7:45 + --> $DIR/generic-sum-in-array-length.rs:6:45 | LL | fn foo(bar: [usize; A + B]) {} | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/generic-sum-in-array-length.min.stderr b/src/test/ui/const-generics/generic-sum-in-array-length.min.stderr index e531b612b56..cff5a62193c 100644 --- a/src/test/ui/const-generics/generic-sum-in-array-length.min.stderr +++ b/src/test/ui/const-generics/generic-sum-in-array-length.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/generic-sum-in-array-length.rs:7:53 + --> $DIR/generic-sum-in-array-length.rs:6:53 | LL | fn foo(bar: [usize; A + B]) {} | ^ cannot perform const operation using `A` @@ -8,7 +8,7 @@ LL | fn foo(bar: [usize; A + B]) {} = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/generic-sum-in-array-length.rs:7:57 + --> $DIR/generic-sum-in-array-length.rs:6:57 | LL | fn foo(bar: [usize; A + B]) {} | ^ cannot perform const operation using `B` diff --git a/src/test/ui/const-generics/generic-sum-in-array-length.rs b/src/test/ui/const-generics/generic-sum-in-array-length.rs index 84ddfe055dc..7ee0394ba14 100644 --- a/src/test/ui/const-generics/generic-sum-in-array-length.rs +++ b/src/test/ui/const-generics/generic-sum-in-array-length.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] fn foo(bar: [usize; A + B]) {} //[min]~^ ERROR generic parameters may not be used in const operations diff --git a/src/test/ui/const-generics/impl-const-generic-struct.rs b/src/test/ui/const-generics/impl-const-generic-struct.rs index 05cabc46baa..1aa22698b64 100644 --- a/src/test/ui/const-generics/impl-const-generic-struct.rs +++ b/src/test/ui/const-generics/impl-const-generic-struct.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct S; diff --git a/src/test/ui/const-generics/impl-trait-with-const-arguments.full.stderr b/src/test/ui/const-generics/impl-trait-with-const-arguments.full.stderr index a587cb61873..26b965901a4 100644 --- a/src/test/ui/const-generics/impl-trait-with-const-arguments.full.stderr +++ b/src/test/ui/const-generics/impl-trait-with-const-arguments.full.stderr @@ -1,5 +1,5 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position - --> $DIR/impl-trait-with-const-arguments.rs:24:20 + --> $DIR/impl-trait-with-const-arguments.rs:23:20 | LL | assert_eq!(f::<4usize>(Usizable), 20usize); | ^^^^^^ explicit generic argument not allowed diff --git a/src/test/ui/const-generics/impl-trait-with-const-arguments.min.stderr b/src/test/ui/const-generics/impl-trait-with-const-arguments.min.stderr index a587cb61873..26b965901a4 100644 --- a/src/test/ui/const-generics/impl-trait-with-const-arguments.min.stderr +++ b/src/test/ui/const-generics/impl-trait-with-const-arguments.min.stderr @@ -1,5 +1,5 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position - --> $DIR/impl-trait-with-const-arguments.rs:24:20 + --> $DIR/impl-trait-with-const-arguments.rs:23:20 | LL | assert_eq!(f::<4usize>(Usizable), 20usize); | ^^^^^^ explicit generic argument not allowed diff --git a/src/test/ui/const-generics/impl-trait-with-const-arguments.rs b/src/test/ui/const-generics/impl-trait-with-const-arguments.rs index a4c75792ee3..2e6e49b9c0a 100644 --- a/src/test/ui/const-generics/impl-trait-with-const-arguments.rs +++ b/src/test/ui/const-generics/impl-trait-with-const-arguments.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] trait Usizer { fn m(self) -> usize; diff --git a/src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr b/src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr index 6b902e2d658..9c8359b08a5 100644 --- a/src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr +++ b/src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr @@ -1,11 +1,11 @@ error[E0107]: wrong number of const arguments: expected 2, found 1 - --> $DIR/incorrect-number-of-const-args.rs:12:5 + --> $DIR/incorrect-number-of-const-args.rs:11:5 | LL | foo::<0>(); | ^^^^^^^^ expected 2 const arguments error[E0107]: wrong number of const arguments: expected 2, found 3 - --> $DIR/incorrect-number-of-const-args.rs:13:17 + --> $DIR/incorrect-number-of-const-args.rs:12:17 | LL | foo::<0, 0, 0>(); | ^ unexpected const argument diff --git a/src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr b/src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr index 6b902e2d658..9c8359b08a5 100644 --- a/src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr +++ b/src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr @@ -1,11 +1,11 @@ error[E0107]: wrong number of const arguments: expected 2, found 1 - --> $DIR/incorrect-number-of-const-args.rs:12:5 + --> $DIR/incorrect-number-of-const-args.rs:11:5 | LL | foo::<0>(); | ^^^^^^^^ expected 2 const arguments error[E0107]: wrong number of const arguments: expected 2, found 3 - --> $DIR/incorrect-number-of-const-args.rs:13:17 + --> $DIR/incorrect-number-of-const-args.rs:12:17 | LL | foo::<0, 0, 0>(); | ^ unexpected const argument diff --git a/src/test/ui/const-generics/incorrect-number-of-const-args.rs b/src/test/ui/const-generics/incorrect-number-of-const-args.rs index f7bdf761f7d..3c4290df056 100644 --- a/src/test/ui/const-generics/incorrect-number-of-const-args.rs +++ b/src/test/ui/const-generics/incorrect-number-of-const-args.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn foo() -> usize { 0 diff --git a/src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr b/src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr index 05bf67a5ff7..e85bf8829ae 100644 --- a/src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr +++ b/src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/cannot-infer-const-args.rs:12:5 + --> $DIR/cannot-infer-const-args.rs:11:5 | LL | foo(); | ^^^ cannot infer the value of const parameter `X` declared on the function `foo` diff --git a/src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr b/src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr index 05bf67a5ff7..e85bf8829ae 100644 --- a/src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr +++ b/src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/cannot-infer-const-args.rs:12:5 + --> $DIR/cannot-infer-const-args.rs:11:5 | LL | foo(); | ^^^ cannot infer the value of const parameter `X` declared on the function `foo` diff --git a/src/test/ui/const-generics/infer/cannot-infer-const-args.rs b/src/test/ui/const-generics/infer/cannot-infer-const-args.rs index 2d74b4788bf..cc52892bd04 100644 --- a/src/test/ui/const-generics/infer/cannot-infer-const-args.rs +++ b/src/test/ui/const-generics/infer/cannot-infer-const-args.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn foo() -> usize { 0 diff --git a/src/test/ui/const-generics/infer/issue-77092.rs b/src/test/ui/const-generics/infer/issue-77092.rs index 9a1dd1a8258..fcf7d3282b4 100644 --- a/src/test/ui/const-generics/infer/issue-77092.rs +++ b/src/test/ui/const-generics/infer/issue-77092.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - use std::convert::TryInto; fn take_array_from_mut(data: &mut [T], start: usize) -> &mut [T; N] { diff --git a/src/test/ui/const-generics/infer/issue-77092.stderr b/src/test/ui/const-generics/infer/issue-77092.stderr index 99894173bc8..5857a421198 100644 --- a/src/test/ui/const-generics/infer/issue-77092.stderr +++ b/src/test/ui/const-generics/infer/issue-77092.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-77092.rs:13:26 + --> $DIR/issue-77092.rs:11:26 | LL | println!("{:?}", take_array_from_mut(&mut arr, i)); | ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `take_array_from_mut` diff --git a/src/test/ui/const-generics/infer/method-chain.full.stderr b/src/test/ui/const-generics/infer/method-chain.full.stderr index 7aa3bd44df8..f6d9c4a2645 100644 --- a/src/test/ui/const-generics/infer/method-chain.full.stderr +++ b/src/test/ui/const-generics/infer/method-chain.full.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/method-chain.rs:21:33 + --> $DIR/method-chain.rs:20:33 | LL | Foo.bar().bar().bar().bar().baz(); | ^^^ cannot infer the value of const parameter `N` declared on the associated function `baz` diff --git a/src/test/ui/const-generics/infer/method-chain.min.stderr b/src/test/ui/const-generics/infer/method-chain.min.stderr index 7aa3bd44df8..f6d9c4a2645 100644 --- a/src/test/ui/const-generics/infer/method-chain.min.stderr +++ b/src/test/ui/const-generics/infer/method-chain.min.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/method-chain.rs:21:33 + --> $DIR/method-chain.rs:20:33 | LL | Foo.bar().bar().bar().bar().baz(); | ^^^ cannot infer the value of const parameter `N` declared on the associated function `baz` diff --git a/src/test/ui/const-generics/infer/method-chain.rs b/src/test/ui/const-generics/infer/method-chain.rs index 9389ca20d10..8ac6a7d6267 100644 --- a/src/test/ui/const-generics/infer/method-chain.rs +++ b/src/test/ui/const-generics/infer/method-chain.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo; diff --git a/src/test/ui/const-generics/infer/uninferred-consts.full.stderr b/src/test/ui/const-generics/infer/uninferred-consts.full.stderr index 4be625ba909..254a28f70e2 100644 --- a/src/test/ui/const-generics/infer/uninferred-consts.full.stderr +++ b/src/test/ui/const-generics/infer/uninferred-consts.full.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/uninferred-consts.rs:14:9 + --> $DIR/uninferred-consts.rs:13:9 | LL | Foo.foo(); | ^^^ cannot infer the value of const parameter `A` declared on the associated function `foo` diff --git a/src/test/ui/const-generics/infer/uninferred-consts.min.stderr b/src/test/ui/const-generics/infer/uninferred-consts.min.stderr index 4be625ba909..254a28f70e2 100644 --- a/src/test/ui/const-generics/infer/uninferred-consts.min.stderr +++ b/src/test/ui/const-generics/infer/uninferred-consts.min.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/uninferred-consts.rs:14:9 + --> $DIR/uninferred-consts.rs:13:9 | LL | Foo.foo(); | ^^^ cannot infer the value of const parameter `A` declared on the associated function `foo` diff --git a/src/test/ui/const-generics/infer/uninferred-consts.rs b/src/test/ui/const-generics/infer/uninferred-consts.rs index 00fb6eac992..bcd9aadb78a 100644 --- a/src/test/ui/const-generics/infer/uninferred-consts.rs +++ b/src/test/ui/const-generics/infer/uninferred-consts.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] // taken from https://github.com/rust-lang/rust/issues/70507#issuecomment-615268893 struct Foo; diff --git a/src/test/ui/const-generics/infer_arg_from_pat.rs b/src/test/ui/const-generics/infer_arg_from_pat.rs index 609fdb35cf1..5e2a3eaff54 100644 --- a/src/test/ui/const-generics/infer_arg_from_pat.rs +++ b/src/test/ui/const-generics/infer_arg_from_pat.rs @@ -5,7 +5,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct A { arr: [u8; N], diff --git a/src/test/ui/const-generics/infer_arr_len_from_pat.rs b/src/test/ui/const-generics/infer_arr_len_from_pat.rs index cbf48e3d249..0273383856f 100644 --- a/src/test/ui/const-generics/infer_arr_len_from_pat.rs +++ b/src/test/ui/const-generics/infer_arr_len_from_pat.rs @@ -5,7 +5,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn as_chunks() -> [u8; N] { loop {} diff --git a/src/test/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs b/src/test/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs index bdbf338295c..96e5976e44b 100644 --- a/src/test/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs +++ b/src/test/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn takes_closure_of_array_3(f: F) where F: Fn([i32; 3]) { f([1, 2, 3]); diff --git a/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.full.stderr b/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.full.stderr index c09d16d0ab0..3e90dbeece9 100644 --- a/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.full.stderr +++ b/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/intrinsics-type_name-as-const-argument.rs:15:8 + --> $DIR/intrinsics-type_name-as-const-argument.rs:14:8 | LL | T: Trait<{std::intrinsics::type_name::()}> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr b/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr index 02467df193c..4c2aaef3493 100644 --- a/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr +++ b/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/intrinsics-type_name-as-const-argument.rs:15:44 + --> $DIR/intrinsics-type_name-as-const-argument.rs:14:44 | LL | T: Trait<{std::intrinsics::type_name::()}> | ^ cannot perform const operation using `T` @@ -8,7 +8,7 @@ LL | T: Trait<{std::intrinsics::type_name::()}> = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: `&'static str` is forbidden as the type of a const generic parameter - --> $DIR/intrinsics-type_name-as-const-argument.rs:10:22 + --> $DIR/intrinsics-type_name-as-const-argument.rs:9:22 | LL | trait Trait {} | ^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.rs b/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.rs index 8971c00ed5a..f24dd42eb2d 100644 --- a/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.rs +++ b/src/test/ui/const-generics/intrinsics-type_name-as-const-argument.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] #![feature(core_intrinsics)] #![feature(const_type_name)] diff --git a/src/test/ui/const-generics/issue-61522-array-len-succ.full.stderr b/src/test/ui/const-generics/issue-61522-array-len-succ.full.stderr index 8855f187e97..56deec16548 100644 --- a/src/test/ui/const-generics/issue-61522-array-len-succ.full.stderr +++ b/src/test/ui/const-generics/issue-61522-array-len-succ.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-61522-array-len-succ.rs:7:40 + --> $DIR/issue-61522-array-len-succ.rs:6:40 | LL | pub struct MyArray([u8; COUNT + 1]); | ^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | pub struct MyArray([u8; COUNT + 1]); = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/issue-61522-array-len-succ.rs:12:24 + --> $DIR/issue-61522-array-len-succ.rs:11:24 | LL | fn inner(&self) -> &[u8; COUNT + 1] { | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr b/src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr index 2eaef95c232..36a0a37ae9c 100644 --- a/src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr +++ b/src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-61522-array-len-succ.rs:7:45 + --> $DIR/issue-61522-array-len-succ.rs:6:45 | LL | pub struct MyArray([u8; COUNT + 1]); | ^^^^^ cannot perform const operation using `COUNT` @@ -8,7 +8,7 @@ LL | pub struct MyArray([u8; COUNT + 1]); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-61522-array-len-succ.rs:12:30 + --> $DIR/issue-61522-array-len-succ.rs:11:30 | LL | fn inner(&self) -> &[u8; COUNT + 1] { | ^^^^^ cannot perform const operation using `COUNT` diff --git a/src/test/ui/const-generics/issue-61522-array-len-succ.rs b/src/test/ui/const-generics/issue-61522-array-len-succ.rs index 8c0a3a03774..d4a948b9259 100644 --- a/src/test/ui/const-generics/issue-61522-array-len-succ.rs +++ b/src/test/ui/const-generics/issue-61522-array-len-succ.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct MyArray([u8; COUNT + 1]); //[full]~^ ERROR constant expression depends on a generic parameter diff --git a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.min.stderr b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.min.stderr index 1c2e7e069a1..b6c6e6fe374 100644 --- a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.min.stderr +++ b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.min.stderr @@ -1,5 +1,5 @@ error: `&'static str` is forbidden as the type of a const generic parameter - --> $DIR/issue-66596-impl-trait-for-str-const-arg.rs:9:25 + --> $DIR/issue-66596-impl-trait-for-str-const-arg.rs:8:25 | LL | trait Trait { | ^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs index 11d4bf4c3e6..2a741ba87a9 100644 --- a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs +++ b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Trait { diff --git a/src/test/ui/const-generics/issue-67375.full.stderr b/src/test/ui/const-generics/issue-67375.full.stderr index e15d65f197e..2f004f75de5 100644 --- a/src/test/ui/const-generics/issue-67375.full.stderr +++ b/src/test/ui/const-generics/issue-67375.full.stderr @@ -1,5 +1,5 @@ warning: cannot use constants which depend on generic parameters in types - --> $DIR/issue-67375.rs:9:12 + --> $DIR/issue-67375.rs:8:12 | LL | inner: [(); { [|_: &T| {}; 0].len() }], | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ LL | inner: [(); { [|_: &T| {}; 0].len() }], = note: for more information, see issue #76200 error[E0392]: parameter `T` is never used - --> $DIR/issue-67375.rs:7:12 + --> $DIR/issue-67375.rs:6:12 | LL | struct Bug { | ^ unused parameter diff --git a/src/test/ui/const-generics/issue-67375.min.stderr b/src/test/ui/const-generics/issue-67375.min.stderr index da96b5374a5..337e7bc1409 100644 --- a/src/test/ui/const-generics/issue-67375.min.stderr +++ b/src/test/ui/const-generics/issue-67375.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-67375.rs:9:25 + --> $DIR/issue-67375.rs:8:25 | LL | inner: [(); { [|_: &T| {}; 0].len() }], | ^ cannot perform const operation using `T` @@ -8,7 +8,7 @@ LL | inner: [(); { [|_: &T| {}; 0].len() }], = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0392]: parameter `T` is never used - --> $DIR/issue-67375.rs:7:12 + --> $DIR/issue-67375.rs:6:12 | LL | struct Bug { | ^ unused parameter diff --git a/src/test/ui/const-generics/issue-67375.rs b/src/test/ui/const-generics/issue-67375.rs index ecc76bcae06..a8875b8b6bf 100644 --- a/src/test/ui/const-generics/issue-67375.rs +++ b/src/test/ui/const-generics/issue-67375.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] struct Bug { //~^ ERROR parameter `T` is never used diff --git a/src/test/ui/const-generics/issue-67945-1.full.stderr b/src/test/ui/const-generics/issue-67945-1.full.stderr index e79c4f5374e..5cdcefe3501 100644 --- a/src/test/ui/const-generics/issue-67945-1.full.stderr +++ b/src/test/ui/const-generics/issue-67945-1.full.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-67945-1.rs:14:20 + --> $DIR/issue-67945-1.rs:13:20 | LL | struct Bug { | - this type parameter @@ -13,7 +13,7 @@ LL | let x: S = MaybeUninit::uninit(); found union `MaybeUninit<_>` error[E0392]: parameter `S` is never used - --> $DIR/issue-67945-1.rs:11:12 + --> $DIR/issue-67945-1.rs:10:12 | LL | struct Bug { | ^ unused parameter diff --git a/src/test/ui/const-generics/issue-67945-1.min.stderr b/src/test/ui/const-generics/issue-67945-1.min.stderr index 8fea130baa5..a3e086ea954 100644 --- a/src/test/ui/const-generics/issue-67945-1.min.stderr +++ b/src/test/ui/const-generics/issue-67945-1.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-67945-1.rs:14:16 + --> $DIR/issue-67945-1.rs:13:16 | LL | let x: S = MaybeUninit::uninit(); | ^ cannot perform const operation using `S` @@ -8,7 +8,7 @@ LL | let x: S = MaybeUninit::uninit(); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-67945-1.rs:17:45 + --> $DIR/issue-67945-1.rs:16:45 | LL | let b = &*(&x as *const _ as *const S); | ^ cannot perform const operation using `S` @@ -17,7 +17,7 @@ LL | let b = &*(&x as *const _ as *const S); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0392]: parameter `S` is never used - --> $DIR/issue-67945-1.rs:11:12 + --> $DIR/issue-67945-1.rs:10:12 | LL | struct Bug { | ^ unused parameter diff --git a/src/test/ui/const-generics/issue-67945-1.rs b/src/test/ui/const-generics/issue-67945-1.rs index 6771603f259..84737e4e985 100644 --- a/src/test/ui/const-generics/issue-67945-1.rs +++ b/src/test/ui/const-generics/issue-67945-1.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] use std::marker::PhantomData; diff --git a/src/test/ui/const-generics/issue-67945-2.full.stderr b/src/test/ui/const-generics/issue-67945-2.full.stderr index 2f54b802df8..4d96058b395 100644 --- a/src/test/ui/const-generics/issue-67945-2.full.stderr +++ b/src/test/ui/const-generics/issue-67945-2.full.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-67945-2.rs:12:20 + --> $DIR/issue-67945-2.rs:11:20 | LL | struct Bug { | - this type parameter @@ -13,7 +13,7 @@ LL | let x: S = MaybeUninit::uninit(); found union `MaybeUninit<_>` error[E0392]: parameter `S` is never used - --> $DIR/issue-67945-2.rs:9:12 + --> $DIR/issue-67945-2.rs:8:12 | LL | struct Bug { | ^ unused parameter diff --git a/src/test/ui/const-generics/issue-67945-2.min.stderr b/src/test/ui/const-generics/issue-67945-2.min.stderr index 50633772b75..860be4a9b6a 100644 --- a/src/test/ui/const-generics/issue-67945-2.min.stderr +++ b/src/test/ui/const-generics/issue-67945-2.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-67945-2.rs:12:16 + --> $DIR/issue-67945-2.rs:11:16 | LL | let x: S = MaybeUninit::uninit(); | ^ cannot perform const operation using `S` @@ -8,7 +8,7 @@ LL | let x: S = MaybeUninit::uninit(); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-67945-2.rs:15:45 + --> $DIR/issue-67945-2.rs:14:45 | LL | let b = &*(&x as *const _ as *const S); | ^ cannot perform const operation using `S` @@ -17,7 +17,7 @@ LL | let b = &*(&x as *const _ as *const S); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0392]: parameter `S` is never used - --> $DIR/issue-67945-2.rs:9:12 + --> $DIR/issue-67945-2.rs:8:12 | LL | struct Bug { | ^ unused parameter diff --git a/src/test/ui/const-generics/issue-67945-2.rs b/src/test/ui/const-generics/issue-67945-2.rs index 72dbb674e66..4a46786e9a9 100644 --- a/src/test/ui/const-generics/issue-67945-2.rs +++ b/src/test/ui/const-generics/issue-67945-2.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] use std::mem::MaybeUninit; diff --git a/src/test/ui/const-generics/issue-67945-3.full.stderr b/src/test/ui/const-generics/issue-67945-3.full.stderr index c33b88588c0..fa66252bd69 100644 --- a/src/test/ui/const-generics/issue-67945-3.full.stderr +++ b/src/test/ui/const-generics/issue-67945-3.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-67945-3.rs:8:8 + --> $DIR/issue-67945-3.rs:7:8 | LL | A: [(); { | ________^ diff --git a/src/test/ui/const-generics/issue-67945-3.min.stderr b/src/test/ui/const-generics/issue-67945-3.min.stderr index 9c6e101ece8..5c30429c895 100644 --- a/src/test/ui/const-generics/issue-67945-3.min.stderr +++ b/src/test/ui/const-generics/issue-67945-3.min.stderr @@ -1,5 +1,5 @@ error: generic `Self` types are currently not permitted in anonymous constants - --> $DIR/issue-67945-3.rs:10:27 + --> $DIR/issue-67945-3.rs:9:27 | LL | let x: Option> = None; | ^^^^ diff --git a/src/test/ui/const-generics/issue-67945-3.rs b/src/test/ui/const-generics/issue-67945-3.rs index bca079101e2..5bad61cfc76 100644 --- a/src/test/ui/const-generics/issue-67945-3.rs +++ b/src/test/ui/const-generics/issue-67945-3.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] struct Bug { A: [(); { diff --git a/src/test/ui/const-generics/issue-68104-print-stack-overflow.rs b/src/test/ui/const-generics/issue-68104-print-stack-overflow.rs index eab63d3a6e6..43c3999133c 100644 --- a/src/test/ui/const-generics/issue-68104-print-stack-overflow.rs +++ b/src/test/ui/const-generics/issue-68104-print-stack-overflow.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] extern crate impl_const; diff --git a/src/test/ui/const-generics/issue-70180-1-stalled_on.rs b/src/test/ui/const-generics/issue-70180-1-stalled_on.rs index 9cfa57006d5..f0554823273 100644 --- a/src/test/ui/const-generics/issue-70180-1-stalled_on.rs +++ b/src/test/ui/const-generics/issue-70180-1-stalled_on.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub fn works() { let array/*: [_; _]*/ = default_array(); diff --git a/src/test/ui/const-generics/issue-70180-2-stalled_on.rs b/src/test/ui/const-generics/issue-70180-2-stalled_on.rs index bbde404966c..21cefc09c25 100644 --- a/src/test/ui/const-generics/issue-70180-2-stalled_on.rs +++ b/src/test/ui/const-generics/issue-70180-2-stalled_on.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn works() { let array/*: [u8; _]*/ = default_byte_array(); diff --git a/src/test/ui/const-generics/issue-71986.rs b/src/test/ui/const-generics/issue-71986.rs index d4c962452d1..6bfdba5711e 100644 --- a/src/test/ui/const-generics/issue-71986.rs +++ b/src/test/ui/const-generics/issue-71986.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub trait Foo {} pub fn bar>() {} diff --git a/src/test/ui/const-generics/issue-74906.rs b/src/test/ui/const-generics/issue-74906.rs index 9162d1142b6..dc3c33736da 100644 --- a/src/test/ui/const-generics/issue-74906.rs +++ b/src/test/ui/const-generics/issue-74906.rs @@ -3,7 +3,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] const SIZE: usize = 16; diff --git a/src/test/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs b/src/test/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs index 7ea8d936d61..f59eb60cb38 100644 --- a/src/test/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs +++ b/src/test/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs @@ -1,6 +1,5 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] // All of these three items must be in `lib2` to reproduce the error diff --git a/src/test/ui/const-generics/issues/issue-56445.full.stderr b/src/test/ui/const-generics/issues/issue-56445.full.stderr index 50e91418551..61fba92c196 100644 --- a/src/test/ui/const-generics/issues/issue-56445.full.stderr +++ b/src/test/ui/const-generics/issues/issue-56445.full.stderr @@ -6,10 +6,9 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error[E0771]: use of non-static lifetime `'a` in const generic - --> $DIR/issue-56445.rs:9:26 + --> $DIR/issue-56445.rs:8:26 | LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>); | ^^ diff --git a/src/test/ui/const-generics/issues/issue-56445.min.stderr b/src/test/ui/const-generics/issues/issue-56445.min.stderr index bcb27d8d1e1..80702dd4bc3 100644 --- a/src/test/ui/const-generics/issues/issue-56445.min.stderr +++ b/src/test/ui/const-generics/issues/issue-56445.min.stderr @@ -1,5 +1,5 @@ error[E0771]: use of non-static lifetime `'a` in const generic - --> $DIR/issue-56445.rs:9:26 + --> $DIR/issue-56445.rs:8:26 | LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>); | ^^ diff --git a/src/test/ui/const-generics/issues/issue-56445.rs b/src/test/ui/const-generics/issues/issue-56445.rs index 0bcde348b05..bc9e1dee853 100644 --- a/src/test/ui/const-generics/issues/issue-56445.rs +++ b/src/test/ui/const-generics/issues/issue-56445.rs @@ -1,7 +1,6 @@ // Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995. // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] #![crate_type = "lib"] use std::marker::PhantomData; diff --git a/src/test/ui/const-generics/issues/issue-60818-struct-constructors.full.stderr b/src/test/ui/const-generics/issues/issue-60818-struct-constructors.full.stderr index cc014ea429d..c03b7252a3c 100644 --- a/src/test/ui/const-generics/issues/issue-60818-struct-constructors.full.stderr +++ b/src/test/ui/const-generics/issues/issue-60818-struct-constructors.full.stderr @@ -6,7 +6,6 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete warning: 1 warning emitted diff --git a/src/test/ui/const-generics/issues/issue-60818-struct-constructors.rs b/src/test/ui/const-generics/issues/issue-60818-struct-constructors.rs index ae2b0520fb1..6e64c78cd8c 100644 --- a/src/test/ui/const-generics/issues/issue-60818-struct-constructors.rs +++ b/src/test/ui/const-generics/issues/issue-60818-struct-constructors.rs @@ -1,7 +1,6 @@ // check-pass // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] struct Generic; diff --git a/src/test/ui/const-generics/issues/issue-61336-1.full.stderr b/src/test/ui/const-generics/issues/issue-61336-1.full.stderr index 3a9f819a626..f18728eabbb 100644 --- a/src/test/ui/const-generics/issues/issue-61336-1.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61336-1.full.stderr @@ -6,7 +6,6 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete warning: 1 warning emitted diff --git a/src/test/ui/const-generics/issues/issue-61336-1.rs b/src/test/ui/const-generics/issues/issue-61336-1.rs index 201c0d039d9..c93b296dbb5 100644 --- a/src/test/ui/const-generics/issues/issue-61336-1.rs +++ b/src/test/ui/const-generics/issues/issue-61336-1.rs @@ -1,7 +1,6 @@ // build-pass // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] fn f(x: T) -> [T; N] { [x; N] diff --git a/src/test/ui/const-generics/issues/issue-61336-2.full.stderr b/src/test/ui/const-generics/issues/issue-61336-2.full.stderr index 883ebbef3e8..9f8e68d211d 100644 --- a/src/test/ui/const-generics/issues/issue-61336-2.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61336-2.full.stderr @@ -6,10 +6,9 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/issue-61336-2.rs:10:5 + --> $DIR/issue-61336-2.rs:9:5 | LL | [x; { N }] | ^^^^^^^^^^ the trait `Copy` is not implemented for `T` diff --git a/src/test/ui/const-generics/issues/issue-61336-2.min.stderr b/src/test/ui/const-generics/issues/issue-61336-2.min.stderr index 40863a4f718..82d17a87e0a 100644 --- a/src/test/ui/const-generics/issues/issue-61336-2.min.stderr +++ b/src/test/ui/const-generics/issues/issue-61336-2.min.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/issue-61336-2.rs:10:5 + --> $DIR/issue-61336-2.rs:9:5 | LL | [x; { N }] | ^^^^^^^^^^ the trait `Copy` is not implemented for `T` diff --git a/src/test/ui/const-generics/issues/issue-61336-2.rs b/src/test/ui/const-generics/issues/issue-61336-2.rs index 44995157cc9..a1cf641ff74 100644 --- a/src/test/ui/const-generics/issues/issue-61336-2.rs +++ b/src/test/ui/const-generics/issues/issue-61336-2.rs @@ -1,6 +1,5 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] fn f(x: T) -> [T; N] { [x; { N }] diff --git a/src/test/ui/const-generics/issues/issue-61336.full.stderr b/src/test/ui/const-generics/issues/issue-61336.full.stderr index 3863da8da05..974e2af6fd2 100644 --- a/src/test/ui/const-generics/issues/issue-61336.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61336.full.stderr @@ -6,10 +6,9 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/issue-61336.rs:10:5 + --> $DIR/issue-61336.rs:9:5 | LL | [x; N] | ^^^^^^ the trait `Copy` is not implemented for `T` diff --git a/src/test/ui/const-generics/issues/issue-61336.min.stderr b/src/test/ui/const-generics/issues/issue-61336.min.stderr index 6c57f9ccbf5..19c7153582c 100644 --- a/src/test/ui/const-generics/issues/issue-61336.min.stderr +++ b/src/test/ui/const-generics/issues/issue-61336.min.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/issue-61336.rs:10:5 + --> $DIR/issue-61336.rs:9:5 | LL | [x; N] | ^^^^^^ the trait `Copy` is not implemented for `T` diff --git a/src/test/ui/const-generics/issues/issue-61336.rs b/src/test/ui/const-generics/issues/issue-61336.rs index 7c34250e6b2..c0106ee38c2 100644 --- a/src/test/ui/const-generics/issues/issue-61336.rs +++ b/src/test/ui/const-generics/issues/issue-61336.rs @@ -1,6 +1,5 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] fn f(x: T) -> [T; N] { [x; N] diff --git a/src/test/ui/const-generics/issues/issue-61422.full.stderr b/src/test/ui/const-generics/issues/issue-61422.full.stderr index 294378a6690..ac6c378295d 100644 --- a/src/test/ui/const-generics/issues/issue-61422.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61422.full.stderr @@ -6,7 +6,6 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete warning: 1 warning emitted diff --git a/src/test/ui/const-generics/issues/issue-61422.rs b/src/test/ui/const-generics/issues/issue-61422.rs index 649f8b4255b..421f696f3fd 100644 --- a/src/test/ui/const-generics/issues/issue-61422.rs +++ b/src/test/ui/const-generics/issues/issue-61422.rs @@ -1,7 +1,6 @@ // check-pass // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] use std::mem; diff --git a/src/test/ui/const-generics/issues/issue-61432.full.stderr b/src/test/ui/const-generics/issues/issue-61432.full.stderr index eec1b20254e..82b36de45a2 100644 --- a/src/test/ui/const-generics/issues/issue-61432.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61432.full.stderr @@ -6,7 +6,6 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete warning: 1 warning emitted diff --git a/src/test/ui/const-generics/issues/issue-61432.rs b/src/test/ui/const-generics/issues/issue-61432.rs index 91a4794099c..0e228126d77 100644 --- a/src/test/ui/const-generics/issues/issue-61432.rs +++ b/src/test/ui/const-generics/issues/issue-61432.rs @@ -1,7 +1,6 @@ // run-pass // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] fn promote() { // works: diff --git a/src/test/ui/const-generics/issues/issue-61747.full.stderr b/src/test/ui/const-generics/issues/issue-61747.full.stderr index 3a266c8e974..b7f66345c4a 100644 --- a/src/test/ui/const-generics/issues/issue-61747.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61747.full.stderr @@ -6,10 +6,9 @@ LL | #![cfg_attr(full, feature(const_generics))] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error: constant expression depends on a generic parameter - --> $DIR/issue-61747.rs:8:23 + --> $DIR/issue-61747.rs:7:23 | LL | fn successor() -> Const<{C + 1}> { | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-61747.min.stderr b/src/test/ui/const-generics/issues/issue-61747.min.stderr index 1de9e71b6eb..b85533ccb46 100644 --- a/src/test/ui/const-generics/issues/issue-61747.min.stderr +++ b/src/test/ui/const-generics/issues/issue-61747.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-61747.rs:8:30 + --> $DIR/issue-61747.rs:7:30 | LL | fn successor() -> Const<{C + 1}> { | ^ cannot perform const operation using `C` diff --git a/src/test/ui/const-generics/issues/issue-61747.rs b/src/test/ui/const-generics/issues/issue-61747.rs index 3a4dd1cdd18..3aa2e6a5c31 100644 --- a/src/test/ui/const-generics/issues/issue-61747.rs +++ b/src/test/ui/const-generics/issues/issue-61747.rs @@ -1,6 +1,5 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete -#![cfg_attr(min, feature(min_const_generics))] struct Const; diff --git a/src/test/ui/const-generics/issues/issue-61935.full.stderr b/src/test/ui/const-generics/issues/issue-61935.full.stderr index b805bc0db7e..b970f4e4c8e 100644 --- a/src/test/ui/const-generics/issues/issue-61935.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61935.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-61935.rs:10:14 + --> $DIR/issue-61935.rs:9:14 | LL | Self:FooImpl<{N==0}> | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-61935.min.stderr b/src/test/ui/const-generics/issues/issue-61935.min.stderr index b1d92056a54..9382dca3153 100644 --- a/src/test/ui/const-generics/issues/issue-61935.min.stderr +++ b/src/test/ui/const-generics/issues/issue-61935.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-61935.rs:10:23 + --> $DIR/issue-61935.rs:9:23 | LL | Self:FooImpl<{N==0}> | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/issues/issue-61935.rs b/src/test/ui/const-generics/issues/issue-61935.rs index 9fa02329a71..ed861c63bf1 100644 --- a/src/test/ui/const-generics/issues/issue-61935.rs +++ b/src/test/ui/const-generics/issues/issue-61935.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Foo {} diff --git a/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs b/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs index a8fa3780356..1a0e46e599d 100644 --- a/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs +++ b/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs @@ -3,7 +3,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub trait BitLen: Sized { const BIT_LEN: usize; diff --git a/src/test/ui/const-generics/issues/issue-62220.full.stderr b/src/test/ui/const-generics/issues/issue-62220.full.stderr index 120aa8e4af5..373360c7ced 100644 --- a/src/test/ui/const-generics/issues/issue-62220.full.stderr +++ b/src/test/ui/const-generics/issues/issue-62220.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-62220.rs:13:27 + --> $DIR/issue-62220.rs:12:27 | LL | pub fn trunc(self) -> (TruncatedVector, T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-62220.min.stderr b/src/test/ui/const-generics/issues/issue-62220.min.stderr index b338cdb87e1..72311d030cf 100644 --- a/src/test/ui/const-generics/issues/issue-62220.min.stderr +++ b/src/test/ui/const-generics/issues/issue-62220.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-62220.rs:8:59 + --> $DIR/issue-62220.rs:7:59 | LL | pub type TruncatedVector = Vector; | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/issues/issue-62220.rs b/src/test/ui/const-generics/issues/issue-62220.rs index 2017473fa9e..c26784c9813 100644 --- a/src/test/ui/const-generics/issues/issue-62220.rs +++ b/src/test/ui/const-generics/issues/issue-62220.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct Vector([T; N]); diff --git a/src/test/ui/const-generics/issues/issue-62456.full.stderr b/src/test/ui/const-generics/issues/issue-62456.full.stderr index a8d44074db9..833e70ca6d3 100644 --- a/src/test/ui/const-generics/issues/issue-62456.full.stderr +++ b/src/test/ui/const-generics/issues/issue-62456.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-62456.rs:7:20 + --> $DIR/issue-62456.rs:6:20 | LL | let _ = [0u64; N + 1]; | ^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-62456.min.stderr b/src/test/ui/const-generics/issues/issue-62456.min.stderr index a4b501a7bb1..920318fa0ac 100644 --- a/src/test/ui/const-generics/issues/issue-62456.min.stderr +++ b/src/test/ui/const-generics/issues/issue-62456.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-62456.rs:7:20 + --> $DIR/issue-62456.rs:6:20 | LL | let _ = [0u64; N + 1]; | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/issues/issue-62456.rs b/src/test/ui/const-generics/issues/issue-62456.rs index cbb2a11a931..e24cf36c8ce 100644 --- a/src/test/ui/const-generics/issues/issue-62456.rs +++ b/src/test/ui/const-generics/issues/issue-62456.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn foo() { let _ = [0u64; N + 1]; diff --git a/src/test/ui/const-generics/issues/issue-62504.full.stderr b/src/test/ui/const-generics/issues/issue-62504.full.stderr index 9c84f06ce9f..f09af76325e 100644 --- a/src/test/ui/const-generics/issues/issue-62504.full.stderr +++ b/src/test/ui/const-generics/issues/issue-62504.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-62504.rs:19:25 + --> $DIR/issue-62504.rs:18:25 | LL | ArrayHolder([0; Self::SIZE]) | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-62504.min.stderr b/src/test/ui/const-generics/issues/issue-62504.min.stderr index 865eaf74932..5d45e302888 100644 --- a/src/test/ui/const-generics/issues/issue-62504.min.stderr +++ b/src/test/ui/const-generics/issues/issue-62504.min.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-62504.rs:19:21 + --> $DIR/issue-62504.rs:18:21 | LL | ArrayHolder([0; Self::SIZE]) | ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE` @@ -8,7 +8,7 @@ LL | ArrayHolder([0; Self::SIZE]) found array `[u32; _]` error: constant expression depends on a generic parameter - --> $DIR/issue-62504.rs:19:25 + --> $DIR/issue-62504.rs:18:25 | LL | ArrayHolder([0; Self::SIZE]) | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-62504.rs b/src/test/ui/const-generics/issues/issue-62504.rs index 5630962ff53..0b95754cab4 100644 --- a/src/test/ui/const-generics/issues/issue-62504.rs +++ b/src/test/ui/const-generics/issues/issue-62504.rs @@ -2,7 +2,6 @@ #![allow(incomplete_features)] #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait HasSize { const SIZE: usize; diff --git a/src/test/ui/const-generics/issues/issue-62579-no-match.min.stderr b/src/test/ui/const-generics/issues/issue-62579-no-match.min.stderr index 5117e20d626..a0aee4821c6 100644 --- a/src/test/ui/const-generics/issues/issue-62579-no-match.min.stderr +++ b/src/test/ui/const-generics/issues/issue-62579-no-match.min.stderr @@ -1,5 +1,5 @@ error: `NoMatch` is forbidden as the type of a const generic parameter - --> $DIR/issue-62579-no-match.rs:10:17 + --> $DIR/issue-62579-no-match.rs:9:17 | LL | fn foo() -> bool { | ^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-62579-no-match.rs b/src/test/ui/const-generics/issues/issue-62579-no-match.rs index c9853aa9162..46813f5256e 100644 --- a/src/test/ui/const-generics/issues/issue-62579-no-match.rs +++ b/src/test/ui/const-generics/issues/issue-62579-no-match.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #[derive(PartialEq, Eq)] struct NoMatch; diff --git a/src/test/ui/const-generics/issues/issue-62878.full.stderr b/src/test/ui/const-generics/issues/issue-62878.full.stderr index dce2e27c71a..6e6aa196633 100644 --- a/src/test/ui/const-generics/issues/issue-62878.full.stderr +++ b/src/test/ui/const-generics/issues/issue-62878.full.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-62878.rs:6:38 + --> $DIR/issue-62878.rs:5:38 | LL | fn foo() {} | ^ the type must not depend on the parameter `N` error[E0747]: type provided when a constant was expected - --> $DIR/issue-62878.rs:11:11 + --> $DIR/issue-62878.rs:10:11 | LL | foo::<_, {[1]}>(); | ^ @@ -13,7 +13,7 @@ LL | foo::<_, {[1]}>(); = help: const arguments cannot yet be inferred with `_` error[E0308]: mismatched types - --> $DIR/issue-62878.rs:11:15 + --> $DIR/issue-62878.rs:10:15 | LL | foo::<_, {[1]}>(); | ^^^ expected `usize`, found array `[{integer}; 1]` diff --git a/src/test/ui/const-generics/issues/issue-62878.min.stderr b/src/test/ui/const-generics/issues/issue-62878.min.stderr index 9f95e5d8862..920d7e43b9b 100644 --- a/src/test/ui/const-generics/issues/issue-62878.min.stderr +++ b/src/test/ui/const-generics/issues/issue-62878.min.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-62878.rs:6:38 + --> $DIR/issue-62878.rs:5:38 | LL | fn foo() {} | ^ the type must not depend on the parameter `N` error: `[u8; _]` is forbidden as the type of a const generic parameter - --> $DIR/issue-62878.rs:6:33 + --> $DIR/issue-62878.rs:5:33 | LL | fn foo() {} | ^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-62878.rs b/src/test/ui/const-generics/issues/issue-62878.rs index c087711e5f9..a70606c4a7d 100644 --- a/src/test/ui/const-generics/issues/issue-62878.rs +++ b/src/test/ui/const-generics/issues/issue-62878.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn foo() {} //~^ ERROR the type of const parameters must not diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr index a20c7264acf..e1c20e6ae78 100644 --- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr +++ b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr @@ -1,5 +1,5 @@ error[E0741]: `&'static (dyn A + 'static)` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter - --> $DIR/issue-63322-forbid-dyn.rs:10:18 + --> $DIR/issue-63322-forbid-dyn.rs:9:18 | LL | fn test() { | ^^^^^^^^^^^^^^ `&'static (dyn A + 'static)` doesn't derive both `PartialEq` and `Eq` diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr index 5dbfdc6d652..543e4b29a16 100644 --- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr +++ b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr @@ -1,5 +1,5 @@ error: `&'static (dyn A + 'static)` is forbidden as the type of a const generic parameter - --> $DIR/issue-63322-forbid-dyn.rs:10:18 + --> $DIR/issue-63322-forbid-dyn.rs:9:18 | LL | fn test() { | ^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | fn test() { = help: more complex types are supported with `#[feature(const_generics)]` error[E0741]: `&'static (dyn A + 'static)` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter - --> $DIR/issue-63322-forbid-dyn.rs:10:18 + --> $DIR/issue-63322-forbid-dyn.rs:9:18 | LL | fn test() { | ^^^^^^^^^^^^^^ `&'static (dyn A + 'static)` doesn't derive both `PartialEq` and `Eq` diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs index 2194eb97a41..334e2aac02a 100644 --- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs +++ b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait A {} struct B; diff --git a/src/test/ui/const-generics/issues/issue-64494.full.stderr b/src/test/ui/const-generics/issues/issue-64494.full.stderr index a97ec9308f8..abb26d6cf17 100644 --- a/src/test/ui/const-generics/issues/issue-64494.full.stderr +++ b/src/test/ui/const-generics/issues/issue-64494.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-64494.rs:16:53 + --> $DIR/issue-64494.rs:15:53 | LL | impl MyTrait for T where Is<{T::VAL == 5}>: True {} | ^^^^ @@ -7,7 +7,7 @@ LL | impl MyTrait for T where Is<{T::VAL == 5}>: True {} = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/issue-64494.rs:19:53 + --> $DIR/issue-64494.rs:18:53 | LL | impl MyTrait for T where Is<{T::VAL == 6}>: True {} | ^^^^ diff --git a/src/test/ui/const-generics/issues/issue-64494.min.stderr b/src/test/ui/const-generics/issues/issue-64494.min.stderr index 681166b1d2b..936ab7f6e7e 100644 --- a/src/test/ui/const-generics/issues/issue-64494.min.stderr +++ b/src/test/ui/const-generics/issues/issue-64494.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-64494.rs:16:38 + --> $DIR/issue-64494.rs:15:38 | LL | impl MyTrait for T where Is<{T::VAL == 5}>: True {} | ^^^^^^ cannot perform const operation using `T` @@ -8,7 +8,7 @@ LL | impl MyTrait for T where Is<{T::VAL == 5}>: True {} = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-64494.rs:19:38 + --> $DIR/issue-64494.rs:18:38 | LL | impl MyTrait for T where Is<{T::VAL == 6}>: True {} | ^^^^^^ cannot perform const operation using `T` @@ -17,7 +17,7 @@ LL | impl MyTrait for T where Is<{T::VAL == 6}>: True {} = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0119]: conflicting implementations of trait `MyTrait`: - --> $DIR/issue-64494.rs:19:1 + --> $DIR/issue-64494.rs:18:1 | LL | impl MyTrait for T where Is<{T::VAL == 5}>: True {} | ------------------------------------ first implementation here diff --git a/src/test/ui/const-generics/issues/issue-64494.rs b/src/test/ui/const-generics/issues/issue-64494.rs index 014742be03d..96d19203109 100644 --- a/src/test/ui/const-generics/issues/issue-64494.rs +++ b/src/test/ui/const-generics/issues/issue-64494.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Foo { const VAL: usize; diff --git a/src/test/ui/const-generics/issues/issue-64519.rs b/src/test/ui/const-generics/issues/issue-64519.rs index 1ca709d0975..8c603b74b90 100644 --- a/src/test/ui/const-generics/issues/issue-64519.rs +++ b/src/test/ui/const-generics/issues/issue-64519.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo { state: Option<[u8; D]>, diff --git a/src/test/ui/const-generics/issues/issue-66205.full.stderr b/src/test/ui/const-generics/issues/issue-66205.full.stderr index a1520912e4e..7e150f5f6db 100644 --- a/src/test/ui/const-generics/issues/issue-66205.full.stderr +++ b/src/test/ui/const-generics/issues/issue-66205.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-66205.rs:8:12 + --> $DIR/issue-66205.rs:7:12 | LL | fact::<{ N - 1 }>(); | ^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-66205.min.stderr b/src/test/ui/const-generics/issues/issue-66205.min.stderr index ecd96ac37e4..b41793b62d2 100644 --- a/src/test/ui/const-generics/issues/issue-66205.min.stderr +++ b/src/test/ui/const-generics/issues/issue-66205.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-66205.rs:8:14 + --> $DIR/issue-66205.rs:7:14 | LL | fact::<{ N - 1 }>(); | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/issues/issue-66205.rs b/src/test/ui/const-generics/issues/issue-66205.rs index 4e37c247d00..14249b62cee 100644 --- a/src/test/ui/const-generics/issues/issue-66205.rs +++ b/src/test/ui/const-generics/issues/issue-66205.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![allow(dead_code, unconditional_recursion)] fn fact() { diff --git a/src/test/ui/const-generics/issues/issue-66906.rs b/src/test/ui/const-generics/issues/issue-66906.rs index 3e048593c9b..a871b118dcc 100644 --- a/src/test/ui/const-generics/issues/issue-66906.rs +++ b/src/test/ui/const-generics/issues/issue-66906.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct Tuple; diff --git a/src/test/ui/const-generics/issues/issue-67185-1.rs b/src/test/ui/const-generics/issues/issue-67185-1.rs index 09d88ef89a3..ed35a5f7c0a 100644 --- a/src/test/ui/const-generics/issues/issue-67185-1.rs +++ b/src/test/ui/const-generics/issues/issue-67185-1.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Baz { type Quaks; diff --git a/src/test/ui/const-generics/issues/issue-67185-2.full.stderr b/src/test/ui/const-generics/issues/issue-67185-2.full.stderr index 78c7ebff059..fa9c680d4b8 100644 --- a/src/test/ui/const-generics/issues/issue-67185-2.full.stderr +++ b/src/test/ui/const-generics/issues/issue-67185-2.full.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:17:1 + --> $DIR/issue-67185-2.rs:16:1 | LL | / trait Foo LL | | @@ -17,7 +17,7 @@ LL | | } = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:17:1 + --> $DIR/issue-67185-2.rs:16:1 | LL | / trait Foo LL | | @@ -35,7 +35,7 @@ LL | | } = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:27:6 + --> $DIR/issue-67185-2.rs:26:6 | LL | trait Foo | --- required by a bound in this @@ -51,7 +51,7 @@ LL | impl Foo for FooImpl {} <[u16; 4] as Bar> error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:27:6 + --> $DIR/issue-67185-2.rs:26:6 | LL | trait Foo | --- required by a bound in this @@ -67,7 +67,7 @@ LL | impl Foo for FooImpl {} <[u16; 4] as Bar> error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:31:14 + --> $DIR/issue-67185-2.rs:30:14 | LL | trait Foo | --- required by a bound in this @@ -83,7 +83,7 @@ LL | fn f(_: impl Foo) {} <[u16; 4] as Bar> error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:31:14 + --> $DIR/issue-67185-2.rs:30:14 | LL | trait Foo | --- required by a bound in this diff --git a/src/test/ui/const-generics/issues/issue-67185-2.min.stderr b/src/test/ui/const-generics/issues/issue-67185-2.min.stderr index 78c7ebff059..fa9c680d4b8 100644 --- a/src/test/ui/const-generics/issues/issue-67185-2.min.stderr +++ b/src/test/ui/const-generics/issues/issue-67185-2.min.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:17:1 + --> $DIR/issue-67185-2.rs:16:1 | LL | / trait Foo LL | | @@ -17,7 +17,7 @@ LL | | } = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:17:1 + --> $DIR/issue-67185-2.rs:16:1 | LL | / trait Foo LL | | @@ -35,7 +35,7 @@ LL | | } = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:27:6 + --> $DIR/issue-67185-2.rs:26:6 | LL | trait Foo | --- required by a bound in this @@ -51,7 +51,7 @@ LL | impl Foo for FooImpl {} <[u16; 4] as Bar> error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:27:6 + --> $DIR/issue-67185-2.rs:26:6 | LL | trait Foo | --- required by a bound in this @@ -67,7 +67,7 @@ LL | impl Foo for FooImpl {} <[u16; 4] as Bar> error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:31:14 + --> $DIR/issue-67185-2.rs:30:14 | LL | trait Foo | --- required by a bound in this @@ -83,7 +83,7 @@ LL | fn f(_: impl Foo) {} <[u16; 4] as Bar> error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:31:14 + --> $DIR/issue-67185-2.rs:30:14 | LL | trait Foo | --- required by a bound in this diff --git a/src/test/ui/const-generics/issues/issue-67185-2.rs b/src/test/ui/const-generics/issues/issue-67185-2.rs index 1176d0c6904..94a713d7cf9 100644 --- a/src/test/ui/const-generics/issues/issue-67185-2.rs +++ b/src/test/ui/const-generics/issues/issue-67185-2.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Baz { type Quaks; diff --git a/src/test/ui/const-generics/issues/issue-67739.full.stderr b/src/test/ui/const-generics/issues/issue-67739.full.stderr index 27a56b8eb02..dcbe5b94a62 100644 --- a/src/test/ui/const-generics/issues/issue-67739.full.stderr +++ b/src/test/ui/const-generics/issues/issue-67739.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-67739.rs:12:15 + --> $DIR/issue-67739.rs:11:15 | LL | [0u8; mem::size_of::()]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-67739.min.stderr b/src/test/ui/const-generics/issues/issue-67739.min.stderr index 27a56b8eb02..dcbe5b94a62 100644 --- a/src/test/ui/const-generics/issues/issue-67739.min.stderr +++ b/src/test/ui/const-generics/issues/issue-67739.min.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-67739.rs:12:15 + --> $DIR/issue-67739.rs:11:15 | LL | [0u8; mem::size_of::()]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-67739.rs b/src/test/ui/const-generics/issues/issue-67739.rs index 0f5860f22fd..e4960e56c9e 100644 --- a/src/test/ui/const-generics/issues/issue-67739.rs +++ b/src/test/ui/const-generics/issues/issue-67739.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::mem; diff --git a/src/test/ui/const-generics/issues/issue-68366.full.stderr b/src/test/ui/const-generics/issues/issue-68366.full.stderr index ac774f50c74..4015fb090b9 100644 --- a/src/test/ui/const-generics/issues/issue-68366.full.stderr +++ b/src/test/ui/const-generics/issues/issue-68366.full.stderr @@ -1,5 +1,5 @@ error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-68366.rs:12:13 + --> $DIR/issue-68366.rs:11:13 | LL | impl Collatz<{Some(N)}> {} | ^ unconstrained const parameter @@ -8,7 +8,7 @@ LL | impl Collatz<{Some(N)}> {} = note: proving the result of expressions other than the parameter are unique is not supported error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-68366.rs:18:12 + --> $DIR/issue-68366.rs:17:12 | LL | impl Foo {} | ^ unconstrained const parameter diff --git a/src/test/ui/const-generics/issues/issue-68366.min.stderr b/src/test/ui/const-generics/issues/issue-68366.min.stderr index acaf4a33ee0..da4cbd3081f 100644 --- a/src/test/ui/const-generics/issues/issue-68366.min.stderr +++ b/src/test/ui/const-generics/issues/issue-68366.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-68366.rs:12:37 + --> $DIR/issue-68366.rs:11:37 | LL | impl Collatz<{Some(N)}> {} | ^ cannot perform const operation using `N` @@ -8,7 +8,7 @@ LL | impl Collatz<{Some(N)}> {} = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-68366.rs:12:13 + --> $DIR/issue-68366.rs:11:13 | LL | impl Collatz<{Some(N)}> {} | ^ unconstrained const parameter @@ -17,7 +17,7 @@ LL | impl Collatz<{Some(N)}> {} = note: proving the result of expressions other than the parameter are unique is not supported error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-68366.rs:18:12 + --> $DIR/issue-68366.rs:17:12 | LL | impl Foo {} | ^ unconstrained const parameter diff --git a/src/test/ui/const-generics/issues/issue-68366.rs b/src/test/ui/const-generics/issues/issue-68366.rs index 474cdb7258d..37afed62327 100644 --- a/src/test/ui/const-generics/issues/issue-68366.rs +++ b/src/test/ui/const-generics/issues/issue-68366.rs @@ -5,7 +5,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Collatz>; diff --git a/src/test/ui/const-generics/issues/issue-68596.rs b/src/test/ui/const-generics/issues/issue-68596.rs index 3b27d4d68c5..0bb23be1eb4 100644 --- a/src/test/ui/const-generics/issues/issue-68596.rs +++ b/src/test/ui/const-generics/issues/issue-68596.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct S(u8); diff --git a/src/test/ui/const-generics/issues/issue-68615-adt.min.stderr b/src/test/ui/const-generics/issues/issue-68615-adt.min.stderr index 59653114a6b..2de8ada2766 100644 --- a/src/test/ui/const-generics/issues/issue-68615-adt.min.stderr +++ b/src/test/ui/const-generics/issues/issue-68615-adt.min.stderr @@ -1,5 +1,5 @@ error: `[usize; 0]` is forbidden as the type of a const generic parameter - --> $DIR/issue-68615-adt.rs:7:23 + --> $DIR/issue-68615-adt.rs:6:23 | LL | struct Const {} | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-68615-adt.rs b/src/test/ui/const-generics/issues/issue-68615-adt.rs index d616f3ab95a..ddea3e8ab65 100644 --- a/src/test/ui/const-generics/issues/issue-68615-adt.rs +++ b/src/test/ui/const-generics/issues/issue-68615-adt.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Const {} //[min]~^ ERROR `[usize; 0]` is forbidden as the type of a const generic parameter diff --git a/src/test/ui/const-generics/issues/issue-68615-array.min.stderr b/src/test/ui/const-generics/issues/issue-68615-array.min.stderr index 1ee881b96ec..0d17b04a5cd 100644 --- a/src/test/ui/const-generics/issues/issue-68615-array.min.stderr +++ b/src/test/ui/const-generics/issues/issue-68615-array.min.stderr @@ -1,5 +1,5 @@ error: `[usize; 0]` is forbidden as the type of a const generic parameter - --> $DIR/issue-68615-array.rs:7:21 + --> $DIR/issue-68615-array.rs:6:21 | LL | struct Foo {} | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-68615-array.rs b/src/test/ui/const-generics/issues/issue-68615-array.rs index 24c9a59a185..56afd9b2a15 100644 --- a/src/test/ui/const-generics/issues/issue-68615-array.rs +++ b/src/test/ui/const-generics/issues/issue-68615-array.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo {} //[min]~^ ERROR `[usize; 0]` is forbidden as the type of a const generic parameter diff --git a/src/test/ui/const-generics/issues/issue-68977.full.stderr b/src/test/ui/const-generics/issues/issue-68977.full.stderr index 3690bac3eb3..25dcd88a4af 100644 --- a/src/test/ui/const-generics/issues/issue-68977.full.stderr +++ b/src/test/ui/const-generics/issues/issue-68977.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-68977.rs:35:44 + --> $DIR/issue-68977.rs:34:44 | LL | FxpStorageHelper: FxpStorage, | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-68977.min.stderr b/src/test/ui/const-generics/issues/issue-68977.min.stderr index ea91df1e0bf..0b3d5b9a760 100644 --- a/src/test/ui/const-generics/issues/issue-68977.min.stderr +++ b/src/test/ui/const-generics/issues/issue-68977.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-68977.rs:29:17 + --> $DIR/issue-68977.rs:28:17 | LL | PhantomU8<{(INT_BITS + FRAC_BITS + 7) / 8}>; | ^^^^^^^^ cannot perform const operation using `INT_BITS` @@ -8,7 +8,7 @@ LL | PhantomU8<{(INT_BITS + FRAC_BITS + 7) / 8}>; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-68977.rs:29:28 + --> $DIR/issue-68977.rs:28:28 | LL | PhantomU8<{(INT_BITS + FRAC_BITS + 7) / 8}>; | ^^^^^^^^^ cannot perform const operation using `FRAC_BITS` diff --git a/src/test/ui/const-generics/issues/issue-68977.rs b/src/test/ui/const-generics/issues/issue-68977.rs index 4fea94cb465..a0ffcc84c7a 100644 --- a/src/test/ui/const-generics/issues/issue-68977.rs +++ b/src/test/ui/const-generics/issues/issue-68977.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct PhantomU8; diff --git a/src/test/ui/const-generics/issues/issue-70125-1.rs b/src/test/ui/const-generics/issues/issue-70125-1.rs index 04175089dc0..5c118d245a1 100644 --- a/src/test/ui/const-generics/issues/issue-70125-1.rs +++ b/src/test/ui/const-generics/issues/issue-70125-1.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] const L: usize = 4; diff --git a/src/test/ui/const-generics/issues/issue-70125-2.rs b/src/test/ui/const-generics/issues/issue-70125-2.rs index ceefc2dcb32..f82131262d6 100644 --- a/src/test/ui/const-generics/issues/issue-70125-2.rs +++ b/src/test/ui/const-generics/issues/issue-70125-2.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn main() { <()>::foo(); diff --git a/src/test/ui/const-generics/issues/issue-70167.rs b/src/test/ui/const-generics/issues/issue-70167.rs index 04c76a4dcaf..9e912b69177 100644 --- a/src/test/ui/const-generics/issues/issue-70167.rs +++ b/src/test/ui/const-generics/issues/issue-70167.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub trait Trait: From<>::Item> { type Item; diff --git a/src/test/ui/const-generics/issues/issue-71169.full.stderr b/src/test/ui/const-generics/issues/issue-71169.full.stderr index b87825d20ce..7b1a2f98dfe 100644 --- a/src/test/ui/const-generics/issues/issue-71169.full.stderr +++ b/src/test/ui/const-generics/issues/issue-71169.full.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-71169.rs:6:43 + --> $DIR/issue-71169.rs:5:43 | LL | fn foo() {} | ^^^ the type must not depend on the parameter `LEN` error: constant expression depends on a generic parameter - --> $DIR/issue-71169.rs:11:14 + --> $DIR/issue-71169.rs:10:14 | LL | foo::<4, DATA>(); | ^^^^ diff --git a/src/test/ui/const-generics/issues/issue-71169.min.stderr b/src/test/ui/const-generics/issues/issue-71169.min.stderr index 9b0a2946ca6..68ac47460b3 100644 --- a/src/test/ui/const-generics/issues/issue-71169.min.stderr +++ b/src/test/ui/const-generics/issues/issue-71169.min.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-71169.rs:6:43 + --> $DIR/issue-71169.rs:5:43 | LL | fn foo() {} | ^^^ the type must not depend on the parameter `LEN` error: `[u8; _]` is forbidden as the type of a const generic parameter - --> $DIR/issue-71169.rs:6:38 + --> $DIR/issue-71169.rs:5:38 | LL | fn foo() {} | ^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-71169.rs b/src/test/ui/const-generics/issues/issue-71169.rs index 7007ec222ca..a574da4b6b3 100644 --- a/src/test/ui/const-generics/issues/issue-71169.rs +++ b/src/test/ui/const-generics/issues/issue-71169.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn foo() {} //~^ ERROR the type of const parameters must not diff --git a/src/test/ui/const-generics/issues/issue-71381.full.stderr b/src/test/ui/const-generics/issues/issue-71381.full.stderr index 453ef00e6dc..3950317b370 100644 --- a/src/test/ui/const-generics/issues/issue-71381.full.stderr +++ b/src/test/ui/const-generics/issues/issue-71381.full.stderr @@ -1,23 +1,23 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-71381.rs:15:82 + --> $DIR/issue-71381.rs:14:82 | LL | pub fn call_me(&self) { | ^^^^ the type must not depend on the parameter `Args` error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-71381.rs:24:40 + --> $DIR/issue-71381.rs:23:40 | LL | const FN: unsafe extern "C" fn(Args), | ^^^^ the type must not depend on the parameter `Args` error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71381.rs:15:61 + --> $DIR/issue-71381.rs:14:61 | LL | pub fn call_me(&self) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71381.rs:24:19 + --> $DIR/issue-71381.rs:23:19 | LL | const FN: unsafe extern "C" fn(Args), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-71381.min.stderr b/src/test/ui/const-generics/issues/issue-71381.min.stderr index 453ef00e6dc..3950317b370 100644 --- a/src/test/ui/const-generics/issues/issue-71381.min.stderr +++ b/src/test/ui/const-generics/issues/issue-71381.min.stderr @@ -1,23 +1,23 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-71381.rs:15:82 + --> $DIR/issue-71381.rs:14:82 | LL | pub fn call_me(&self) { | ^^^^ the type must not depend on the parameter `Args` error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-71381.rs:24:40 + --> $DIR/issue-71381.rs:23:40 | LL | const FN: unsafe extern "C" fn(Args), | ^^^^ the type must not depend on the parameter `Args` error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71381.rs:15:61 + --> $DIR/issue-71381.rs:14:61 | LL | pub fn call_me(&self) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71381.rs:24:19 + --> $DIR/issue-71381.rs:23:19 | LL | const FN: unsafe extern "C" fn(Args), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-71381.rs b/src/test/ui/const-generics/issues/issue-71381.rs index 65d88e553b9..f015d694695 100644 --- a/src/test/ui/const-generics/issues/issue-71381.rs +++ b/src/test/ui/const-generics/issues/issue-71381.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Test(*const usize); diff --git a/src/test/ui/const-generics/issues/issue-71382.full.stderr b/src/test/ui/const-generics/issues/issue-71382.full.stderr index 3da85ee040d..715037bd5f1 100644 --- a/src/test/ui/const-generics/issues/issue-71382.full.stderr +++ b/src/test/ui/const-generics/issues/issue-71382.full.stderr @@ -1,5 +1,5 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71382.rs:17:23 + --> $DIR/issue-71382.rs:16:23 | LL | fn test(&self) { | ^^^^ diff --git a/src/test/ui/const-generics/issues/issue-71382.min.stderr b/src/test/ui/const-generics/issues/issue-71382.min.stderr index 3da85ee040d..715037bd5f1 100644 --- a/src/test/ui/const-generics/issues/issue-71382.min.stderr +++ b/src/test/ui/const-generics/issues/issue-71382.min.stderr @@ -1,5 +1,5 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71382.rs:17:23 + --> $DIR/issue-71382.rs:16:23 | LL | fn test(&self) { | ^^^^ diff --git a/src/test/ui/const-generics/issues/issue-71382.rs b/src/test/ui/const-generics/issues/issue-71382.rs index 12a7d08382a..3a56db937de 100644 --- a/src/test/ui/const-generics/issues/issue-71382.rs +++ b/src/test/ui/const-generics/issues/issue-71382.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Test(); diff --git a/src/test/ui/const-generics/issues/issue-71611.full.stderr b/src/test/ui/const-generics/issues/issue-71611.full.stderr index 48d4bb361a1..01a85b745ce 100644 --- a/src/test/ui/const-generics/issues/issue-71611.full.stderr +++ b/src/test/ui/const-generics/issues/issue-71611.full.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-71611.rs:6:31 + --> $DIR/issue-71611.rs:5:31 | LL | fn func(outer: A) { | ^ the type must not depend on the parameter `A` error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71611.rs:6:21 + --> $DIR/issue-71611.rs:5:21 | LL | fn func(outer: A) { | ^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-71611.min.stderr b/src/test/ui/const-generics/issues/issue-71611.min.stderr index 48d4bb361a1..01a85b745ce 100644 --- a/src/test/ui/const-generics/issues/issue-71611.min.stderr +++ b/src/test/ui/const-generics/issues/issue-71611.min.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/issue-71611.rs:6:31 + --> $DIR/issue-71611.rs:5:31 | LL | fn func(outer: A) { | ^ the type must not depend on the parameter `A` error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71611.rs:6:21 + --> $DIR/issue-71611.rs:5:21 | LL | fn func(outer: A) { | ^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-71611.rs b/src/test/ui/const-generics/issues/issue-71611.rs index 9b8e8be6bc6..6468d0b6bda 100644 --- a/src/test/ui/const-generics/issues/issue-71611.rs +++ b/src/test/ui/const-generics/issues/issue-71611.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn func(outer: A) { //~^ ERROR: using function pointers as const generic parameters is forbidden diff --git a/src/test/ui/const-generics/issues/issue-72352.full.stderr b/src/test/ui/const-generics/issues/issue-72352.full.stderr index 51f94678467..eedd73c4dcc 100644 --- a/src/test/ui/const-generics/issues/issue-72352.full.stderr +++ b/src/test/ui/const-generics/issues/issue-72352.full.stderr @@ -1,5 +1,5 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-72352.rs:8:42 + --> $DIR/issue-72352.rs:7:42 | LL | unsafe fn unsafely_do_the_thing usize>(ptr: *const i8) -> usize { | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-72352.min.stderr b/src/test/ui/const-generics/issues/issue-72352.min.stderr index 51f94678467..eedd73c4dcc 100644 --- a/src/test/ui/const-generics/issues/issue-72352.min.stderr +++ b/src/test/ui/const-generics/issues/issue-72352.min.stderr @@ -1,5 +1,5 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-72352.rs:8:42 + --> $DIR/issue-72352.rs:7:42 | LL | unsafe fn unsafely_do_the_thing usize>(ptr: *const i8) -> usize { | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-72352.rs b/src/test/ui/const-generics/issues/issue-72352.rs index 1517f3dae4f..9cd95c11026 100644 --- a/src/test/ui/const-generics/issues/issue-72352.rs +++ b/src/test/ui/const-generics/issues/issue-72352.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::ffi::{CStr, CString}; diff --git a/src/test/ui/const-generics/issues/issue-72787.full.stderr b/src/test/ui/const-generics/issues/issue-72787.full.stderr index b4c79d4171b..fbb7ae59bef 100644 --- a/src/test/ui/const-generics/issues/issue-72787.full.stderr +++ b/src/test/ui/const-generics/issues/issue-72787.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-72787.rs:11:32 + --> $DIR/issue-72787.rs:10:32 | LL | Condition<{ LHS <= RHS }>: True | ^^^^ @@ -7,7 +7,7 @@ LL | Condition<{ LHS <= RHS }>: True = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/issue-72787.rs:26:42 + --> $DIR/issue-72787.rs:25:42 | LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, | ^^^^ @@ -15,7 +15,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/issue-72787.rs:26:42 + --> $DIR/issue-72787.rs:25:42 | LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, | ^^^^ @@ -23,7 +23,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/issue-72787.rs:26:42 + --> $DIR/issue-72787.rs:25:42 | LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, | ^^^^ @@ -31,7 +31,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/issue-72787.rs:26:42 + --> $DIR/issue-72787.rs:25:42 | LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, | ^^^^ diff --git a/src/test/ui/const-generics/issues/issue-72787.min.stderr b/src/test/ui/const-generics/issues/issue-72787.min.stderr index 27bbc28011f..aadf19ba6b6 100644 --- a/src/test/ui/const-generics/issues/issue-72787.min.stderr +++ b/src/test/ui/const-generics/issues/issue-72787.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-72787.rs:11:17 + --> $DIR/issue-72787.rs:10:17 | LL | Condition<{ LHS <= RHS }>: True | ^^^ cannot perform const operation using `LHS` @@ -8,7 +8,7 @@ LL | Condition<{ LHS <= RHS }>: True = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-72787.rs:11:24 + --> $DIR/issue-72787.rs:10:24 | LL | Condition<{ LHS <= RHS }>: True | ^^^ cannot perform const operation using `RHS` @@ -17,7 +17,7 @@ LL | Condition<{ LHS <= RHS }>: True = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-72787.rs:26:25 + --> $DIR/issue-72787.rs:25:25 | LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, | ^ cannot perform const operation using `I` @@ -26,7 +26,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-72787.rs:26:36 + --> $DIR/issue-72787.rs:25:36 | LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, | ^ cannot perform const operation using `J` @@ -35,7 +35,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0283]: type annotations needed - --> $DIR/issue-72787.rs:22:26 + --> $DIR/issue-72787.rs:21:26 | LL | pub trait True {} | -------------- required by this bound in `True` @@ -46,7 +46,7 @@ LL | IsLessOrEqual: True, = note: cannot satisfy `IsLessOrEqual: True` error[E0283]: type annotations needed - --> $DIR/issue-72787.rs:22:26 + --> $DIR/issue-72787.rs:21:26 | LL | pub trait True {} | -------------- required by this bound in `True` diff --git a/src/test/ui/const-generics/issues/issue-72787.rs b/src/test/ui/const-generics/issues/issue-72787.rs index 57572e23aa4..16bc9470470 100644 --- a/src/test/ui/const-generics/issues/issue-72787.rs +++ b/src/test/ui/const-generics/issues/issue-72787.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct IsLessOrEqual; pub struct Condition; diff --git a/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.full.stderr b/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.full.stderr index b4994004721..82f9b9d346d 100644 --- a/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.full.stderr +++ b/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-72819-generic-in-const-eval.rs:9:39 + --> $DIR/issue-72819-generic-in-const-eval.rs:8:39 | LL | where Assert::<{N < usize::MAX / 2}>: IsTrue, | ^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.min.stderr b/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.min.stderr index 8df3c85ec1f..6646be47b31 100644 --- a/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.min.stderr +++ b/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-72819-generic-in-const-eval.rs:9:17 + --> $DIR/issue-72819-generic-in-const-eval.rs:8:17 | LL | where Assert::<{N < usize::MAX / 2}>: IsTrue, | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.rs b/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.rs index 4c0004795f0..f612d8bd3f6 100644 --- a/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.rs +++ b/src/test/ui/const-generics/issues/issue-72819-generic-in-const-eval.rs @@ -3,7 +3,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Arr where Assert::<{N < usize::MAX / 2}>: IsTrue, diff --git a/src/test/ui/const-generics/issues/issue-73491.min.stderr b/src/test/ui/const-generics/issues/issue-73491.min.stderr index 3ff0563acc7..aeab9e26772 100644 --- a/src/test/ui/const-generics/issues/issue-73491.min.stderr +++ b/src/test/ui/const-generics/issues/issue-73491.min.stderr @@ -1,5 +1,5 @@ error: `[u32; _]` is forbidden as the type of a const generic parameter - --> $DIR/issue-73491.rs:9:19 + --> $DIR/issue-73491.rs:8:19 | LL | fn hoge() {} | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-73491.rs b/src/test/ui/const-generics/issues/issue-73491.rs index 4f6c44ad2cd..c7cb92baf30 100644 --- a/src/test/ui/const-generics/issues/issue-73491.rs +++ b/src/test/ui/const-generics/issues/issue-73491.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] const LEN: usize = 1024; diff --git a/src/test/ui/const-generics/issues/issue-73508.full.stderr b/src/test/ui/const-generics/issues/issue-73508.full.stderr index 0816bad35b2..81691a14ef6 100644 --- a/src/test/ui/const-generics/issues/issue-73508.full.stderr +++ b/src/test/ui/const-generics/issues/issue-73508.full.stderr @@ -1,5 +1,5 @@ error: using raw pointers as const generic parameters is forbidden - --> $DIR/issue-73508.rs:6:33 + --> $DIR/issue-73508.rs:5:33 | LL | pub const fn func_name() {} | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-73508.min.stderr b/src/test/ui/const-generics/issues/issue-73508.min.stderr index 0816bad35b2..81691a14ef6 100644 --- a/src/test/ui/const-generics/issues/issue-73508.min.stderr +++ b/src/test/ui/const-generics/issues/issue-73508.min.stderr @@ -1,5 +1,5 @@ error: using raw pointers as const generic parameters is forbidden - --> $DIR/issue-73508.rs:6:33 + --> $DIR/issue-73508.rs:5:33 | LL | pub const fn func_name() {} | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-73508.rs b/src/test/ui/const-generics/issues/issue-73508.rs index 21b87f7f901..f02c4161dc1 100644 --- a/src/test/ui/const-generics/issues/issue-73508.rs +++ b/src/test/ui/const-generics/issues/issue-73508.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub const fn func_name() {} //~^ ERROR using raw pointers diff --git a/src/test/ui/const-generics/issues/issue-74101.min.stderr b/src/test/ui/const-generics/issues/issue-74101.min.stderr index 1351246667e..6561183f7ca 100644 --- a/src/test/ui/const-generics/issues/issue-74101.min.stderr +++ b/src/test/ui/const-generics/issues/issue-74101.min.stderr @@ -1,5 +1,5 @@ error: `[u8; _]` is forbidden as the type of a const generic parameter - --> $DIR/issue-74101.rs:7:18 + --> $DIR/issue-74101.rs:6:18 | LL | fn test() {} | ^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | fn test() {} = help: more complex types are supported with `#[feature(const_generics)]` error: `[u8; _]` is forbidden as the type of a const generic parameter - --> $DIR/issue-74101.rs:10:21 + --> $DIR/issue-74101.rs:9:21 | LL | struct Foo; | ^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-74101.rs b/src/test/ui/const-generics/issues/issue-74101.rs index 2a7d31ac8dd..d4fd72eb6da 100644 --- a/src/test/ui/const-generics/issues/issue-74101.rs +++ b/src/test/ui/const-generics/issues/issue-74101.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn test() {} //[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter diff --git a/src/test/ui/const-generics/issues/issue-74255.min.stderr b/src/test/ui/const-generics/issues/issue-74255.min.stderr index e3e8502ae63..2b6aa7dad97 100644 --- a/src/test/ui/const-generics/issues/issue-74255.min.stderr +++ b/src/test/ui/const-generics/issues/issue-74255.min.stderr @@ -1,5 +1,5 @@ error: `IceEnum` is forbidden as the type of a const generic parameter - --> $DIR/issue-74255.rs:15:31 + --> $DIR/issue-74255.rs:14:31 | LL | fn ice_struct_fn() {} | ^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-74255.rs b/src/test/ui/const-generics/issues/issue-74255.rs index b277c273461..75a876c27e5 100644 --- a/src/test/ui/const-generics/issues/issue-74255.rs +++ b/src/test/ui/const-generics/issues/issue-74255.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #[derive(PartialEq, Eq)] enum IceEnum { diff --git a/src/test/ui/const-generics/issues/issue-74950.min.stderr b/src/test/ui/const-generics/issues/issue-74950.min.stderr index 12947a2ab37..27393d38c6b 100644 --- a/src/test/ui/const-generics/issues/issue-74950.min.stderr +++ b/src/test/ui/const-generics/issues/issue-74950.min.stderr @@ -1,5 +1,5 @@ error: `Inner` is forbidden as the type of a const generic parameter - --> $DIR/issue-74950.rs:18:23 + --> $DIR/issue-74950.rs:17:23 | LL | struct Outer; | ^^^^^ @@ -8,7 +8,7 @@ LL | struct Outer; = help: more complex types are supported with `#[feature(const_generics)]` error: `Inner` is forbidden as the type of a const generic parameter - --> $DIR/issue-74950.rs:18:23 + --> $DIR/issue-74950.rs:17:23 | LL | struct Outer; | ^^^^^ @@ -17,7 +17,7 @@ LL | struct Outer; = help: more complex types are supported with `#[feature(const_generics)]` error: `Inner` is forbidden as the type of a const generic parameter - --> $DIR/issue-74950.rs:18:23 + --> $DIR/issue-74950.rs:17:23 | LL | struct Outer; | ^^^^^ @@ -26,7 +26,7 @@ LL | struct Outer; = help: more complex types are supported with `#[feature(const_generics)]` error: `Inner` is forbidden as the type of a const generic parameter - --> $DIR/issue-74950.rs:18:23 + --> $DIR/issue-74950.rs:17:23 | LL | struct Outer; | ^^^^^ @@ -35,7 +35,7 @@ LL | struct Outer; = help: more complex types are supported with `#[feature(const_generics)]` error: `Inner` is forbidden as the type of a const generic parameter - --> $DIR/issue-74950.rs:18:23 + --> $DIR/issue-74950.rs:17:23 | LL | struct Outer; | ^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-74950.rs b/src/test/ui/const-generics/issues/issue-74950.rs index 39f91f2b83d..91e5cc776fa 100644 --- a/src/test/ui/const-generics/issues/issue-74950.rs +++ b/src/test/ui/const-generics/issues/issue-74950.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #[derive(PartialEq, Eq)] diff --git a/src/test/ui/const-generics/issues/issue-75047.min.stderr b/src/test/ui/const-generics/issues/issue-75047.min.stderr index b87bb18a5a6..4ab90dd1ec6 100644 --- a/src/test/ui/const-generics/issues/issue-75047.min.stderr +++ b/src/test/ui/const-generics/issues/issue-75047.min.stderr @@ -1,5 +1,5 @@ error: `[u8; _]` is forbidden as the type of a const generic parameter - --> $DIR/issue-75047.rs:15:21 + --> $DIR/issue-75047.rs:14:21 | LL | struct Foo::value()]>; | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-75047.rs b/src/test/ui/const-generics/issues/issue-75047.rs index 7bab7cdd098..97437748177 100644 --- a/src/test/ui/const-generics/issues/issue-75047.rs +++ b/src/test/ui/const-generics/issues/issue-75047.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Bar(T); diff --git a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.full.stderr b/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.full.stderr index 089937e66ca..88b8ff89ffe 100644 --- a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.full.stderr +++ b/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/issue-76701-ty-param-in-const.rs:6:21 + --> $DIR/issue-76701-ty-param-in-const.rs:5:21 | LL | fn ty_param() -> [u8; std::mem::size_of::()] { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | fn ty_param() -> [u8; std::mem::size_of::()] { = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/issue-76701-ty-param-in-const.rs:12:37 + --> $DIR/issue-76701-ty-param-in-const.rs:11:37 | LL | fn const_param() -> [u8; N + 1] { | ^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.min.stderr b/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.min.stderr index 551b8e43e1d..32f70fa3007 100644 --- a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.min.stderr +++ b/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-76701-ty-param-in-const.rs:6:46 + --> $DIR/issue-76701-ty-param-in-const.rs:5:46 | LL | fn ty_param() -> [u8; std::mem::size_of::()] { | ^ cannot perform const operation using `T` @@ -8,7 +8,7 @@ LL | fn ty_param() -> [u8; std::mem::size_of::()] { = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-76701-ty-param-in-const.rs:12:42 + --> $DIR/issue-76701-ty-param-in-const.rs:11:42 | LL | fn const_param() -> [u8; N + 1] { | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.rs b/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.rs index 9051c36fe81..99489826563 100644 --- a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.rs +++ b/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn ty_param() -> [u8; std::mem::size_of::()] { //[full]~^ ERROR constant expression depends on a generic parameter diff --git a/src/test/ui/const-generics/issues/issue70273-assoc-fn.rs b/src/test/ui/const-generics/issues/issue70273-assoc-fn.rs index 28f80702dcf..189a32570f7 100644 --- a/src/test/ui/const-generics/issues/issue70273-assoc-fn.rs +++ b/src/test/ui/const-generics/issues/issue70273-assoc-fn.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait T { fn f(); diff --git a/src/test/ui/const-generics/macro_rules-braces.full.stderr b/src/test/ui/const-generics/macro_rules-braces.full.stderr index 3c9d4c9b470..1883f454e60 100644 --- a/src/test/ui/const-generics/macro_rules-braces.full.stderr +++ b/src/test/ui/const-generics/macro_rules-braces.full.stderr @@ -1,5 +1,5 @@ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/macro_rules-braces.rs:49:17 + --> $DIR/macro_rules-braces.rs:48:17 | LL | let _: baz!(m::P); | ^^^^ @@ -10,7 +10,7 @@ LL | let _: baz!({ m::P }); | ^ ^ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/macro_rules-braces.rs:69:17 + --> $DIR/macro_rules-braces.rs:68:17 | LL | let _: baz!(10 + 7); | ^^^^^^ @@ -21,7 +21,7 @@ LL | let _: baz!({ 10 + 7 }); | ^ ^ error: constant expression depends on a generic parameter - --> $DIR/macro_rules-braces.rs:16:13 + --> $DIR/macro_rules-braces.rs:15:13 | LL | [u8; $x] | ^^^^^^^^ @@ -33,7 +33,7 @@ LL | let _: foo!({{ N }}); = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: constant expression depends on a generic parameter - --> $DIR/macro_rules-braces.rs:21:13 + --> $DIR/macro_rules-braces.rs:20:13 | LL | [u8; { $x }] | ^^^^^^^^^^^^ @@ -45,7 +45,7 @@ LL | let _: bar!({ N }); = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: constant expression depends on a generic parameter - --> $DIR/macro_rules-braces.rs:26:13 + --> $DIR/macro_rules-braces.rs:25:13 | LL | Foo<$x> | ^^^^^^^ @@ -57,7 +57,7 @@ LL | let _: baz!({{ N }}); = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: constant expression depends on a generic parameter - --> $DIR/macro_rules-braces.rs:31:13 + --> $DIR/macro_rules-braces.rs:30:13 | LL | Foo<{ $x }> | ^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/macro_rules-braces.min.stderr b/src/test/ui/const-generics/macro_rules-braces.min.stderr index c400e2c814d..60583d43c01 100644 --- a/src/test/ui/const-generics/macro_rules-braces.min.stderr +++ b/src/test/ui/const-generics/macro_rules-braces.min.stderr @@ -1,5 +1,5 @@ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/macro_rules-braces.rs:49:17 + --> $DIR/macro_rules-braces.rs:48:17 | LL | let _: baz!(m::P); | ^^^^ @@ -10,7 +10,7 @@ LL | let _: baz!({ m::P }); | ^ ^ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/macro_rules-braces.rs:69:17 + --> $DIR/macro_rules-braces.rs:68:17 | LL | let _: baz!(10 + 7); | ^^^^^^ @@ -21,7 +21,7 @@ LL | let _: baz!({ 10 + 7 }); | ^ ^ error: generic parameters may not be used in const operations - --> $DIR/macro_rules-braces.rs:37:20 + --> $DIR/macro_rules-braces.rs:36:20 | LL | let _: foo!({{ N }}); | ^ cannot perform const operation using `N` @@ -30,7 +30,7 @@ LL | let _: foo!({{ N }}); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/macro_rules-braces.rs:41:19 + --> $DIR/macro_rules-braces.rs:40:19 | LL | let _: bar!({ N }); | ^ cannot perform const operation using `N` @@ -39,7 +39,7 @@ LL | let _: bar!({ N }); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/macro_rules-braces.rs:46:20 + --> $DIR/macro_rules-braces.rs:45:20 | LL | let _: baz!({{ N }}); | ^ cannot perform const operation using `N` @@ -48,7 +48,7 @@ LL | let _: baz!({{ N }}); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/macro_rules-braces.rs:51:19 + --> $DIR/macro_rules-braces.rs:50:19 | LL | let _: biz!({ N }); | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/macro_rules-braces.rs b/src/test/ui/const-generics/macro_rules-braces.rs index c6b43bec243..605a10880bb 100644 --- a/src/test/ui/const-generics/macro_rules-braces.rs +++ b/src/test/ui/const-generics/macro_rules-braces.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] mod m { pub const P: usize = 0; diff --git a/src/test/ui/const-generics/min_const_generics/assoc_const.rs b/src/test/ui/const-generics/min_const_generics/assoc_const.rs index fa75613d9dd..27e971b5b6f 100644 --- a/src/test/ui/const-generics/min_const_generics/assoc_const.rs +++ b/src/test/ui/const-generics/min_const_generics/assoc_const.rs @@ -1,6 +1,4 @@ // check-pass -#![feature(min_const_generics)] - struct Foo; impl Foo { diff --git a/src/test/ui/const-generics/min_const_generics/complex-expression.rs b/src/test/ui/const-generics/min_const_generics/complex-expression.rs index 686ce98fcdf..7840989cb08 100644 --- a/src/test/ui/const-generics/min_const_generics/complex-expression.rs +++ b/src/test/ui/const-generics/min_const_generics/complex-expression.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - use std::mem::size_of; fn test() {} diff --git a/src/test/ui/const-generics/min_const_generics/complex-expression.stderr b/src/test/ui/const-generics/min_const_generics/complex-expression.stderr index 2ea66279d46..17669244849 100644 --- a/src/test/ui/const-generics/min_const_generics/complex-expression.stderr +++ b/src/test/ui/const-generics/min_const_generics/complex-expression.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/complex-expression.rs:11:38 + --> $DIR/complex-expression.rs:9:38 | LL | struct Break0([u8; { N + 1 }]); | ^ cannot perform const operation using `N` @@ -8,7 +8,7 @@ LL | struct Break0([u8; { N + 1 }]); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/complex-expression.rs:14:40 + --> $DIR/complex-expression.rs:12:40 | LL | struct Break1([u8; { { N } }]); | ^ cannot perform const operation using `N` @@ -17,7 +17,7 @@ LL | struct Break1([u8; { { N } }]); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/complex-expression.rs:18:17 + --> $DIR/complex-expression.rs:16:17 | LL | let _: [u8; N + 1]; | ^ cannot perform const operation using `N` @@ -26,7 +26,7 @@ LL | let _: [u8; N + 1]; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/complex-expression.rs:23:17 + --> $DIR/complex-expression.rs:21:17 | LL | let _ = [0; N + 1]; | ^ cannot perform const operation using `N` @@ -35,7 +35,7 @@ LL | let _ = [0; N + 1]; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/complex-expression.rs:27:45 + --> $DIR/complex-expression.rs:25:45 | LL | struct BreakTy0(T, [u8; { size_of::<*mut T>() }]); | ^ cannot perform const operation using `T` @@ -44,7 +44,7 @@ LL | struct BreakTy0(T, [u8; { size_of::<*mut T>() }]); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/complex-expression.rs:30:47 + --> $DIR/complex-expression.rs:28:47 | LL | struct BreakTy1(T, [u8; { { size_of::<*mut T>() } }]); | ^ cannot perform const operation using `T` @@ -53,7 +53,7 @@ LL | struct BreakTy1(T, [u8; { { size_of::<*mut T>() } }]); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/complex-expression.rs:34:32 + --> $DIR/complex-expression.rs:32:32 | LL | let _: [u8; size_of::<*mut T>() + 1]; | ^ cannot perform const operation using `T` @@ -62,7 +62,7 @@ LL | let _: [u8; size_of::<*mut T>() + 1]; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions warning: cannot use constants which depend on generic parameters in types - --> $DIR/complex-expression.rs:39:17 + --> $DIR/complex-expression.rs:37:17 | LL | let _ = [0; size_of::<*mut T>() + 1]; | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/min_const_generics/complex-types.rs b/src/test/ui/const-generics/min_const_generics/complex-types.rs index 2aaf2c39875..057bd5af89e 100644 --- a/src/test/ui/const-generics/min_const_generics/complex-types.rs +++ b/src/test/ui/const-generics/min_const_generics/complex-types.rs @@ -1,4 +1,3 @@ -#![feature(min_const_generics)] #![feature(never_type)] struct Foo; diff --git a/src/test/ui/const-generics/min_const_generics/complex-types.stderr b/src/test/ui/const-generics/min_const_generics/complex-types.stderr index 5d473f1f876..20d498f9c93 100644 --- a/src/test/ui/const-generics/min_const_generics/complex-types.stderr +++ b/src/test/ui/const-generics/min_const_generics/complex-types.stderr @@ -1,5 +1,5 @@ error: `[u8; 0]` is forbidden as the type of a const generic parameter - --> $DIR/complex-types.rs:4:21 + --> $DIR/complex-types.rs:3:21 | LL | struct Foo; | ^^^^^^^ @@ -8,7 +8,7 @@ LL | struct Foo; = help: more complex types are supported with `#[feature(const_generics)]` error: `()` is forbidden as the type of a const generic parameter - --> $DIR/complex-types.rs:7:21 + --> $DIR/complex-types.rs:6:21 | LL | struct Bar; | ^^ @@ -17,7 +17,7 @@ LL | struct Bar; = help: more complex types are supported with `#[feature(const_generics)]` error: `No` is forbidden as the type of a const generic parameter - --> $DIR/complex-types.rs:12:21 + --> $DIR/complex-types.rs:11:21 | LL | struct Fez; | ^^ @@ -26,7 +26,7 @@ LL | struct Fez; = help: more complex types are supported with `#[feature(const_generics)]` error: `&'static u8` is forbidden as the type of a const generic parameter - --> $DIR/complex-types.rs:15:21 + --> $DIR/complex-types.rs:14:21 | LL | struct Faz; | ^^^^^^^^^^^ @@ -35,7 +35,7 @@ LL | struct Faz; = help: more complex types are supported with `#[feature(const_generics)]` error: `!` is forbidden as the type of a const generic parameter - --> $DIR/complex-types.rs:18:21 + --> $DIR/complex-types.rs:17:21 | LL | struct Fiz; | ^ @@ -44,7 +44,7 @@ LL | struct Fiz; = help: more complex types are supported with `#[feature(const_generics)]` error: `()` is forbidden as the type of a const generic parameter - --> $DIR/complex-types.rs:21:19 + --> $DIR/complex-types.rs:20:19 | LL | enum Goo { A, B } | ^^ @@ -53,7 +53,7 @@ LL | enum Goo { A, B } = help: more complex types are supported with `#[feature(const_generics)]` error: `()` is forbidden as the type of a const generic parameter - --> $DIR/complex-types.rs:24:20 + --> $DIR/complex-types.rs:23:20 | LL | union Boo { a: () } | ^^ diff --git a/src/test/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs b/src/test/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs index dd82be33a8e..71d13ca61c9 100644 --- a/src/test/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs +++ b/src/test/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs @@ -1,5 +1,4 @@ // check-pass -#![feature(min_const_generics)] #![allow(dead_code)] fn foo() { diff --git a/src/test/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr b/src/test/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr index 4d0cab012f9..f9f6660f6b8 100644 --- a/src/test/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr +++ b/src/test/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr @@ -1,5 +1,5 @@ warning: cannot use constants which depend on generic parameters in types - --> $DIR/const-evaluatable-unchecked.rs:6:9 + --> $DIR/const-evaluatable-unchecked.rs:5:9 | LL | [0; std::mem::size_of::<*mut T>()]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ LL | [0; std::mem::size_of::<*mut T>()]; = note: for more information, see issue #76200 warning: cannot use constants which depend on generic parameters in types - --> $DIR/const-evaluatable-unchecked.rs:17:21 + --> $DIR/const-evaluatable-unchecked.rs:16:21 | LL | let _ = [0; Self::ASSOC]; | ^^^^^^^^^^^ @@ -18,7 +18,7 @@ LL | let _ = [0; Self::ASSOC]; = note: for more information, see issue #76200 warning: cannot use constants which depend on generic parameters in types - --> $DIR/const-evaluatable-unchecked.rs:29:21 + --> $DIR/const-evaluatable-unchecked.rs:28:21 | LL | let _ = [0; Self::ASSOC]; | ^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.rs b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.rs index b9afd226430..fac3777cf21 100644 --- a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.rs +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - fn foo() {} const BAR: usize = 42; diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr index 13742238a20..beea0acac60 100644 --- a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr @@ -1,5 +1,5 @@ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:8:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:6:8 | LL | foo(); | ^ ^ @@ -10,7 +10,7 @@ LL | foo::(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:11:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:9:8 | LL | foo(); | ^ ^ @@ -21,7 +21,7 @@ LL | foo::(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:14:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:12:8 | LL | foo<3 + 3>(); | ^ ^ @@ -32,7 +32,7 @@ LL | foo::<3 + 3>(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:17:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:15:8 | LL | foo(); | ^ ^ @@ -43,7 +43,7 @@ LL | foo::(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:20:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:18:8 | LL | foo(); | ^ ^ @@ -54,7 +54,7 @@ LL | foo::(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:23:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:21:8 | LL | foo<100 - BAR>(); | ^ ^ @@ -65,7 +65,7 @@ LL | foo::<100 - BAR>(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:26:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:24:8 | LL | foo()>(); | ^ ^ @@ -76,13 +76,13 @@ LL | foo::()>(); | ^^ error: expected one of `;` or `}`, found `>` - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:26:19 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:24:19 | LL | foo()>(); | ^ expected one of `;` or `}` error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:30:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:28:8 | LL | foo()>(); | ^ ^ @@ -93,7 +93,7 @@ LL | foo::()>(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:33:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:31:8 | LL | foo() + BAR>(); | ^ ^ @@ -104,7 +104,7 @@ LL | foo::() + BAR>(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:36:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:34:8 | LL | foo() - BAR>(); | ^ ^ @@ -115,7 +115,7 @@ LL | foo::() - BAR>(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:39:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:37:8 | LL | foo()>(); | ^ ^ @@ -126,7 +126,7 @@ LL | foo::()>(); | ^^ error: comparison operators cannot be chained - --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:42:8 + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:40:8 | LL | foo()>(); | ^ ^ diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs index b96d5c561ff..f8b9d7adbfe 100644 --- a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - fn foo() {} const BAR: usize = 42; diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr index 6adcf6a3e36..ad451fcf65d 100644 --- a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr @@ -1,5 +1,5 @@ error: expected one of `,` or `>`, found `3` - --> $DIR/const-expression-suggest-missing-braces.rs:8:17 + --> $DIR/const-expression-suggest-missing-braces.rs:6:17 | LL | foo::(); | ^ expected one of `,` or `>` @@ -10,7 +10,7 @@ LL | foo::<{ BAR + 3 }>(); | ^ ^ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/const-expression-suggest-missing-braces.rs:20:11 + --> $DIR/const-expression-suggest-missing-braces.rs:18:11 | LL | foo::<3 + 3>(); | ^^^^^ @@ -21,7 +21,7 @@ LL | foo::<{ 3 + 3 }>(); | ^ ^ error: expected one of `,` or `>`, found `-` - --> $DIR/const-expression-suggest-missing-braces.rs:23:15 + --> $DIR/const-expression-suggest-missing-braces.rs:21:15 | LL | foo::(); | ^ expected one of `,` or `>` @@ -32,7 +32,7 @@ LL | foo::<{ BAR - 3 }>(); | ^ ^ error: expected one of `,` or `>`, found `-` - --> $DIR/const-expression-suggest-missing-braces.rs:26:15 + --> $DIR/const-expression-suggest-missing-braces.rs:24:15 | LL | foo::(); | ^ expected one of `,` or `>` @@ -43,7 +43,7 @@ LL | foo::<{ BAR - BAR }>(); | ^ ^ error: expressions must be enclosed in braces to be used as const generic arguments - --> $DIR/const-expression-suggest-missing-braces.rs:29:11 + --> $DIR/const-expression-suggest-missing-braces.rs:27:11 | LL | foo::<100 - BAR>(); | ^^^^^^^^^ @@ -54,7 +54,7 @@ LL | foo::<{ 100 - BAR }>(); | ^ ^ error: expected one of `,` or `>`, found `(` - --> $DIR/const-expression-suggest-missing-braces.rs:32:19 + --> $DIR/const-expression-suggest-missing-braces.rs:30:19 | LL | foo::()>(); | ^ expected one of `,` or `>` @@ -65,7 +65,7 @@ LL | foo::<{ bar() }>(); | ^ ^ error: expected one of `,` or `>`, found `(` - --> $DIR/const-expression-suggest-missing-braces.rs:35:21 + --> $DIR/const-expression-suggest-missing-braces.rs:33:21 | LL | foo::()>(); | ^ expected one of `,` or `>` @@ -76,7 +76,7 @@ LL | foo::<{ bar::() }>(); | ^ ^ error: expected one of `,` or `>`, found `(` - --> $DIR/const-expression-suggest-missing-braces.rs:38:21 + --> $DIR/const-expression-suggest-missing-braces.rs:36:21 | LL | foo::() + BAR>(); | ^ expected one of `,` or `>` @@ -87,7 +87,7 @@ LL | foo::<{ bar::() + BAR }>(); | ^ ^ error: expected one of `,` or `>`, found `(` - --> $DIR/const-expression-suggest-missing-braces.rs:41:21 + --> $DIR/const-expression-suggest-missing-braces.rs:39:21 | LL | foo::() - BAR>(); | ^ expected one of `,` or `>` @@ -98,7 +98,7 @@ LL | foo::<{ bar::() - BAR }>(); | ^ ^ error: expected one of `,` or `>`, found `-` - --> $DIR/const-expression-suggest-missing-braces.rs:44:15 + --> $DIR/const-expression-suggest-missing-braces.rs:42:15 | LL | foo::()>(); | ^ expected one of `,` or `>` @@ -109,7 +109,7 @@ LL | foo::<{ BAR - bar::() }>(); | ^ ^ error: expected one of `,` or `>`, found `-` - --> $DIR/const-expression-suggest-missing-braces.rs:47:15 + --> $DIR/const-expression-suggest-missing-braces.rs:45:15 | LL | foo::()>(); | ^ expected one of `,` or `>` @@ -120,19 +120,19 @@ LL | foo::<{ BAR - bar::() }>(); | ^ ^ error[E0404]: expected trait, found constant `BAR` - --> $DIR/const-expression-suggest-missing-braces.rs:13:11 + --> $DIR/const-expression-suggest-missing-braces.rs:11:11 | LL | foo::(); | ^^^ not a trait error[E0404]: expected trait, found constant `BAR` - --> $DIR/const-expression-suggest-missing-braces.rs:13:17 + --> $DIR/const-expression-suggest-missing-braces.rs:11:17 | LL | foo::(); | ^^^ not a trait warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/const-expression-suggest-missing-braces.rs:13:11 + --> $DIR/const-expression-suggest-missing-braces.rs:11:11 | LL | foo::(); | ^^^^^^^^^ help: use `dyn`: `dyn BAR + BAR` @@ -140,7 +140,7 @@ LL | foo::(); = note: `#[warn(bare_trait_objects)]` on by default error[E0747]: type provided when a constant was expected - --> $DIR/const-expression-suggest-missing-braces.rs:13:11 + --> $DIR/const-expression-suggest-missing-braces.rs:11:11 | LL | foo::(); | ^^^^^^^^^ diff --git a/src/test/ui/const-generics/min_const_generics/const_fn_in_generics.rs b/src/test/ui/const-generics/min_const_generics/const_fn_in_generics.rs index 3370666cc5c..0c10af6c43f 100644 --- a/src/test/ui/const-generics/min_const_generics/const_fn_in_generics.rs +++ b/src/test/ui/const-generics/min_const_generics/const_fn_in_generics.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(min_const_generics)] - const fn identity() -> u32 { T } #[derive(Eq, PartialEq, Debug)] diff --git a/src/test/ui/const-generics/min_const_generics/default_function_param.rs b/src/test/ui/const-generics/min_const_generics/default_function_param.rs index 7e0c1c2ed9f..d7918a73ab8 100644 --- a/src/test/ui/const-generics/min_const_generics/default_function_param.rs +++ b/src/test/ui/const-generics/min_const_generics/default_function_param.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - fn foo() {} //~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` diff --git a/src/test/ui/const-generics/min_const_generics/default_function_param.stderr b/src/test/ui/const-generics/min_const_generics/default_function_param.stderr index ed1a83b6a4d..8eb796d9bb7 100644 --- a/src/test/ui/const-generics/min_const_generics/default_function_param.stderr +++ b/src/test/ui/const-generics/min_const_generics/default_function_param.stderr @@ -1,5 +1,5 @@ error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` - --> $DIR/default_function_param.rs:3:26 + --> $DIR/default_function_param.rs:1:26 | LL | fn foo() {} | ^ expected one of 7 possible tokens diff --git a/src/test/ui/const-generics/min_const_generics/default_trait_param.rs b/src/test/ui/const-generics/min_const_generics/default_trait_param.rs index 322ddccbf18..c8003ad5d44 100644 --- a/src/test/ui/const-generics/min_const_generics/default_trait_param.rs +++ b/src/test/ui/const-generics/min_const_generics/default_trait_param.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - trait Foo {} //~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` diff --git a/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr b/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr index 49c3ac86744..6d112ef1de0 100644 --- a/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr +++ b/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr @@ -1,5 +1,5 @@ error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` - --> $DIR/default_trait_param.rs:3:28 + --> $DIR/default_trait_param.rs:1:28 | LL | trait Foo {} | ^ expected one of 7 possible tokens diff --git a/src/test/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs b/src/test/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs index 02944e2bff2..881f8b98aad 100644 --- a/src/test/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs +++ b/src/test/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - // This test checks that non-static lifetimes are prohibited under `min_const_generics`. It // currently emits an error with `min_const_generics`. This will ICE under `const_generics`. diff --git a/src/test/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr b/src/test/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr index cdfd491e395..5def54ca26d 100644 --- a/src/test/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr +++ b/src/test/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr @@ -1,5 +1,5 @@ error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/forbid-non-static-lifetimes.rs:9:22 + --> $DIR/forbid-non-static-lifetimes.rs:7:22 | LL | test::<{ let _: &'a (); 3 },>(); | ^^ @@ -8,7 +8,7 @@ LL | test::<{ let _: &'a (); 3 },>(); = help: add `#![feature(const_generics)]` to the crate attributes to enable error[E0658]: a non-static lifetime is not allowed in a `const` - --> $DIR/forbid-non-static-lifetimes.rs:23:16 + --> $DIR/forbid-non-static-lifetimes.rs:21:16 | LL | [(); (|_: &'a u8| (), 0).1]; | ^^ diff --git a/src/test/ui/const-generics/min_const_generics/invalid-patterns.rs b/src/test/ui/const-generics/min_const_generics/invalid-patterns.rs index e59b97922be..a120eee67ee 100644 --- a/src/test/ui/const-generics/min_const_generics/invalid-patterns.rs +++ b/src/test/ui/const-generics/min_const_generics/invalid-patterns.rs @@ -1,4 +1,3 @@ -#![feature(min_const_generics)] use std::mem::transmute; fn get_flag() -> Option { diff --git a/src/test/ui/const-generics/min_const_generics/invalid-patterns.stderr b/src/test/ui/const-generics/min_const_generics/invalid-patterns.stderr index a3157c6b564..04f716fa733 100644 --- a/src/test/ui/const-generics/min_const_generics/invalid-patterns.stderr +++ b/src/test/ui/const-generics/min_const_generics/invalid-patterns.stderr @@ -1,29 +1,29 @@ error[E0308]: mismatched types - --> $DIR/invalid-patterns.rs:29:21 + --> $DIR/invalid-patterns.rs:28:21 | LL | get_flag::(); | ^^^^ expected `char`, found `u8` error[E0308]: mismatched types - --> $DIR/invalid-patterns.rs:31:14 + --> $DIR/invalid-patterns.rs:30:14 | LL | get_flag::<7, 'c'>(); | ^ expected `bool`, found integer error[E0308]: mismatched types - --> $DIR/invalid-patterns.rs:33:14 + --> $DIR/invalid-patterns.rs:32:14 | LL | get_flag::<42, 0x5ad>(); | ^^ expected `bool`, found integer error[E0308]: mismatched types - --> $DIR/invalid-patterns.rs:33:18 + --> $DIR/invalid-patterns.rs:32:18 | LL | get_flag::<42, 0x5ad>(); | ^^^^^ expected `char`, found `u8` error[E0080]: it is undefined behavior to use this value - --> $DIR/invalid-patterns.rs:38:21 + --> $DIR/invalid-patterns.rs:37:21 | LL | get_flag::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`) @@ -31,7 +31,7 @@ LL | get_flag::(); = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. error[E0080]: it is undefined behavior to use this value - --> $DIR/invalid-patterns.rs:40:14 + --> $DIR/invalid-patterns.rs:39:14 | LL | get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered 0x42, but expected a boolean @@ -39,7 +39,7 @@ LL | get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>(); = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. error[E0080]: it is undefined behavior to use this value - --> $DIR/invalid-patterns.rs:42:14 + --> $DIR/invalid-patterns.rs:41:14 | LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered 0x42, but expected a boolean @@ -47,7 +47,7 @@ LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. error[E0080]: it is undefined behavior to use this value - --> $DIR/invalid-patterns.rs:42:47 + --> $DIR/invalid-patterns.rs:41:47 | LL | get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`) diff --git a/src/test/ui/const-generics/min_const_generics/macro-fail.rs b/src/test/ui/const-generics/min_const_generics/macro-fail.rs index 1bd0c46f55e..f83518fc9d4 100644 --- a/src/test/ui/const-generics/min_const_generics/macro-fail.rs +++ b/src/test/ui/const-generics/min_const_generics/macro-fail.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - struct Example; macro_rules! external_macro { diff --git a/src/test/ui/const-generics/min_const_generics/macro-fail.stderr b/src/test/ui/const-generics/min_const_generics/macro-fail.stderr index a5dedf6fe20..22930a352a8 100644 --- a/src/test/ui/const-generics/min_const_generics/macro-fail.stderr +++ b/src/test/ui/const-generics/min_const_generics/macro-fail.stderr @@ -1,5 +1,5 @@ error: expected type, found `{` - --> $DIR/macro-fail.rs:31:27 + --> $DIR/macro-fail.rs:29:27 | LL | fn make_marker() -> impl Marker { | ---------------------- @@ -13,7 +13,7 @@ LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }} = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected type, found `{` - --> $DIR/macro-fail.rs:31:27 + --> $DIR/macro-fail.rs:29:27 | LL | Example:: | ---------------------- @@ -27,7 +27,7 @@ LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }} = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected type, found `{` - --> $DIR/macro-fail.rs:6:10 + --> $DIR/macro-fail.rs:4:10 | LL | () => {{ | __________^ @@ -46,7 +46,7 @@ LL | let _fail = Example::; = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected end of macro invocation - --> $DIR/macro-fail.rs:41:25 + --> $DIR/macro-fail.rs:39:25 | LL | macro_rules! gimme_a_const { | -------------------------- when calling this macro @@ -55,25 +55,25 @@ LL | let _fail = Example::; | ^^^^^^^^^^^^^^^^ missing tokens in macro arguments error[E0747]: type provided when a constant was expected - --> $DIR/macro-fail.rs:16:33 + --> $DIR/macro-fail.rs:14:33 | LL | fn make_marker() -> impl Marker { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0747]: type provided when a constant was expected - --> $DIR/macro-fail.rs:18:13 + --> $DIR/macro-fail.rs:16:13 | LL | Example:: | ^^^^^^^^^^^^^^^^^^^^^^ error[E0747]: type provided when a constant was expected - --> $DIR/macro-fail.rs:38:25 + --> $DIR/macro-fail.rs:36:25 | LL | let _fail = Example::; | ^^^^^^^^^^^^^^^^^ error[E0747]: type provided when a constant was expected - --> $DIR/macro-fail.rs:41:25 + --> $DIR/macro-fail.rs:39:25 | LL | let _fail = Example::; | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/min_const_generics/macro.rs b/src/test/ui/const-generics/min_const_generics/macro.rs index 575fbd33572..9b63f76987a 100644 --- a/src/test/ui/const-generics/min_const_generics/macro.rs +++ b/src/test/ui/const-generics/min_const_generics/macro.rs @@ -1,6 +1,4 @@ // run-pass -#![feature(min_const_generics)] - struct Example; macro_rules! external_macro { diff --git a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.rs b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.rs index 0973b373c12..9ef619365a0 100644 --- a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.rs +++ b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - trait Foo { fn t1() -> [u8; std::mem::size_of::()]; //~ERROR generic parameters } diff --git a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr index 40c73f0b951..4fdfb5fbcb1 100644 --- a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr +++ b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/self-ty-in-const-1.rs:4:41 + --> $DIR/self-ty-in-const-1.rs:2:41 | LL | fn t1() -> [u8; std::mem::size_of::()]; | ^^^^ cannot perform const operation using `Self` @@ -8,13 +8,13 @@ LL | fn t1() -> [u8; std::mem::size_of::()]; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic `Self` types are currently not permitted in anonymous constants - --> $DIR/self-ty-in-const-1.rs:14:41 + --> $DIR/self-ty-in-const-1.rs:12:41 | LL | fn t3() -> [u8; std::mem::size_of::()] {} | ^^^^ | note: not a concrete type - --> $DIR/self-ty-in-const-1.rs:13:9 + --> $DIR/self-ty-in-const-1.rs:11:9 | LL | impl Bar { | ^^^^^^ diff --git a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs index e7f80d50082..286ec2d2450 100644 --- a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs +++ b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - struct Bar(T); trait Baz { diff --git a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr index 9ac6410a290..41546292c47 100644 --- a/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr +++ b/src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr @@ -1,11 +1,11 @@ error: generic `Self` types are currently not permitted in anonymous constants - --> $DIR/self-ty-in-const-2.rs:17:41 + --> $DIR/self-ty-in-const-2.rs:15:41 | LL | let _: [u8; std::mem::size_of::()]; | ^^^^ | note: not a concrete type - --> $DIR/self-ty-in-const-2.rs:15:17 + --> $DIR/self-ty-in-const-2.rs:13:17 | LL | impl Baz for Bar { | ^^^^^^ diff --git a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs b/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs index 0ef17109bed..7518dc59e59 100644 --- a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs +++ b/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - fn a() {} //~^ ERROR `&'static [u32]` is forbidden as the type of a const generic parameter diff --git a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.stderr b/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.stderr index 6c39f6b4c1d..05939b05bba 100644 --- a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.stderr +++ b/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.stderr @@ -1,5 +1,5 @@ error: `&'static [u32]` is forbidden as the type of a const generic parameter - --> $DIR/static-reference-array-const-param.rs:3:15 + --> $DIR/static-reference-array-const-param.rs:1:15 | LL | fn a() {} | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.rs b/src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.rs index dfa1ece2f36..560795a51f5 100644 --- a/src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.rs +++ b/src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.rs @@ -1,5 +1,3 @@ -#![feature(min_const_generics)] - struct Const; //~^ ERROR `&'static ()` is forbidden as the type of a const generic parameter diff --git a/src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.stderr b/src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.stderr index 6b90329b72c..8724c7e33b1 100644 --- a/src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.stderr +++ b/src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.stderr @@ -1,5 +1,5 @@ error: `&'static ()` is forbidden as the type of a const generic parameter - --> $DIR/transmute-const-param-static-reference.rs:3:23 + --> $DIR/transmute-const-param-static-reference.rs:1:23 | LL | struct Const; | ^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/mut-ref-const-param-array.rs b/src/test/ui/const-generics/mut-ref-const-param-array.rs index cf24cbe7e82..6a5739db3ae 100644 --- a/src/test/ui/const-generics/mut-ref-const-param-array.rs +++ b/src/test/ui/const-generics/mut-ref-const-param-array.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::ops::AddAssign; diff --git a/src/test/ui/const-generics/nested-type.full.stderr b/src/test/ui/const-generics/nested-type.full.stderr index 06ab9a6ff29..9d7ca36545c 100644 --- a/src/test/ui/const-generics/nested-type.full.stderr +++ b/src/test/ui/const-generics/nested-type.full.stderr @@ -1,5 +1,5 @@ error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants - --> $DIR/nested-type.rs:16:5 + --> $DIR/nested-type.rs:15:5 | LL | Foo::<17>::value() | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/nested-type.min.stderr b/src/test/ui/const-generics/nested-type.min.stderr index 369e387508e..dabb3f245f5 100644 --- a/src/test/ui/const-generics/nested-type.min.stderr +++ b/src/test/ui/const-generics/nested-type.min.stderr @@ -1,5 +1,5 @@ error: `[u8; _]` is forbidden as the type of a const generic parameter - --> $DIR/nested-type.rs:7:21 + --> $DIR/nested-type.rs:6:21 | LL | struct Foo; = help: more complex types are supported with `#[feature(const_generics)]` error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants - --> $DIR/nested-type.rs:16:5 + --> $DIR/nested-type.rs:15:5 | LL | Foo::<17>::value() | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/nested-type.rs b/src/test/ui/const-generics/nested-type.rs index c5660983985..be8ebb7f401 100644 --- a/src/test/ui/const-generics/nested-type.rs +++ b/src/test/ui/const-generics/nested-type.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo; diff --git a/src/test/ui/const-generics/occurs-check/unify-fixpoint.stderr b/src/test/ui/const-generics/occurs-check/unify-fixpoint.stderr index 8a1462c59e8..671f1103dcc 100644 --- a/src/test/ui/const-generics/occurs-check/unify-fixpoint.stderr +++ b/src/test/ui/const-generics/occurs-check/unify-fixpoint.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error: constant expression depends on a generic parameter --> $DIR/unify-fixpoint.rs:9:32 diff --git a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.full.stderr b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.full.stderr index 3dccfd73dcc..debb272da36 100644 --- a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.full.stderr +++ b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.full.stderr @@ -1,5 +1,5 @@ error: type parameters with a default must be trailing - --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:12:12 + --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:11:12 | LL | struct Bar(T); | ^ @@ -7,13 +7,13 @@ LL | struct Bar(T); = note: using type defaults and const parameters in the same parameter list is currently not permitted error: constant values inside of type parameter defaults must not depend on generic parameters - --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:7:44 + --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:6:44 | LL | struct Foo()]>(T, U); | ^ the anonymous constant must not depend on the parameter `T` error: constant values inside of type parameter defaults must not depend on generic parameters - --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:12:21 + --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:11:21 | LL | struct Bar(T); | ^ the anonymous constant must not depend on the parameter `N` diff --git a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr index 9e0837a0a62..171efca1938 100644 --- a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr +++ b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr @@ -1,5 +1,5 @@ error: type parameters with a default must be trailing - --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:12:12 + --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:11:12 | LL | struct Bar(T); | ^ @@ -7,7 +7,7 @@ LL | struct Bar(T); = note: using type defaults and const parameters in the same parameter list is currently not permitted error: generic parameters may not be used in const operations - --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:7:44 + --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:6:44 | LL | struct Foo()]>(T, U); | ^ cannot perform const operation using `T` @@ -16,7 +16,7 @@ LL | struct Foo()]>(T, U); = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: constant values inside of type parameter defaults must not depend on generic parameters - --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:12:21 + --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:11:21 | LL | struct Bar(T); | ^ the anonymous constant must not depend on the parameter `N` diff --git a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs index 51f0cff3f21..845c6111b59 100644 --- a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs +++ b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo()]>(T, U); //[full]~^ ERROR constant values inside of type parameter defaults diff --git a/src/test/ui/const-generics/promotion.rs b/src/test/ui/const-generics/promotion.rs index ac568bb75f0..ce9a1a0feb4 100644 --- a/src/test/ui/const-generics/promotion.rs +++ b/src/test/ui/const-generics/promotion.rs @@ -1,7 +1,5 @@ // run-pass // tests that promoting expressions containing const parameters is allowed. -#![feature(min_const_generics)] - fn promotion_test() -> &'static usize { &(3 + N) } diff --git a/src/test/ui/const-generics/raw-ptr-const-param-deref.full.stderr b/src/test/ui/const-generics/raw-ptr-const-param-deref.full.stderr index ffaab51f766..04bc46cb4ab 100644 --- a/src/test/ui/const-generics/raw-ptr-const-param-deref.full.stderr +++ b/src/test/ui/const-generics/raw-ptr-const-param-deref.full.stderr @@ -1,11 +1,11 @@ error: using raw pointers as const generic parameters is forbidden - --> $DIR/raw-ptr-const-param-deref.rs:10:23 + --> $DIR/raw-ptr-const-param-deref.rs:9:23 | LL | struct Const; | ^^^^^^^^^^ error: using raw pointers as const generic parameters is forbidden - --> $DIR/raw-ptr-const-param-deref.rs:12:15 + --> $DIR/raw-ptr-const-param-deref.rs:11:15 | LL | impl Const

{ | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/raw-ptr-const-param-deref.min.stderr b/src/test/ui/const-generics/raw-ptr-const-param-deref.min.stderr index ffaab51f766..04bc46cb4ab 100644 --- a/src/test/ui/const-generics/raw-ptr-const-param-deref.min.stderr +++ b/src/test/ui/const-generics/raw-ptr-const-param-deref.min.stderr @@ -1,11 +1,11 @@ error: using raw pointers as const generic parameters is forbidden - --> $DIR/raw-ptr-const-param-deref.rs:10:23 + --> $DIR/raw-ptr-const-param-deref.rs:9:23 | LL | struct Const; | ^^^^^^^^^^ error: using raw pointers as const generic parameters is forbidden - --> $DIR/raw-ptr-const-param-deref.rs:12:15 + --> $DIR/raw-ptr-const-param-deref.rs:11:15 | LL | impl Const

{ | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/raw-ptr-const-param-deref.rs b/src/test/ui/const-generics/raw-ptr-const-param-deref.rs index 20cc62ebc17..ca7d33c0eb9 100644 --- a/src/test/ui/const-generics/raw-ptr-const-param-deref.rs +++ b/src/test/ui/const-generics/raw-ptr-const-param-deref.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] const A: u32 = 3; diff --git a/src/test/ui/const-generics/raw-ptr-const-param.full.stderr b/src/test/ui/const-generics/raw-ptr-const-param.full.stderr index d317aa0f585..310422aafcd 100644 --- a/src/test/ui/const-generics/raw-ptr-const-param.full.stderr +++ b/src/test/ui/const-generics/raw-ptr-const-param.full.stderr @@ -1,5 +1,5 @@ error: using raw pointers as const generic parameters is forbidden - --> $DIR/raw-ptr-const-param.rs:7:23 + --> $DIR/raw-ptr-const-param.rs:6:23 | LL | struct Const; | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/raw-ptr-const-param.min.stderr b/src/test/ui/const-generics/raw-ptr-const-param.min.stderr index d317aa0f585..310422aafcd 100644 --- a/src/test/ui/const-generics/raw-ptr-const-param.min.stderr +++ b/src/test/ui/const-generics/raw-ptr-const-param.min.stderr @@ -1,5 +1,5 @@ error: using raw pointers as const generic parameters is forbidden - --> $DIR/raw-ptr-const-param.rs:7:23 + --> $DIR/raw-ptr-const-param.rs:6:23 | LL | struct Const; | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/raw-ptr-const-param.rs b/src/test/ui/const-generics/raw-ptr-const-param.rs index 36e593aa210..a04c6d5e64e 100644 --- a/src/test/ui/const-generics/raw-ptr-const-param.rs +++ b/src/test/ui/const-generics/raw-ptr-const-param.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Const; //~ ERROR: using raw pointers as const generic parameters diff --git a/src/test/ui/const-generics/slice-const-param-mismatch.full.stderr b/src/test/ui/const-generics/slice-const-param-mismatch.full.stderr index d06da2ef063..80dd1be33c2 100644 --- a/src/test/ui/const-generics/slice-const-param-mismatch.full.stderr +++ b/src/test/ui/const-generics/slice-const-param-mismatch.full.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/slice-const-param-mismatch.rs:15:35 + --> $DIR/slice-const-param-mismatch.rs:14:35 | LL | let _: ConstString<"Hello"> = ConstString::<"World">; | -------------------- ^^^^^^^^^^^^^^^^^^^^^^ expected `"Hello"`, found `"World"` @@ -10,7 +10,7 @@ LL | let _: ConstString<"Hello"> = ConstString::<"World">; found struct `ConstString<"World">` error[E0308]: mismatched types - --> $DIR/slice-const-param-mismatch.rs:17:33 + --> $DIR/slice-const-param-mismatch.rs:16:33 | LL | let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">; | ------------------- ^^^^^^^^^^^^^^^^^^^^^ expected `"ℇ㇈↦"`, found `"ℇ㇈↥"` @@ -21,7 +21,7 @@ LL | let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">; found struct `ConstString<"ℇ㇈↥">` error[E0308]: mismatched types - --> $DIR/slice-const-param-mismatch.rs:19:33 + --> $DIR/slice-const-param-mismatch.rs:18:33 | LL | let _: ConstBytes = ConstBytes::; | ------------------ ^^^^^^^^^^^^^^^^^^^^ expected `b"AAA"`, found `b"BBB"` diff --git a/src/test/ui/const-generics/slice-const-param-mismatch.min.stderr b/src/test/ui/const-generics/slice-const-param-mismatch.min.stderr index 46997fed770..13d0b217ed2 100644 --- a/src/test/ui/const-generics/slice-const-param-mismatch.min.stderr +++ b/src/test/ui/const-generics/slice-const-param-mismatch.min.stderr @@ -1,5 +1,5 @@ error: `&'static str` is forbidden as the type of a const generic parameter - --> $DIR/slice-const-param-mismatch.rs:8:29 + --> $DIR/slice-const-param-mismatch.rs:7:29 | LL | struct ConstString; | ^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | struct ConstString; = help: more complex types are supported with `#[feature(const_generics)]` error: `&'static [u8]` is forbidden as the type of a const generic parameter - --> $DIR/slice-const-param-mismatch.rs:10:28 + --> $DIR/slice-const-param-mismatch.rs:9:28 | LL | struct ConstBytes; | ^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/slice-const-param-mismatch.rs b/src/test/ui/const-generics/slice-const-param-mismatch.rs index 0f8ae9bac4a..f020e2bf66f 100644 --- a/src/test/ui/const-generics/slice-const-param-mismatch.rs +++ b/src/test/ui/const-generics/slice-const-param-mismatch.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct ConstString; diff --git a/src/test/ui/const-generics/slice-const-param.min.stderr b/src/test/ui/const-generics/slice-const-param.min.stderr index 7a9f65233e7..821c6e3995a 100644 --- a/src/test/ui/const-generics/slice-const-param.min.stderr +++ b/src/test/ui/const-generics/slice-const-param.min.stderr @@ -1,5 +1,5 @@ error: `&'static str` is forbidden as the type of a const generic parameter - --> $DIR/slice-const-param.rs:8:40 + --> $DIR/slice-const-param.rs:7:40 | LL | pub fn function_with_str() -> &'static str { | ^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | pub fn function_with_str() -> &'static str { = help: more complex types are supported with `#[feature(const_generics)]` error: `&'static [u8]` is forbidden as the type of a const generic parameter - --> $DIR/slice-const-param.rs:13:41 + --> $DIR/slice-const-param.rs:12:41 | LL | pub fn function_with_bytes() -> &'static [u8] { | ^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/slice-const-param.rs b/src/test/ui/const-generics/slice-const-param.rs index f76e948c4af..bf1bf8af922 100644 --- a/src/test/ui/const-generics/slice-const-param.rs +++ b/src/test/ui/const-generics/slice-const-param.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub fn function_with_str() -> &'static str { //[min]~^ ERROR `&'static str` is forbidden diff --git a/src/test/ui/const-generics/std/const-generics-range.min.stderr b/src/test/ui/const-generics/std/const-generics-range.min.stderr index 9274ccd2b92..d7d2a8447e9 100644 --- a/src/test/ui/const-generics/std/const-generics-range.min.stderr +++ b/src/test/ui/const-generics/std/const-generics-range.min.stderr @@ -1,5 +1,5 @@ error: `std::ops::Range` is forbidden as the type of a const generic parameter - --> $DIR/const-generics-range.rs:8:24 + --> $DIR/const-generics-range.rs:7:24 | LL | struct _Range>; | ^^^^^^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | struct _Range>; = help: more complex types are supported with `#[feature(const_generics)]` error: `RangeFrom` is forbidden as the type of a const generic parameter - --> $DIR/const-generics-range.rs:13:28 + --> $DIR/const-generics-range.rs:12:28 | LL | struct _RangeFrom>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | struct _RangeFrom>; = help: more complex types are supported with `#[feature(const_generics)]` error: `RangeFull` is forbidden as the type of a const generic parameter - --> $DIR/const-generics-range.rs:18:28 + --> $DIR/const-generics-range.rs:17:28 | LL | struct _RangeFull; | ^^^^^^^^^^^^^^^^^^^ @@ -26,7 +26,7 @@ LL | struct _RangeFull; = help: more complex types are supported with `#[feature(const_generics)]` error: `RangeInclusive` is forbidden as the type of a const generic parameter - --> $DIR/const-generics-range.rs:24:33 + --> $DIR/const-generics-range.rs:23:33 | LL | struct _RangeInclusive>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -35,7 +35,7 @@ LL | struct _RangeInclusive>; = help: more complex types are supported with `#[feature(const_generics)]` error: `RangeTo` is forbidden as the type of a const generic parameter - --> $DIR/const-generics-range.rs:29:26 + --> $DIR/const-generics-range.rs:28:26 | LL | struct _RangeTo>; | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -44,7 +44,7 @@ LL | struct _RangeTo>; = help: more complex types are supported with `#[feature(const_generics)]` error: `RangeToInclusive` is forbidden as the type of a const generic parameter - --> $DIR/const-generics-range.rs:34:35 + --> $DIR/const-generics-range.rs:33:35 | LL | struct _RangeToInclusive>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/std/const-generics-range.rs b/src/test/ui/const-generics/std/const-generics-range.rs index 136ac352890..deaab830e91 100644 --- a/src/test/ui/const-generics/std/const-generics-range.rs +++ b/src/test/ui/const-generics/std/const-generics-range.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] // `Range` should be usable within const generics: struct _Range>; diff --git a/src/test/ui/const-generics/struct-with-invalid-const-param.full.stderr b/src/test/ui/const-generics/struct-with-invalid-const-param.full.stderr index e73a297c878..db998033c0a 100644 --- a/src/test/ui/const-generics/struct-with-invalid-const-param.full.stderr +++ b/src/test/ui/const-generics/struct-with-invalid-const-param.full.stderr @@ -1,5 +1,5 @@ error[E0573]: expected type, found const parameter `C` - --> $DIR/struct-with-invalid-const-param.rs:8:23 + --> $DIR/struct-with-invalid-const-param.rs:7:23 | LL | struct S(C); | ^ not a type diff --git a/src/test/ui/const-generics/struct-with-invalid-const-param.min.stderr b/src/test/ui/const-generics/struct-with-invalid-const-param.min.stderr index e73a297c878..db998033c0a 100644 --- a/src/test/ui/const-generics/struct-with-invalid-const-param.min.stderr +++ b/src/test/ui/const-generics/struct-with-invalid-const-param.min.stderr @@ -1,5 +1,5 @@ error[E0573]: expected type, found const parameter `C` - --> $DIR/struct-with-invalid-const-param.rs:8:23 + --> $DIR/struct-with-invalid-const-param.rs:7:23 | LL | struct S(C); | ^ not a type diff --git a/src/test/ui/const-generics/struct-with-invalid-const-param.rs b/src/test/ui/const-generics/struct-with-invalid-const-param.rs index f0122ace3ae..32970ccaa5d 100644 --- a/src/test/ui/const-generics/struct-with-invalid-const-param.rs +++ b/src/test/ui/const-generics/struct-with-invalid-const-param.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct S(C); //~ ERROR expected type, found const parameter diff --git a/src/test/ui/const-generics/trait-const-args.rs b/src/test/ui/const-generics/trait-const-args.rs index b66d79845f9..30d05c708e1 100644 --- a/src/test/ui/const-generics/trait-const-args.rs +++ b/src/test/ui/const-generics/trait-const-args.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Const; trait Foo {} diff --git a/src/test/ui/const-generics/transparent-maybeunit-array-wrapper.rs b/src/test/ui/const-generics/transparent-maybeunit-array-wrapper.rs index e041e9709d0..bf855d4dcaa 100644 --- a/src/test/ui/const-generics/transparent-maybeunit-array-wrapper.rs +++ b/src/test/ui/const-generics/transparent-maybeunit-array-wrapper.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::mem::MaybeUninit; diff --git a/src/test/ui/const-generics/type-after-const-ok.min.stderr b/src/test/ui/const-generics/type-after-const-ok.min.stderr index 67a44d2c5b4..ad38754c741 100644 --- a/src/test/ui/const-generics/type-after-const-ok.min.stderr +++ b/src/test/ui/const-generics/type-after-const-ok.min.stderr @@ -1,5 +1,5 @@ error: type parameters must be declared prior to const parameters - --> $DIR/type-after-const-ok.rs:9:26 + --> $DIR/type-after-const-ok.rs:8:26 | LL | struct A(T); | -----------------^- help: reorder the parameters: lifetimes, then types, then consts: `` diff --git a/src/test/ui/const-generics/type-after-const-ok.rs b/src/test/ui/const-generics/type-after-const-ok.rs index 69227cdf19c..920c067dc1a 100644 --- a/src/test/ui/const-generics/type-after-const-ok.rs +++ b/src/test/ui/const-generics/type-after-const-ok.rs @@ -3,7 +3,6 @@ // Verifies that having generic parameters after constants is permitted #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #[allow(dead_code)] struct A(T); diff --git a/src/test/ui/const-generics/type-dependent/auxiliary/type_dependent_lib.rs b/src/test/ui/const-generics/type-dependent/auxiliary/type_dependent_lib.rs index aa85376bf0d..cd9c3ae7bbc 100644 --- a/src/test/ui/const-generics/type-dependent/auxiliary/type_dependent_lib.rs +++ b/src/test/ui/const-generics/type-dependent/auxiliary/type_dependent_lib.rs @@ -1,6 +1,5 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub struct Struct(()); diff --git a/src/test/ui/const-generics/type-dependent/const-arg-in-const-arg.rs b/src/test/ui/const-generics/type-dependent/const-arg-in-const-arg.rs index 3ccdd472613..4997d493bbb 100644 --- a/src/test/ui/const-generics/type-dependent/const-arg-in-const-arg.rs +++ b/src/test/ui/const-generics/type-dependent/const-arg-in-const-arg.rs @@ -1,7 +1,6 @@ // run-pass // revisions: full min #![cfg_attr(full, feature(const_generics))] -#![cfg_attr(min, feature(min_const_generics))] #![allow(incomplete_features)] struct Foo; diff --git a/src/test/ui/const-generics/type-dependent/issue-61936.rs b/src/test/ui/const-generics/type-dependent/issue-61936.rs index f3b19109a7c..417fe2501ae 100644 --- a/src/test/ui/const-generics/type-dependent/issue-61936.rs +++ b/src/test/ui/const-generics/type-dependent/issue-61936.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait SliceExt { fn array_windows_example<'a, const N: usize>(&'a self) -> ArrayWindowsExample<'a, T, N>; diff --git a/src/test/ui/const-generics/type-dependent/issue-63695.rs b/src/test/ui/const-generics/type-dependent/issue-63695.rs index 465b66b09ce..2ece25bb41b 100644 --- a/src/test/ui/const-generics/type-dependent/issue-63695.rs +++ b/src/test/ui/const-generics/type-dependent/issue-63695.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait T { fn test(&self) -> i32 { A } diff --git a/src/test/ui/const-generics/type-dependent/issue-67144-1.rs b/src/test/ui/const-generics/type-dependent/issue-67144-1.rs index 3d4910e9e4b..4a2c303095e 100644 --- a/src/test/ui/const-generics/type-dependent/issue-67144-1.rs +++ b/src/test/ui/const-generics/type-dependent/issue-67144-1.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct X; diff --git a/src/test/ui/const-generics/type-dependent/issue-67144-2.rs b/src/test/ui/const-generics/type-dependent/issue-67144-2.rs index 0868d309b33..a1163fca8d4 100644 --- a/src/test/ui/const-generics/type-dependent/issue-67144-2.rs +++ b/src/test/ui/const-generics/type-dependent/issue-67144-2.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct A; diff --git a/src/test/ui/const-generics/type-dependent/issue-69816.rs b/src/test/ui/const-generics/type-dependent/issue-69816.rs index 4a374dc1db6..75ddd839f66 100644 --- a/src/test/ui/const-generics/type-dependent/issue-69816.rs +++ b/src/test/ui/const-generics/type-dependent/issue-69816.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait IterExt: Sized + Iterator { fn default_for_size(self) -> [Self::Item; N] diff --git a/src/test/ui/const-generics/type-dependent/issue-70217.rs b/src/test/ui/const-generics/type-dependent/issue-70217.rs index ba5a42e47e9..b3585d5fc10 100644 --- a/src/test/ui/const-generics/type-dependent/issue-70217.rs +++ b/src/test/ui/const-generics/type-dependent/issue-70217.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Struct; diff --git a/src/test/ui/const-generics/type-dependent/issue-70507.rs b/src/test/ui/const-generics/type-dependent/issue-70507.rs index 234c09e04ae..df7c277f605 100644 --- a/src/test/ui/const-generics/type-dependent/issue-70507.rs +++ b/src/test/ui/const-generics/type-dependent/issue-70507.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait ConstChunksExactTrait { fn const_chunks_exact(&self) -> ConstChunksExact<'_, T, {N}>; diff --git a/src/test/ui/const-generics/type-dependent/issue-70586.rs b/src/test/ui/const-generics/type-dependent/issue-70586.rs index fd52373cee2..5fb571f2394 100644 --- a/src/test/ui/const-generics/type-dependent/issue-70586.rs +++ b/src/test/ui/const-generics/type-dependent/issue-70586.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::marker::PhantomData; diff --git a/src/test/ui/const-generics/type-dependent/issue-71348.min.stderr b/src/test/ui/const-generics/type-dependent/issue-71348.min.stderr index 8f240f0d930..92f5d815a0f 100644 --- a/src/test/ui/const-generics/type-dependent/issue-71348.min.stderr +++ b/src/test/ui/const-generics/type-dependent/issue-71348.min.stderr @@ -1,5 +1,5 @@ error: `&'static str` is forbidden as the type of a const generic parameter - --> $DIR/issue-71348.rs:11:24 + --> $DIR/issue-71348.rs:10:24 | LL | trait Get<'a, const N: &'static str> { | ^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | trait Get<'a, const N: &'static str> { = help: more complex types are supported with `#[feature(const_generics)]` error: `&'static str` is forbidden as the type of a const generic parameter - --> $DIR/issue-71348.rs:19:25 + --> $DIR/issue-71348.rs:18:25 | LL | fn ask<'a, const N: &'static str>(&'a self) -> &'a >::Target | ^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/type-dependent/issue-71348.rs b/src/test/ui/const-generics/type-dependent/issue-71348.rs index 772e179746d..33735ef87c5 100644 --- a/src/test/ui/const-generics/type-dependent/issue-71348.rs +++ b/src/test/ui/const-generics/type-dependent/issue-71348.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Foo { i: i32, diff --git a/src/test/ui/const-generics/type-dependent/issue-71382.full.stderr b/src/test/ui/const-generics/type-dependent/issue-71382.full.stderr index da1d3270b7c..8ac9bab6320 100644 --- a/src/test/ui/const-generics/type-dependent/issue-71382.full.stderr +++ b/src/test/ui/const-generics/type-dependent/issue-71382.full.stderr @@ -1,5 +1,5 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71382.rs:17:23 + --> $DIR/issue-71382.rs:16:23 | LL | fn test u8>(&self) -> u8 { | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/type-dependent/issue-71382.min.stderr b/src/test/ui/const-generics/type-dependent/issue-71382.min.stderr index da1d3270b7c..8ac9bab6320 100644 --- a/src/test/ui/const-generics/type-dependent/issue-71382.min.stderr +++ b/src/test/ui/const-generics/type-dependent/issue-71382.min.stderr @@ -1,5 +1,5 @@ error: using function pointers as const generic parameters is forbidden - --> $DIR/issue-71382.rs:17:23 + --> $DIR/issue-71382.rs:16:23 | LL | fn test u8>(&self) -> u8 { | ^^^^^^^^^^ diff --git a/src/test/ui/const-generics/type-dependent/issue-71382.rs b/src/test/ui/const-generics/type-dependent/issue-71382.rs index 497fd1381de..b3677613dbc 100644 --- a/src/test/ui/const-generics/type-dependent/issue-71382.rs +++ b/src/test/ui/const-generics/type-dependent/issue-71382.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct Test; diff --git a/src/test/ui/const-generics/type-dependent/issue-71805.rs b/src/test/ui/const-generics/type-dependent/issue-71805.rs index 2aaf12cea4f..3701e14eadc 100644 --- a/src/test/ui/const-generics/type-dependent/issue-71805.rs +++ b/src/test/ui/const-generics/type-dependent/issue-71805.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::mem::MaybeUninit; diff --git a/src/test/ui/const-generics/type-dependent/issue-73730.rs b/src/test/ui/const-generics/type-dependent/issue-73730.rs index 3e53190ee48..5d7dcb9c458 100644 --- a/src/test/ui/const-generics/type-dependent/issue-73730.rs +++ b/src/test/ui/const-generics/type-dependent/issue-73730.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Foo<'a, A>: Iterator { fn bar(&mut self) -> *const [A; N]; diff --git a/src/test/ui/const-generics/type-dependent/non-local.rs b/src/test/ui/const-generics/type-dependent/non-local.rs index 747664a0962..9e4afba3114 100644 --- a/src/test/ui/const-generics/type-dependent/non-local.rs +++ b/src/test/ui/const-generics/type-dependent/non-local.rs @@ -3,7 +3,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] extern crate type_dependent_lib; diff --git a/src/test/ui/const-generics/type-dependent/qpath.rs b/src/test/ui/const-generics/type-dependent/qpath.rs index ec23ff1d221..b61e970cfb3 100644 --- a/src/test/ui/const-generics/type-dependent/qpath.rs +++ b/src/test/ui/const-generics/type-dependent/qpath.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct A; impl A { diff --git a/src/test/ui/const-generics/type-dependent/simple.rs b/src/test/ui/const-generics/type-dependent/simple.rs index 70af6550923..a4776a43b21 100644 --- a/src/test/ui/const-generics/type-dependent/simple.rs +++ b/src/test/ui/const-generics/type-dependent/simple.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct R; diff --git a/src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr b/src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr index a530e63449d..b942c397a8d 100644 --- a/src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr +++ b/src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/type-mismatch.rs:12:27 + --> $DIR/type-mismatch.rs:11:27 | LL | assert_eq!(R.method::<1u16>(), 1); | ^^^^ expected `u8`, found `u16` diff --git a/src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr b/src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr index a530e63449d..b942c397a8d 100644 --- a/src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr +++ b/src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/type-mismatch.rs:12:27 + --> $DIR/type-mismatch.rs:11:27 | LL | assert_eq!(R.method::<1u16>(), 1); | ^^^^ expected `u8`, found `u16` diff --git a/src/test/ui/const-generics/type-dependent/type-mismatch.rs b/src/test/ui/const-generics/type-dependent/type-mismatch.rs index 67d80973f03..7fba1afe918 100644 --- a/src/test/ui/const-generics/type-dependent/type-mismatch.rs +++ b/src/test/ui/const-generics/type-dependent/type-mismatch.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct R; diff --git a/src/test/ui/const-generics/type_of_anon_const.rs b/src/test/ui/const-generics/type_of_anon_const.rs index f424fd03341..9a2e9f09319 100644 --- a/src/test/ui/const-generics/type_of_anon_const.rs +++ b/src/test/ui/const-generics/type_of_anon_const.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait T { fn l() -> usize; diff --git a/src/test/ui/const-generics/types-mismatch-const-args.full.stderr b/src/test/ui/const-generics/types-mismatch-const-args.full.stderr index 265e9ee618b..480ecdb3873 100644 --- a/src/test/ui/const-generics/types-mismatch-const-args.full.stderr +++ b/src/test/ui/const-generics/types-mismatch-const-args.full.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/types-mismatch-const-args.rs:15:41 + --> $DIR/types-mismatch-const-args.rs:14:41 | LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data: PhantomData }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2_u32`, found `4_u32` @@ -8,7 +8,7 @@ LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data found type `4_u32` error[E0308]: mismatched types - --> $DIR/types-mismatch-const-args.rs:17:41 + --> $DIR/types-mismatch-const-args.rs:16:41 | LL | let _: A<'a, u16, {2u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData }; | -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `u32` diff --git a/src/test/ui/const-generics/types-mismatch-const-args.min.stderr b/src/test/ui/const-generics/types-mismatch-const-args.min.stderr index 27277f0c0be..c19c8db737a 100644 --- a/src/test/ui/const-generics/types-mismatch-const-args.min.stderr +++ b/src/test/ui/const-generics/types-mismatch-const-args.min.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/types-mismatch-const-args.rs:15:41 + --> $DIR/types-mismatch-const-args.rs:14:41 | LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data: PhantomData }; | -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2_u32`, found `4_u32` @@ -10,7 +10,7 @@ LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data found struct `A<'_, _, 4_u32, _>` error[E0308]: mismatched types - --> $DIR/types-mismatch-const-args.rs:17:41 + --> $DIR/types-mismatch-const-args.rs:16:41 | LL | let _: A<'a, u16, {2u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData }; | -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `u32` diff --git a/src/test/ui/const-generics/types-mismatch-const-args.rs b/src/test/ui/const-generics/types-mismatch-const-args.rs index 34b85304cc4..14cef083d83 100644 --- a/src/test/ui/const-generics/types-mismatch-const-args.rs +++ b/src/test/ui/const-generics/types-mismatch-const-args.rs @@ -1,7 +1,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] // tests the diagnostic output of type mismatches for types that have const generics arguments. diff --git a/src/test/ui/const-generics/uninferred-consts-during-codegen-1.rs b/src/test/ui/const-generics/uninferred-consts-during-codegen-1.rs index 45afbdc9ab1..9592f266230 100644 --- a/src/test/ui/const-generics/uninferred-consts-during-codegen-1.rs +++ b/src/test/ui/const-generics/uninferred-consts-during-codegen-1.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::fmt; diff --git a/src/test/ui/const-generics/uninferred-consts-during-codegen-2.rs b/src/test/ui/const-generics/uninferred-consts-during-codegen-2.rs index 65ae05e1198..4bab2bb5a77 100644 --- a/src/test/ui/const-generics/uninferred-consts-during-codegen-2.rs +++ b/src/test/ui/const-generics/uninferred-consts-during-codegen-2.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] use std::fmt; diff --git a/src/test/ui/const-generics/unknown_adt.full.stderr b/src/test/ui/const-generics/unknown_adt.full.stderr index 94f3165eaec..b8b2e90aa66 100644 --- a/src/test/ui/const-generics/unknown_adt.full.stderr +++ b/src/test/ui/const-generics/unknown_adt.full.stderr @@ -1,5 +1,5 @@ error[E0412]: cannot find type `UnknownStruct` in this scope - --> $DIR/unknown_adt.rs:8:12 + --> $DIR/unknown_adt.rs:7:12 | LL | let _: UnknownStruct<7>; | ^^^^^^^^^^^^^ not found in this scope diff --git a/src/test/ui/const-generics/unknown_adt.min.stderr b/src/test/ui/const-generics/unknown_adt.min.stderr index 94f3165eaec..b8b2e90aa66 100644 --- a/src/test/ui/const-generics/unknown_adt.min.stderr +++ b/src/test/ui/const-generics/unknown_adt.min.stderr @@ -1,5 +1,5 @@ error[E0412]: cannot find type `UnknownStruct` in this scope - --> $DIR/unknown_adt.rs:8:12 + --> $DIR/unknown_adt.rs:7:12 | LL | let _: UnknownStruct<7>; | ^^^^^^^^^^^^^ not found in this scope diff --git a/src/test/ui/const-generics/unknown_adt.rs b/src/test/ui/const-generics/unknown_adt.rs index c6131402aeb..977f90aad11 100644 --- a/src/test/ui/const-generics/unknown_adt.rs +++ b/src/test/ui/const-generics/unknown_adt.rs @@ -2,7 +2,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] fn main() { let _: UnknownStruct<7>; diff --git a/src/test/ui/const-generics/unused-const-param.rs b/src/test/ui/const-generics/unused-const-param.rs index 3c305167b4b..2918e399dc8 100644 --- a/src/test/ui/const-generics/unused-const-param.rs +++ b/src/test/ui/const-generics/unused-const-param.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] struct A; // ok diff --git a/src/test/ui/const-generics/unused_braces.full.fixed b/src/test/ui/const-generics/unused_braces.full.fixed index 1b075ade16a..46d57e0dcfc 100644 --- a/src/test/ui/const-generics/unused_braces.full.fixed +++ b/src/test/ui/const-generics/unused_braces.full.fixed @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![warn(unused_braces)] diff --git a/src/test/ui/const-generics/unused_braces.full.stderr b/src/test/ui/const-generics/unused_braces.full.stderr index 1752779a60a..8899139aa6b 100644 --- a/src/test/ui/const-generics/unused_braces.full.stderr +++ b/src/test/ui/const-generics/unused_braces.full.stderr @@ -1,11 +1,11 @@ warning: unnecessary braces around const expression - --> $DIR/unused_braces.rs:15:14 + --> $DIR/unused_braces.rs:14:14 | LL | let _: A<{ 7 }>; | ^^^^^ help: remove these braces | note: the lint level is defined here - --> $DIR/unused_braces.rs:8:9 + --> $DIR/unused_braces.rs:7:9 | LL | #![warn(unused_braces)] | ^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/unused_braces.min.fixed b/src/test/ui/const-generics/unused_braces.min.fixed index 1b075ade16a..46d57e0dcfc 100644 --- a/src/test/ui/const-generics/unused_braces.min.fixed +++ b/src/test/ui/const-generics/unused_braces.min.fixed @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![warn(unused_braces)] diff --git a/src/test/ui/const-generics/unused_braces.min.stderr b/src/test/ui/const-generics/unused_braces.min.stderr index 1752779a60a..8899139aa6b 100644 --- a/src/test/ui/const-generics/unused_braces.min.stderr +++ b/src/test/ui/const-generics/unused_braces.min.stderr @@ -1,11 +1,11 @@ warning: unnecessary braces around const expression - --> $DIR/unused_braces.rs:15:14 + --> $DIR/unused_braces.rs:14:14 | LL | let _: A<{ 7 }>; | ^^^^^ help: remove these braces | note: the lint level is defined here - --> $DIR/unused_braces.rs:8:9 + --> $DIR/unused_braces.rs:7:9 | LL | #![warn(unused_braces)] | ^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/unused_braces.rs b/src/test/ui/const-generics/unused_braces.rs index 31c4caf7ab8..0348bbacaab 100644 --- a/src/test/ui/const-generics/unused_braces.rs +++ b/src/test/ui/const-generics/unused_braces.rs @@ -4,7 +4,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] #![warn(unused_braces)] diff --git a/src/test/ui/const-generics/wf-misc.full.stderr b/src/test/ui/const-generics/wf-misc.full.stderr index 4af48fa1590..dfb593a9507 100644 --- a/src/test/ui/const-generics/wf-misc.full.stderr +++ b/src/test/ui/const-generics/wf-misc.full.stderr @@ -1,5 +1,5 @@ error: constant expression depends on a generic parameter - --> $DIR/wf-misc.rs:9:12 + --> $DIR/wf-misc.rs:8:12 | LL | let _: [u8; N + 1]; | ^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | let _: [u8; N + 1]; = note: this may fail depending on what value the parameter takes error: constant expression depends on a generic parameter - --> $DIR/wf-misc.rs:17:12 + --> $DIR/wf-misc.rs:16:12 | LL | let _: Const::<{N + 1}>; | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/wf-misc.min.stderr b/src/test/ui/const-generics/wf-misc.min.stderr index 99142cb6ce7..9967a2218f6 100644 --- a/src/test/ui/const-generics/wf-misc.min.stderr +++ b/src/test/ui/const-generics/wf-misc.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/wf-misc.rs:9:17 + --> $DIR/wf-misc.rs:8:17 | LL | let _: [u8; N + 1]; | ^ cannot perform const operation using `N` @@ -8,7 +8,7 @@ LL | let _: [u8; N + 1]; = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/wf-misc.rs:17:21 + --> $DIR/wf-misc.rs:16:21 | LL | let _: Const::<{N + 1}>; | ^ cannot perform const operation using `N` diff --git a/src/test/ui/const-generics/wf-misc.rs b/src/test/ui/const-generics/wf-misc.rs index 103c580f28f..8a5b6ddfe26 100644 --- a/src/test/ui/const-generics/wf-misc.rs +++ b/src/test/ui/const-generics/wf-misc.rs @@ -3,7 +3,6 @@ #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] pub fn arr_len() { let _: [u8; N + 1]; diff --git a/src/test/ui/const-generics/where-clauses.rs b/src/test/ui/const-generics/where-clauses.rs index cdcaf250942..dc09cad3180 100644 --- a/src/test/ui/const-generics/where-clauses.rs +++ b/src/test/ui/const-generics/where-clauses.rs @@ -2,7 +2,6 @@ // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] -#![cfg_attr(min, feature(min_const_generics))] trait Bar { fn bar() {} } trait Foo: Bar {} diff --git a/src/test/ui/dropck/reject-specialized-drops-8142.rs b/src/test/ui/dropck/reject-specialized-drops-8142.rs index 02e8665cd2e..c9599f6e805 100644 --- a/src/test/ui/dropck/reject-specialized-drops-8142.rs +++ b/src/test/ui/dropck/reject-specialized-drops-8142.rs @@ -1,7 +1,5 @@ // Issue 8142: Test that Drop impls cannot be specialized beyond the // predicates attached to the type definition itself. -#![feature(min_const_generics)] - trait Bound { fn foo(&self) { } } struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } diff --git a/src/test/ui/dropck/reject-specialized-drops-8142.stderr b/src/test/ui/dropck/reject-specialized-drops-8142.stderr index 284cf59c822..cb4d97a8b20 100644 --- a/src/test/ui/dropck/reject-specialized-drops-8142.stderr +++ b/src/test/ui/dropck/reject-specialized-drops-8142.stderr @@ -1,108 +1,108 @@ error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not - --> $DIR/reject-specialized-drops-8142.rs:26:20 + --> $DIR/reject-specialized-drops-8142.rs:24:20 | LL | impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT | ^^^ | note: the implementor must specify the same requirement - --> $DIR/reject-specialized-drops-8142.rs:6:1 + --> $DIR/reject-specialized-drops-8142.rs:4:1 | LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not - --> $DIR/reject-specialized-drops-8142.rs:30:67 + --> $DIR/reject-specialized-drops-8142.rs:28:67 | LL | impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT | ^^^ | note: the implementor must specify the same requirement - --> $DIR/reject-specialized-drops-8142.rs:7:1 + --> $DIR/reject-specialized-drops-8142.rs:5:1 | LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/reject-specialized-drops-8142.rs:36:1 + --> $DIR/reject-specialized-drops-8142.rs:34:1 | LL | impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected struct `N<'n>` found struct `N<'static>` -note: the lifetime `'n` as defined on the struct at 9:10... - --> $DIR/reject-specialized-drops-8142.rs:9:10 +note: the lifetime `'n` as defined on the struct at 7:10... + --> $DIR/reject-specialized-drops-8142.rs:7:10 | LL | struct N<'n> { x: &'n i8 } | ^^ = note: ...does not necessarily outlive the static lifetime error[E0366]: `Drop` impls cannot be specialized - --> $DIR/reject-specialized-drops-8142.rs:43:1 + --> $DIR/reject-specialized-drops-8142.rs:41:1 | LL | impl Drop for P { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: use the same sequence of generic type, lifetime and const parameters as the struct definition - --> $DIR/reject-specialized-drops-8142.rs:11:1 + --> $DIR/reject-specialized-drops-8142.rs:9:1 | LL | struct P { x: *const Tp } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not - --> $DIR/reject-specialized-drops-8142.rs:46:14 + --> $DIR/reject-specialized-drops-8142.rs:44:14 | LL | impl Drop for Q { fn drop(&mut self) { } } // REJECT | ^^^^^ | note: the implementor must specify the same requirement - --> $DIR/reject-specialized-drops-8142.rs:12:1 + --> $DIR/reject-specialized-drops-8142.rs:10:1 | LL | struct Q { x: *const Tq } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: `Drop` impl requires `AddsRBnd: 'rbnd` but the struct it is implemented for does not - --> $DIR/reject-specialized-drops-8142.rs:49:21 + --> $DIR/reject-specialized-drops-8142.rs:47:21 | LL | impl<'rbnd,AddsRBnd:'rbnd> Drop for R { fn drop(&mut self) { } } // REJECT | ^^^^^ | note: the implementor must specify the same requirement - --> $DIR/reject-specialized-drops-8142.rs:13:1 + --> $DIR/reject-specialized-drops-8142.rs:11:1 | LL | struct R { x: *const Tr } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0366]: `Drop` impls cannot be specialized - --> $DIR/reject-specialized-drops-8142.rs:58:1 + --> $DIR/reject-specialized-drops-8142.rs:56:1 | LL | impl Drop for V { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: use the same sequence of generic type, lifetime and const parameters as the struct definition - --> $DIR/reject-specialized-drops-8142.rs:17:1 + --> $DIR/reject-specialized-drops-8142.rs:15:1 | LL | struct V { x: *const Tva, y: *const Tvb } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'lw` due to conflicting requirements - --> $DIR/reject-specialized-drops-8142.rs:61:1 + --> $DIR/reject-specialized-drops-8142.rs:59:1 | LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: first, the lifetime cannot outlive the lifetime `'l1` as defined on the struct at 18:10... - --> $DIR/reject-specialized-drops-8142.rs:18:10 +note: first, the lifetime cannot outlive the lifetime `'l1` as defined on the struct at 16:10... + --> $DIR/reject-specialized-drops-8142.rs:16:10 | LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^ -note: ...but the lifetime must also be valid for the lifetime `'l2` as defined on the struct at 18:15... - --> $DIR/reject-specialized-drops-8142.rs:18:15 +note: ...but the lifetime must also be valid for the lifetime `'l2` as defined on the struct at 16:15... + --> $DIR/reject-specialized-drops-8142.rs:16:15 | LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^ note: ...so that the types are compatible - --> $DIR/reject-specialized-drops-8142.rs:61:1 + --> $DIR/reject-specialized-drops-8142.rs:59:1 | LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -110,61 +110,61 @@ LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJ found `W<'_, '_>` error[E0366]: `Drop` impls cannot be specialized - --> $DIR/reject-specialized-drops-8142.rs:64:1 + --> $DIR/reject-specialized-drops-8142.rs:62:1 | LL | impl Drop for X<3> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: use the same sequence of generic type, lifetime and const parameters as the struct definition - --> $DIR/reject-specialized-drops-8142.rs:19:1 + --> $DIR/reject-specialized-drops-8142.rs:17:1 | LL | struct X; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0366]: `Drop` impls cannot be specialized - --> $DIR/reject-specialized-drops-8142.rs:67:1 + --> $DIR/reject-specialized-drops-8142.rs:65:1 | LL | impl Drop for Y { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: use the same sequence of generic type, lifetime and const parameters as the struct definition - --> $DIR/reject-specialized-drops-8142.rs:20:1 + --> $DIR/reject-specialized-drops-8142.rs:18:1 | LL | struct Y; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the enum it is implemented for does not - --> $DIR/reject-specialized-drops-8142.rs:70:14 + --> $DIR/reject-specialized-drops-8142.rs:68:14 | LL | impl Drop for Enum { fn drop(&mut self) { } } // REJECT | ^^^^^ | note: the implementor must specify the same requirement - --> $DIR/reject-specialized-drops-8142.rs:22:1 + --> $DIR/reject-specialized-drops-8142.rs:20:1 | LL | enum Enum { Variant(T) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not - --> $DIR/reject-specialized-drops-8142.rs:73:14 + --> $DIR/reject-specialized-drops-8142.rs:71:14 | LL | impl Drop for TupleStruct { fn drop(&mut self) { } } // REJECT | ^^^^^ | note: the implementor must specify the same requirement - --> $DIR/reject-specialized-drops-8142.rs:23:1 + --> $DIR/reject-specialized-drops-8142.rs:21:1 | LL | struct TupleStruct(T); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the union it is implemented for does not - --> $DIR/reject-specialized-drops-8142.rs:76:21 + --> $DIR/reject-specialized-drops-8142.rs:74:21 | LL | impl Drop for Union { fn drop(&mut self) { } } // REJECT | ^^^^^ | note: the implementor must specify the same requirement - --> $DIR/reject-specialized-drops-8142.rs:24:1 + --> $DIR/reject-specialized-drops-8142.rs:22:1 | LL | union Union { f: T } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs index 0cfb93d4668..f927dd18903 100644 --- a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs +++ b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs @@ -7,7 +7,7 @@ use core::intrinsics::discriminant_value; enum MyWeirdOption { None = 0, Some(T) = std::mem::size_of::(), - //~^ ERROR constant expression depends on a generic parameter + //~^ ERROR generic parameters may not be used in const operations } fn main() { diff --git a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr index 91d488a07cc..4d57765e13f 100644 --- a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr +++ b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr @@ -1,10 +1,11 @@ -error: constant expression depends on a generic parameter - --> $DIR/issue-70453-generics-in-discr-ice-2.rs:9:15 +error: generic parameters may not be used in const operations + --> $DIR/issue-70453-generics-in-discr-ice-2.rs:9:35 | LL | Some(T) = std::mem::size_of::(), - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ^ cannot perform const operation using `T` | - = note: this may fail depending on what value the parameter takes + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: aborting due to previous error diff --git a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs index 676f1115dde..a0fb788a510 100644 --- a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs +++ b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs @@ -8,7 +8,7 @@ enum MyWeirdOption { //~^ ERROR parameter `T` is never used None = 0, Some = std::mem::size_of::(), - //~^ ERROR constant expression depends on a generic parameter + //~^ ERROR generic parameters may not be used in const operations } fn main() { diff --git a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr index 0dc5432d28c..1d43903928b 100644 --- a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr +++ b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr @@ -1,10 +1,11 @@ -error: constant expression depends on a generic parameter - --> $DIR/issue-70453-generics-in-discr-ice.rs:10:12 +error: generic parameters may not be used in const operations + --> $DIR/issue-70453-generics-in-discr-ice.rs:10:32 | LL | Some = std::mem::size_of::(), - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ^ cannot perform const operation using `T` | - = note: this may fail depending on what value the parameter takes + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error[E0392]: parameter `T` is never used --> $DIR/issue-70453-generics-in-discr-ice.rs:7:20 diff --git a/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.rs b/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.rs index cdc1db4c0b4..e62582fb516 100644 --- a/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.rs +++ b/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.rs @@ -1,4 +1,3 @@ -// run-pass #![feature(arbitrary_enum_discriminant, core_intrinsics)] extern crate core; @@ -8,8 +7,7 @@ use core::intrinsics::discriminant_value; enum MyWeirdOption { None = 0, Some(T) = core::mem::size_of::<*mut T>(), - //~^ WARN cannot use constants which depend on generic parameters in types - //~| WARN this was previously accepted by the compiler but is being phased out + //~^ ERROR generic parameters may not be used } fn main() { diff --git a/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr b/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr index 906927e705e..8c97af263b2 100644 --- a/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr +++ b/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr @@ -1,12 +1,11 @@ -warning: cannot use constants which depend on generic parameters in types - --> $DIR/issue-70453-polymorphic-ctfe.rs:10:15 +error: generic parameters may not be used in const operations + --> $DIR/issue-70453-polymorphic-ctfe.rs:9:41 | LL | Some(T) = core::mem::size_of::<*mut T>(), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^ cannot perform const operation using `T` | - = note: `#[warn(const_evaluatable_unchecked)]` on by default - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #76200 + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions -warning: 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/enum/issue-67945-1.rs b/src/test/ui/enum/issue-67945-1.rs index 7977bddae7b..f4697344cc7 100644 --- a/src/test/ui/enum/issue-67945-1.rs +++ b/src/test/ui/enum/issue-67945-1.rs @@ -1,6 +1,6 @@ -enum Bug { +enum Bug { //~ ERROR parameter `S` is never used Var = { - let x: S = 0; //~ ERROR: mismatched types + let x: S = 0; //~ ERROR generic parameters may not be used 0 }, } diff --git a/src/test/ui/enum/issue-67945-1.stderr b/src/test/ui/enum/issue-67945-1.stderr index 6583fe13d0c..32ca94203e6 100644 --- a/src/test/ui/enum/issue-67945-1.stderr +++ b/src/test/ui/enum/issue-67945-1.stderr @@ -1,17 +1,20 @@ -error[E0308]: mismatched types - --> $DIR/issue-67945-1.rs:3:20 +error: generic parameters may not be used in const operations + --> $DIR/issue-67945-1.rs:3:16 + | +LL | let x: S = 0; + | ^ cannot perform const operation using `S` + | + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions + +error[E0392]: parameter `S` is never used + --> $DIR/issue-67945-1.rs:1:10 | LL | enum Bug { - | - this type parameter -LL | Var = { -LL | let x: S = 0; - | - ^ expected type parameter `S`, found integer - | | - | expected due to this + | ^ unused parameter | - = note: expected type parameter `S` - found type `{integer}` + = help: consider removing `S`, referring to it in a field, or using a marker such as `PhantomData` -error: aborting due to previous error +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0392`. diff --git a/src/test/ui/enum/issue-67945-2.rs b/src/test/ui/enum/issue-67945-2.rs index 16bd8530ab3..e5044468da1 100644 --- a/src/test/ui/enum/issue-67945-2.rs +++ b/src/test/ui/enum/issue-67945-2.rs @@ -1,9 +1,8 @@ #![feature(type_ascription)] -enum Bug { +enum Bug { //~ ERROR parameter `S` is never used Var = 0: S, - //~^ ERROR: mismatched types - //~| ERROR: mismatched types + //~^ ERROR generic parameters may not be used } fn main() {} diff --git a/src/test/ui/enum/issue-67945-2.stderr b/src/test/ui/enum/issue-67945-2.stderr index c40506d59ed..a738d3b15a5 100644 --- a/src/test/ui/enum/issue-67945-2.stderr +++ b/src/test/ui/enum/issue-67945-2.stderr @@ -1,25 +1,20 @@ -error[E0308]: mismatched types - --> $DIR/issue-67945-2.rs:4:11 +error: generic parameters may not be used in const operations + --> $DIR/issue-67945-2.rs:4:14 | -LL | enum Bug { - | - this type parameter LL | Var = 0: S, - | ^ expected type parameter `S`, found integer + | ^ cannot perform const operation using `S` | - = note: expected type parameter `S` - found type `{integer}` + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions -error[E0308]: mismatched types - --> $DIR/issue-67945-2.rs:4:11 +error[E0392]: parameter `S` is never used + --> $DIR/issue-67945-2.rs:3:10 | LL | enum Bug { - | - this type parameter -LL | Var = 0: S, - | ^^^^ expected `isize`, found type parameter `S` + | ^ unused parameter | - = note: expected type `isize` - found type parameter `S` + = help: consider removing `S`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0392`. diff --git a/src/test/ui/error-codes/E0730.stderr b/src/test/ui/error-codes/E0730.stderr index 356e4f36042..f915f6edef5 100644 --- a/src/test/ui/error-codes/E0730.stderr +++ b/src/test/ui/error-codes/E0730.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error[E0730]: cannot pattern-match on an array without a fixed length --> $DIR/E0730.rs:6:9 diff --git a/src/test/ui/error-codes/E0771.stderr b/src/test/ui/error-codes/E0771.stderr index b184b599817..60220be6b57 100644 --- a/src/test/ui/error-codes/E0771.stderr +++ b/src/test/ui/error-codes/E0771.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error[E0771]: use of non-static lifetime `'a` in const generic --> $DIR/E0771.rs:4:41 diff --git a/src/test/ui/feature-gates/feature-gate-const_generics.rs b/src/test/ui/feature-gates/feature-gate-const_generics.rs index fe1ded1c4bb..06364eebef9 100644 --- a/src/test/ui/feature-gates/feature-gate-const_generics.rs +++ b/src/test/ui/feature-gates/feature-gate-const_generics.rs @@ -1,5 +1,5 @@ -fn foo() {} //~ ERROR const generics are unstable +fn foo() {} //~ ERROR `()` is forbidden as the type of a const generic parameter -struct Foo([(); X]); //~ ERROR const generics are unstable +struct Foo([(); X]); fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-const_generics.stderr b/src/test/ui/feature-gates/feature-gate-const_generics.stderr index f80362252f9..b2b7e4576bf 100644 --- a/src/test/ui/feature-gates/feature-gate-const_generics.stderr +++ b/src/test/ui/feature-gates/feature-gate-const_generics.stderr @@ -1,21 +1,11 @@ -error[E0658]: const generics are unstable - --> $DIR/feature-gate-const_generics.rs:1:14 +error: `()` is forbidden as the type of a const generic parameter + --> $DIR/feature-gate-const_generics.rs:1:17 | LL | fn foo() {} - | ^ + | ^^ | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable + = note: the only supported types are integers, `bool` and `char` + = help: more complex types are supported with `#[feature(const_generics)]` -error[E0658]: const generics are unstable - --> $DIR/feature-gate-const_generics.rs:3:18 - | -LL | struct Foo([(); X]); - | ^ - | - = note: see issue #74878 for more information - = help: add `#![feature(min_const_generics)]` to the crate attributes to enable +error: aborting due to previous error -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/generics/param-in-ct-in-ty-param-default.rs b/src/test/ui/generics/param-in-ct-in-ty-param-default.rs index dd89bc0f7a0..3c62e47381c 100644 --- a/src/test/ui/generics/param-in-ct-in-ty-param-default.rs +++ b/src/test/ui/generics/param-in-ct-in-ty-param-default.rs @@ -1,4 +1,4 @@ struct Foo()]>(T, U); -//~^ ERROR constant values inside of type parameter defaults +//~^ ERROR generic parameters may not be used in const operations fn main() {} diff --git a/src/test/ui/generics/param-in-ct-in-ty-param-default.stderr b/src/test/ui/generics/param-in-ct-in-ty-param-default.stderr index ea867240269..41a0a03ff66 100644 --- a/src/test/ui/generics/param-in-ct-in-ty-param-default.stderr +++ b/src/test/ui/generics/param-in-ct-in-ty-param-default.stderr @@ -1,8 +1,11 @@ -error: constant values inside of type parameter defaults must not depend on generic parameters +error: generic parameters may not be used in const operations --> $DIR/param-in-ct-in-ty-param-default.rs:1:44 | LL | struct Foo()]>(T, U); - | ^ the anonymous constant must not depend on the parameter `T` + | ^ cannot perform const operation using `T` + | + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: aborting due to previous error diff --git a/src/test/ui/hygiene/generic_params.stderr b/src/test/ui/hygiene/generic_params.stderr index 6de36deb597..4ca6d199835 100644 --- a/src/test/ui/hygiene/generic_params.stderr +++ b/src/test/ui/hygiene/generic_params.stderr @@ -6,7 +6,6 @@ LL | #![feature(decl_macro, rustc_attrs, const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete warning: 1 warning emitted diff --git a/src/test/ui/hygiene/issue-61574-const-parameters.stderr b/src/test/ui/hygiene/issue-61574-const-parameters.stderr index 3f85383eb33..b351b8b73a0 100644 --- a/src/test/ui/hygiene/issue-61574-const-parameters.stderr +++ b/src/test/ui/hygiene/issue-61574-const-parameters.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete warning: 1 warning emitted diff --git a/src/test/ui/issues/issue-39559.rs b/src/test/ui/issues/issue-39559.rs index 3a75956af52..58d25940733 100644 --- a/src/test/ui/issues/issue-39559.rs +++ b/src/test/ui/issues/issue-39559.rs @@ -12,7 +12,7 @@ impl Dim for Dim3 { pub struct Vector { entries: [T; D::dim()], - //~^ ERROR no function or associated item named `dim` found + //~^ ERROR generic parameters may not be used _dummy: D, } diff --git a/src/test/ui/issues/issue-39559.stderr b/src/test/ui/issues/issue-39559.stderr index 5e8d487f416..91e31ca0bd8 100644 --- a/src/test/ui/issues/issue-39559.stderr +++ b/src/test/ui/issues/issue-39559.stderr @@ -1,11 +1,11 @@ -error[E0599]: no function or associated item named `dim` found for type parameter `D` in the current scope - --> $DIR/issue-39559.rs:14:21 +error: generic parameters may not be used in const operations + --> $DIR/issue-39559.rs:14:18 | LL | entries: [T; D::dim()], - | ^^^ function or associated item not found in `D` + | ^^^^^^ cannot perform const operation using `D` | - = help: items from traits can only be used if the type parameter is bounded by the trait + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: aborting due to previous error -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/issues/issue-59508-1.stderr b/src/test/ui/issues/issue-59508-1.stderr index 2a4ccda8929..5e97339f148 100644 --- a/src/test/ui/issues/issue-59508-1.stderr +++ b/src/test/ui/issues/issue-59508-1.stderr @@ -12,7 +12,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/issues/issue-59508.stderr b/src/test/ui/issues/issue-59508.stderr index c0fdb2ef34a..33e967cebff 100644 --- a/src/test/ui/issues/issue-59508.stderr +++ b/src/test/ui/issues/issue-59508.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-59508.rs:10:25 | LL | pub fn do_things() { - | ----^^--^^----- help: reorder the parameters: lifetimes, then types: `<'a, 'b: 'a, T>` + | ----^^--^^----- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b: 'a, T>` error: aborting due to previous error diff --git a/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.rs b/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.rs index 44cb74815c6..46ae9403c03 100644 --- a/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.rs +++ b/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.rs @@ -4,7 +4,7 @@ pub const fn sof() -> usize { fn test() { let _: [u8; sof::()]; - //~^ ERROR the size for values of type `T` + //~^ ERROR generic parameters may not be used in const operations } fn main() {} diff --git a/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr b/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr index 5a6c86d133b..5c167ea0834 100644 --- a/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr +++ b/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr @@ -1,19 +1,11 @@ -error[E0277]: the size for values of type `T` cannot be known at compilation time +error: generic parameters may not be used in const operations --> $DIR/feature-gate-lazy_normalization_consts.rs:6:23 | -LL | pub const fn sof() -> usize { - | - required by this bound in `sof` -... -LL | fn test() { - | - this type parameter needs to be `Sized` LL | let _: [u8; sof::()]; - | ^ doesn't have a size known at compile-time + | ^ cannot perform const operation using `T` | -help: consider relaxing the implicit `Sized` restriction - | -LL | pub const fn sof() -> usize { - | ^^^^^^^^ + = note: type parameters may not be used in const expressions + = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions error: aborting due to previous error -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/lifetime-before-type-params.stderr b/src/test/ui/lifetime-before-type-params.stderr index 76d7d0f024d..047bc7f6d90 100644 --- a/src/test/ui/lifetime-before-type-params.stderr +++ b/src/test/ui/lifetime-before-type-params.stderr @@ -2,25 +2,25 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/lifetime-before-type-params.rs:2:13 | LL | fn first() {} - | ----^^--^^- help: reorder the parameters: lifetimes, then types: `<'a, 'b, T>` + | ----^^--^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` error: lifetime parameters must be declared prior to type parameters --> $DIR/lifetime-before-type-params.rs:4:18 | LL | fn second<'a, T, 'b>() {} - | --------^^- help: reorder the parameters: lifetimes, then types: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` error: lifetime parameters must be declared prior to type parameters --> $DIR/lifetime-before-type-params.rs:6:16 | LL | fn third() {} - | -------^^- help: reorder the parameters: lifetimes, then types: `<'a, T, U>` + | -------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, U>` error: lifetime parameters must be declared prior to type parameters --> $DIR/lifetime-before-type-params.rs:8:18 | LL | fn fourth<'a, T, 'b, U, 'c, V>() {} - | --------^^-----^^---- help: reorder the parameters: lifetimes, then types: `<'a, 'b, 'c, T, U, V>` + | --------^^-----^^---- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, 'c, T, U, V>` error: aborting due to 4 previous errors diff --git a/src/test/ui/lint/function-item-references.rs b/src/test/ui/lint/function-item-references.rs index 5f7f5e66eaa..05213f4ed4b 100644 --- a/src/test/ui/lint/function-item-references.rs +++ b/src/test/ui/lint/function-item-references.rs @@ -1,5 +1,5 @@ // check-pass -#![feature(c_variadic, min_const_generics)] +#![feature(c_variadic)] #![warn(function_item_references)] use std::fmt::Pointer; use std::fmt::Formatter; diff --git a/src/test/ui/mir/mir-inlining/array-clone-with-generic-size.rs b/src/test/ui/mir/mir-inlining/array-clone-with-generic-size.rs index 8a96303e6b9..eec0a4599c3 100644 --- a/src/test/ui/mir/mir-inlining/array-clone-with-generic-size.rs +++ b/src/test/ui/mir/mir-inlining/array-clone-with-generic-size.rs @@ -3,8 +3,6 @@ // // build-pass // compile-flags: -Zmir-opt-level=2 -Zvalidate-mir -#![feature(min_const_generics)] - #[derive(Clone)] struct Array([T; N]); diff --git a/src/test/ui/parser/issue-14303-enum.stderr b/src/test/ui/parser/issue-14303-enum.stderr index 46f16ea0cc4..bcecd75b1ab 100644 --- a/src/test/ui/parser/issue-14303-enum.stderr +++ b/src/test/ui/parser/issue-14303-enum.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-enum.rs:1:15 | LL | enum X<'a, T, 'b> { - | --------^^- help: reorder the parameters: lifetimes, then types: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/parser/issue-14303-fn-def.stderr b/src/test/ui/parser/issue-14303-fn-def.stderr index 8cbab4b9653..082c37e0be7 100644 --- a/src/test/ui/parser/issue-14303-fn-def.stderr +++ b/src/test/ui/parser/issue-14303-fn-def.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-fn-def.rs:1:15 | LL | fn foo<'a, T, 'b>(x: &'a T) {} - | --------^^- help: reorder the parameters: lifetimes, then types: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/parser/issue-14303-impl.stderr b/src/test/ui/parser/issue-14303-impl.stderr index 56cd4fb3810..3b5615d2a9e 100644 --- a/src/test/ui/parser/issue-14303-impl.stderr +++ b/src/test/ui/parser/issue-14303-impl.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-impl.rs:3:13 | LL | impl<'a, T, 'b> X {} - | --------^^- help: reorder the parameters: lifetimes, then types: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/parser/issue-14303-struct.stderr b/src/test/ui/parser/issue-14303-struct.stderr index f31cb92ad66..dbd0b987dd1 100644 --- a/src/test/ui/parser/issue-14303-struct.stderr +++ b/src/test/ui/parser/issue-14303-struct.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-struct.rs:1:17 | LL | struct X<'a, T, 'b> { - | --------^^- help: reorder the parameters: lifetimes, then types: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/parser/issue-14303-trait.stderr b/src/test/ui/parser/issue-14303-trait.stderr index 0e7399102bf..7dfa62d823f 100644 --- a/src/test/ui/parser/issue-14303-trait.stderr +++ b/src/test/ui/parser/issue-14303-trait.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-trait.rs:1:18 | LL | trait Foo<'a, T, 'b> {} - | --------^^- help: reorder the parameters: lifetimes, then types: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/polymorphization/const_parameters/closures.stderr b/src/test/ui/polymorphization/const_parameters/closures.stderr index 63335586b76..266b6e62afd 100644 --- a/src/test/ui/polymorphization/const_parameters/closures.stderr +++ b/src/test/ui/polymorphization/const_parameters/closures.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics, rustc_attrs)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error: item has unused generic parameters --> $DIR/closures.rs:19:19 diff --git a/src/test/ui/polymorphization/const_parameters/functions.stderr b/src/test/ui/polymorphization/const_parameters/functions.stderr index c976a5b62aa..e379e32c1fc 100644 --- a/src/test/ui/polymorphization/const_parameters/functions.stderr +++ b/src/test/ui/polymorphization/const_parameters/functions.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics, rustc_attrs)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error: item has unused generic parameters --> $DIR/functions.rs:15:8 diff --git a/src/test/ui/polymorphization/generators.stderr b/src/test/ui/polymorphization/generators.stderr index b2b32db045d..c59055ba9d6 100644 --- a/src/test/ui/polymorphization/generators.stderr +++ b/src/test/ui/polymorphization/generators.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics, generators, generator_trait, rustc_attrs)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error: item has unused generic parameters --> $DIR/generators.rs:36:5 diff --git a/src/test/ui/resolve/issue-65035-static-with-parent-generics.stderr b/src/test/ui/resolve/issue-65035-static-with-parent-generics.stderr index 5de8eb21582..7f8151db06f 100644 --- a/src/test/ui/resolve/issue-65035-static-with-parent-generics.stderr +++ b/src/test/ui/resolve/issue-65035-static-with-parent-generics.stderr @@ -48,7 +48,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete error: aborting due to 5 previous errors; 1 warning emitted diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr index 11155038a91..861a4a80ad6 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr @@ -521,7 +521,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete warning: the feature `let_chains` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/disallowed-positions.rs:22:12 diff --git a/src/test/ui/simd/simd-array-type.rs b/src/test/ui/simd/simd-array-type.rs index e84186a42ad..7d66395a3c8 100644 --- a/src/test/ui/simd/simd-array-type.rs +++ b/src/test/ui/simd/simd-array-type.rs @@ -3,7 +3,7 @@ // pretty-expanded FIXME #23616 -#![feature(repr_simd, platform_intrinsics, min_const_generics)] +#![feature(repr_simd, platform_intrinsics)] #[repr(simd)] #[derive(Copy, Clone)] diff --git a/src/test/ui/simd/simd-generics.rs b/src/test/ui/simd/simd-generics.rs index dedca6276cd..50a4bfd9f51 100644 --- a/src/test/ui/simd/simd-generics.rs +++ b/src/test/ui/simd/simd-generics.rs @@ -1,6 +1,6 @@ // run-pass #![allow(non_camel_case_types)] -#![feature(repr_simd, platform_intrinsics, min_const_generics)] +#![feature(repr_simd, platform_intrinsics)] use std::ops; diff --git a/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs b/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs index 4c459fa4bc8..c11d14b99d4 100644 --- a/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs +++ b/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs @@ -2,7 +2,7 @@ // ignore-emscripten #![allow(non_camel_case_types)] -#![feature(repr_simd, platform_intrinsics, min_const_generics)] +#![feature(repr_simd, platform_intrinsics)] #[repr(simd)] #[derive(Copy, Clone, PartialEq, Debug)] diff --git a/src/test/ui/simd/simd-intrinsic-generic-arithmetic.rs b/src/test/ui/simd/simd-intrinsic-generic-arithmetic.rs index 5b0ff88432e..96c2c6c5399 100644 --- a/src/test/ui/simd/simd-intrinsic-generic-arithmetic.rs +++ b/src/test/ui/simd/simd-intrinsic-generic-arithmetic.rs @@ -3,7 +3,7 @@ // ignore-emscripten FIXME(#45351) hits an LLVM assert -#![feature(repr_simd, platform_intrinsics, min_const_generics)] +#![feature(repr_simd, platform_intrinsics)] #[repr(simd)] #[derive(Copy, Clone)] diff --git a/src/test/ui/suggestions/suggest-move-lifetimes.stderr b/src/test/ui/suggestions/suggest-move-lifetimes.stderr index 1851c8deaa8..657914d1c8c 100644 --- a/src/test/ui/suggestions/suggest-move-lifetimes.stderr +++ b/src/test/ui/suggestions/suggest-move-lifetimes.stderr @@ -2,25 +2,25 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:1:13 | LL | struct A { - | ----^^- help: reorder the parameters: lifetimes, then types: `<'a, T>` + | ----^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:5:13 | LL | struct B { - | ----^^---- help: reorder the parameters: lifetimes, then types: `<'a, T, U>` + | ----^^---- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, U>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:10:16 | LL | struct C { - | -------^^- help: reorder the parameters: lifetimes, then types: `<'a, T, U>` + | -------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, U>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:15:16 | LL | struct D { - | -------^^--^^-----^^- help: reorder the parameters: lifetimes, then types: `<'a, 'b, 'c, T, U, V>` + | -------^^--^^-----^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, 'c, T, U, V>` error: aborting due to 4 previous errors diff --git a/src/test/ui/symbol-names/const-generics-demangling.rs b/src/test/ui/symbol-names/const-generics-demangling.rs index e002124059f..55ab17fcd5a 100644 --- a/src/test/ui/symbol-names/const-generics-demangling.rs +++ b/src/test/ui/symbol-names/const-generics-demangling.rs @@ -1,7 +1,6 @@ // build-fail // compile-flags: -Z symbol-mangling-version=v0 - -#![feature(min_const_generics, rustc_attrs)] +#![feature(rustc_attrs)] pub struct Unsigned; diff --git a/src/test/ui/symbol-names/const-generics-demangling.stderr b/src/test/ui/symbol-names/const-generics-demangling.stderr index 022b3188373..a9574cacea3 100644 --- a/src/test/ui/symbol-names/const-generics-demangling.stderr +++ b/src/test/ui/symbol-names/const-generics-demangling.stderr @@ -1,71 +1,71 @@ error: symbol-name(_RMCs4fqI2P2rA04_25const_generics_demanglingINtB0_8UnsignedKhb_E) - --> $DIR/const-generics-demangling.rs:8:1 + --> $DIR/const-generics-demangling.rs:7:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(>) - --> $DIR/const-generics-demangling.rs:8:1 + --> $DIR/const-generics-demangling.rs:7:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(>) - --> $DIR/const-generics-demangling.rs:8:1 + --> $DIR/const-generics-demangling.rs:7:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: symbol-name(_RMs_Cs4fqI2P2rA04_25const_generics_demanglingINtB2_6SignedKsn98_E) - --> $DIR/const-generics-demangling.rs:16:1 + --> $DIR/const-generics-demangling.rs:15:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(>) - --> $DIR/const-generics-demangling.rs:16:1 + --> $DIR/const-generics-demangling.rs:15:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(>) - --> $DIR/const-generics-demangling.rs:16:1 + --> $DIR/const-generics-demangling.rs:15:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: symbol-name(_RMs0_Cs4fqI2P2rA04_25const_generics_demanglingINtB3_4BoolKb1_E) - --> $DIR/const-generics-demangling.rs:24:1 + --> $DIR/const-generics-demangling.rs:23:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(>) - --> $DIR/const-generics-demangling.rs:24:1 + --> $DIR/const-generics-demangling.rs:23:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(>) - --> $DIR/const-generics-demangling.rs:24:1 + --> $DIR/const-generics-demangling.rs:23:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: symbol-name(_RMs1_Cs4fqI2P2rA04_25const_generics_demanglingINtB3_4CharKc2202_E) - --> $DIR/const-generics-demangling.rs:32:1 + --> $DIR/const-generics-demangling.rs:31:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(>) - --> $DIR/const-generics-demangling.rs:32:1 + --> $DIR/const-generics-demangling.rs:31:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(>) - --> $DIR/const-generics-demangling.rs:32:1 + --> $DIR/const-generics-demangling.rs:31:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/symbol-names/const-generics.rs b/src/test/ui/symbol-names/const-generics.rs index 823995e5be3..2d136e6a99a 100644 --- a/src/test/ui/symbol-names/const-generics.rs +++ b/src/test/ui/symbol-names/const-generics.rs @@ -1,87 +1,85 @@ // check-pass // revisions: legacy v0 //[legacy]compile-flags: -Z symbol-mangling-version=legacy --crate-type=lib - //[v0]compile-flags: -Z symbol-mangling-version=v0 --crate-type=lib +//[v0]compile-flags: -Z symbol-mangling-version=v0 --crate-type=lib - #![feature(min_const_generics)] +// `char` +pub struct Char; - // `char` - pub struct Char; +impl Char<'A'> { + pub fn foo() {} +} - impl Char<'A'> { - pub fn foo() {} - } +impl Char { + pub fn bar() {} +} - impl Char { - pub fn bar() {} - } +// `i8` +pub struct I8; - // `i8` - pub struct I8; +impl I8<{i8::MIN}> { + pub fn foo() {} +} - impl I8<{i8::MIN}> { - pub fn foo() {} - } +impl I8<{i8::MAX}> { + pub fn foo() {} +} - impl I8<{i8::MAX}> { - pub fn foo() {} - } +impl I8 { + pub fn bar() {} +} - impl I8 { - pub fn bar() {} - } +// `i16` +pub struct I16; - // `i16` - pub struct I16; +impl I16<{i16::MIN}> { + pub fn foo() {} +} - impl I16<{i16::MIN}> { - pub fn foo() {} - } +impl I16 { + pub fn bar() {} +} - impl I16 { - pub fn bar() {} - } +// `i32` +pub struct I32; - // `i32` - pub struct I32; +impl I32<{i32::MIN}> { + pub fn foo() {} +} - impl I32<{i32::MIN}> { - pub fn foo() {} - } +impl I32 { + pub fn bar() {} +} - impl I32 { - pub fn bar() {} - } +// `i64` +pub struct I64; - // `i64` - pub struct I64; +impl I64<{i64::MIN}> { + pub fn foo() {} +} - impl I64<{i64::MIN}> { - pub fn foo() {} - } +impl I64 { + pub fn bar() {} +} - impl I64 { - pub fn bar() {} - } +// `i128` +pub struct I128; - // `i128` - pub struct I128; +impl I128<{i128::MIN}> { + pub fn foo() {} +} - impl I128<{i128::MIN}> { - pub fn foo() {} - } +impl I128 { + pub fn bar() {} +} - impl I128 { - pub fn bar() {} - } +// `isize` +pub struct ISize; - // `isize` - pub struct ISize; +impl ISize<3> { + pub fn foo() {} +} - impl ISize<3> { - pub fn foo() {} - } - - impl ISize { - pub fn bar() {} - } +impl ISize { + pub fn bar() {} +} diff --git a/src/test/ui/symbol-names/issue-76365.rs b/src/test/ui/symbol-names/issue-76365.rs index 61ba255dac0..c2e9f92f7b5 100644 --- a/src/test/ui/symbol-names/issue-76365.rs +++ b/src/test/ui/symbol-names/issue-76365.rs @@ -1,9 +1,8 @@ // check-pass // revisions: legacy v0 //[legacy]compile-flags: -Z symbol-mangling-version=legacy --crate-type=lib - //[v0]compile-flags: -Z symbol-mangling-version=v0 --crate-type=lib +//[v0]compile-flags: -Z symbol-mangling-version=v0 --crate-type=lib -#![feature(min_const_generics)] pub struct Bar; diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-const.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-const.stderr index c5b22f0026d..e0c1b023861 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-const.stderr +++ b/src/test/ui/type-alias-impl-trait/assoc-type-const.stderr @@ -6,7 +6,6 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information - = help: consider using `min_const_generics` instead, which is more stable and complete warning: 1 warning emitted