about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-01-21 09:17:40 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-02-11 09:19:37 +0000
commitc294da3310301027dfa304b270c5d0ab78c2b851 (patch)
treefc4f8c2a7d41fd17f97358c612c2fab584c6d414 /compiler/rustc_hir_analysis/src
parentc182ce9cbc8c29ebc1b4559d027df545e6cdd287 (diff)
downloadrust-c294da3310301027dfa304b270c5d0ab78c2b851.tar.gz
rust-c294da3310301027dfa304b270c5d0ab78c2b851.zip
Reject `impl Trait` bounds in various places where we unconditionally warned since 1.0
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs
index 2834d497694..ef6167907b5 100644
--- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs
+++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs
@@ -102,8 +102,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
                 seen_sized_unbound = true;
                 continue;
             }
-            // There was a `?Trait` bound, but it was not `?Sized`; warn.
-            self.dcx().span_warn(
+            // There was a `?Trait` bound, but it was not `?Sized`
+            self.dcx().span_err(
                 unbound.span,
                 "relaxing a default bound only does something for `?Sized`; \
                 all other traits are not bound by default",