diff options
| author | Michael Goulet <michael@errs.io> | 2024-03-05 18:23:01 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-03-08 20:56:25 +0000 |
| commit | c63f3feb0fcde0d59004f30ab8f8d2f38da74754 (patch) | |
| tree | 19efd92b3e468d6e8daad87148b01e1fbda09430 /compiler/rustc_trait_selection/src | |
| parent | a655e648a9f94d74263108366b83e677af56e35d (diff) | |
| download | rust-c63f3feb0fcde0d59004f30ab8f8d2f38da74754.tar.gz rust-c63f3feb0fcde0d59004f30ab8f8d2f38da74754.zip | |
Stabilize associated type bounds
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/lib.rs b/compiler/rustc_trait_selection/src/lib.rs index fd3d62d1321..9fac0ea7715 100644 --- a/compiler/rustc_trait_selection/src/lib.rs +++ b/compiler/rustc_trait_selection/src/lib.rs @@ -17,7 +17,7 @@ #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] #![feature(assert_matches)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(associated_type_defaults)] #![feature(box_patterns)] #![feature(control_flow_enum)] diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index 1241227a5af..367c915c53d 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -194,8 +194,7 @@ pub fn suggest_restriction<'tcx, G: EmissionGuarantee>( sugg.extend(ty_spans.into_iter().map(|s| (s, type_param_name.to_string()))); // Suggest `fn foo<T: Trait>(t: T) where <T as Trait>::A: Bound`. - // FIXME: once `#![feature(associated_type_bounds)]` is stabilized, we should suggest - // `fn foo(t: impl Trait<A: Bound>)` instead. + // FIXME: we should suggest `fn foo(t: impl Trait<A: Bound>)` instead. err.multipart_suggestion( "introduce a type parameter with a trait bound instead of using `impl Trait`", sugg, |
