From 1dd00e60b92cba4a84da0946ef63346e12ebd3d2 Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Tue, 1 Sep 2020 16:17:41 +0200 Subject: [PATCH] add tracking issue, fix rebase --- compiler/rustc_session/src/lint/builtin.rs | 2 +- .../rustc_trait_selection/src}/traits/const_evaluatable.rs | 2 +- src/test/ui/const_evaluatable/function-call.stderr | 2 +- .../ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr | 2 +- src/test/ui/lazy_normalization_consts/issue-73980.stderr | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename {src/librustc_trait_selection => compiler/rustc_trait_selection/src}/traits/const_evaluatable.rs (96%) diff --git a/compiler/rustc_session/src/lint/builtin.rs b/compiler/rustc_session/src/lint/builtin.rs index 66497df66cad5..2bcf10b8b3878 100644 --- a/compiler/rustc_session/src/lint/builtin.rs +++ b/compiler/rustc_session/src/lint/builtin.rs @@ -544,7 +544,7 @@ declare_lint! { Warn, "detects a generic constant is used in a type without a emitting a warning", @future_incompatible = FutureIncompatibleInfo { - reference: "TODO", + reference: "issue #76200 ", edition: None, }; } diff --git a/src/librustc_trait_selection/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs similarity index 96% rename from src/librustc_trait_selection/traits/const_evaluatable.rs rename to compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index 87762cc43a199..013cd71ea305d 100644 --- a/src/librustc_trait_selection/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -18,7 +18,7 @@ pub fn is_const_evaluatable<'cx, 'tcx>( if let Some(local_def_id) = def.did.as_local() { infcx.tcx.struct_span_lint_hir( lint::builtin::CONST_EVALUATABLE_UNCHECKED, - infcx.tcx.hir().as_local_hir_id(local_def_id), + infcx.tcx.hir().local_def_id_to_hir_id(local_def_id), span, |err| { err.build("cannot use constants which depend on generic parameters in types") diff --git a/src/test/ui/const_evaluatable/function-call.stderr b/src/test/ui/const_evaluatable/function-call.stderr index 5240015c37a34..a15637196062f 100644 --- a/src/test/ui/const_evaluatable/function-call.stderr +++ b/src/test/ui/const_evaluatable/function-call.stderr @@ -6,7 +6,7 @@ LL | let _ = [0; foo::()]; | = 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 TODO + = note: for more information, see issue #76200 warning: 1 warning emitted 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 2aeb1b32bcb0a..906927e705ee8 100644 --- a/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr +++ b/src/test/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr @@ -6,7 +6,7 @@ LL | Some(T) = core::mem::size_of::<*mut 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 TODO + = note: for more information, see issue #76200 warning: 1 warning emitted diff --git a/src/test/ui/lazy_normalization_consts/issue-73980.stderr b/src/test/ui/lazy_normalization_consts/issue-73980.stderr index 8636407a3a102..5ed1ca362f411 100644 --- a/src/test/ui/lazy_normalization_consts/issue-73980.stderr +++ b/src/test/ui/lazy_normalization_consts/issue-73980.stderr @@ -6,7 +6,7 @@ LL | impl X::S]> {} | = 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 TODO + = note: for more information, see issue #76200 warning: 1 warning emitted