diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index ef0902e42261c..1d8b31ed87974 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -614,7 +614,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // codegen'd / interpreted as virtual calls through the vtable. ty::InstanceKind::Virtual(def_id, idx) => { let mut args = args.to_vec(); - // We have to implement all "dyn-compatible receivers". So we have to go search for a + // We have to implement all "dyn compatible receivers". So we have to go search for a // pointer or `dyn Trait` type, but it could be wrapped in newtypes. So recursively // unwrap those newtypes until we are there. // An `InPlace` does nothing here, we keep the original receiver intact. We can't diff --git a/compiler/rustc_error_codes/src/error_codes/E0038.md b/compiler/rustc_error_codes/src/error_codes/E0038.md index 014d8c4f761ca..f9ec1726962fb 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0038.md +++ b/compiler/rustc_error_codes/src/error_codes/E0038.md @@ -5,9 +5,9 @@ trait, written in type positions) but this was a bit too confusing, so we now write `dyn Trait`. Some traits are not allowed to be used as trait object types. The traits that -are allowed to be used as trait object types are called "dyn-compatible"[^1] +are allowed to be used as trait object types are called "dyn compatible"[^1] traits. Attempting to use a trait object type for a trait that is not -dyn-compatible will trigger error E0038. +dyn compatible will trigger error E0038. Two general aspects of trait object types give rise to the restrictions: @@ -34,7 +34,7 @@ aspects. ### The trait requires `Self: Sized` Traits that are declared as `Trait: Sized` or which otherwise inherit a -constraint of `Self:Sized` are not dyn-compatible. +constraint of `Self:Sized` are not dyn compatible. The reasoning behind this is somewhat subtle. It derives from the fact that Rust requires (and defines) that every trait object type `dyn Trait` automatically @@ -61,7 +61,7 @@ implement a sized trait like `Trait:Sized`. So, rather than allow an exception to the rule that `dyn Trait` always implements `Trait`, Rust chooses to prohibit such a `dyn Trait` from existing at all. -Only unsized traits are considered dyn-compatible. +Only unsized traits are considered dyn compatible. Generally, `Self: Sized` is used to indicate that the trait should not be used as a trait object. If the trait comes from your own crate, consider removing @@ -106,7 +106,7 @@ fn call_foo(x: Box) { } ``` -If only some methods aren't dyn-compatible, you can add a `where Self: Sized` +If only some methods aren't dyn compatible, you can add a `where Self: Sized` bound on them to mark them as explicitly unavailable to trait objects. The functionality will still be available to all other implementers, including `Box` which is itself sized (assuming you `impl Trait for Box { - fn get_a(&self) -> &A; // note that this is dyn-compatible! + fn get_a(&self) -> &A; // note that this is dyn compatible! } ``` @@ -318,8 +318,8 @@ If the trait `Trait` was deriving from something like `Super` or `get_a()` will definitely return an object of that type. However, if it derives from `Super`, even though `Super` is -dyn-compatible, the method `get_a()` would return an object of unknown type when -called on the function. `Self` type parameters let us make dyn-compatible traits +dyn compatible, the method `get_a()` would return an object of unknown type when +called on the function. `Self` type parameters let us make dyn compatible traits no longer compatible, so they are forbidden when specifying supertraits. There's no easy fix for this. Generally, code will need to be refactored so that diff --git a/compiler/rustc_error_codes/src/error_codes/E0802.md b/compiler/rustc_error_codes/src/error_codes/E0802.md index 21d17f72ddef6..f49ab54c8cd79 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0802.md +++ b/compiler/rustc_error_codes/src/error_codes/E0802.md @@ -1,4 +1,4 @@ -The `Async{Fn, FnMut, FnOnce}` traits are not yet `dyn`-compatible. +The `Async{Fn, FnMut, FnOnce}` traits are not yet dyn compatible. Erroneous code example: diff --git a/compiler/rustc_error_codes/src/lib.rs b/compiler/rustc_error_codes/src/lib.rs index 0e4cb99b8aa0d..7f7036a63878c 100644 --- a/compiler/rustc_error_codes/src/lib.rs +++ b/compiler/rustc_error_codes/src/lib.rs @@ -625,7 +625,7 @@ E0802: 0802, // E0314, // closure outlives stack frame // E0315, // cannot invoke closure outside of its lifetime // E0319, // trait impls for defaulted traits allowed just for structs/enums -// E0372, // coherence not dyn-compatible +// E0372, // coherence not dyn compatible // E0385, // {} in an aliasable location // E0402, // cannot use an outer type parameter in this context // E0406, // merged into 420 diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 6ff70044eed44..a0f8a3f7e19fd 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -159,7 +159,7 @@ declare_features! ( /// then removed. But there was no utility storing it separately, so now /// it's in this list. (removed, no_stack_check, "1.0.0", None, None), - /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn-compatible (object safe). + /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn compatible (object safe). /// Renamed to `dyn_compatible_for_dispatch`. (removed, object_safe_for_dispatch, "1.83.0", Some(43561), Some("renamed to `dyn_compatible_for_dispatch`")), diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index a67a5776449d7..aefa39b2dcae7 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -269,7 +269,7 @@ declare_features! ( (unstable, doc_notable_trait, "1.52.0", Some(45040)), /// Allows using the `may_dangle` attribute (RFC 1327). (unstable, dropck_eyepatch, "1.10.0", Some(34761)), - /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn-compatible[^1]. + /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn compatible[^1]. /// In that case, `dyn Trait: Trait` does not hold. Moreover, coercions and /// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden. /// diff --git a/compiler/rustc_hir_analysis/src/coherence/mod.rs b/compiler/rustc_hir_analysis/src/coherence/mod.rs index 3aad4bafeb5ab..049e04d451320 100644 --- a/compiler/rustc_hir_analysis/src/coherence/mod.rs +++ b/compiler/rustc_hir_analysis/src/coherence/mod.rs @@ -184,7 +184,7 @@ fn check_object_overlap<'tcx>( // check for overlap with the automatic `impl Trait for dyn Trait` if let ty::Dynamic(data, ..) = trait_ref.self_ty().kind() { // This is something like `impl Trait1 for Trait2`. Illegal if - // Trait1 is a supertrait of Trait2 or Trait2 is not dyn-compatible. + // Trait1 is a supertrait of Trait2 or Trait2 is not dyn compatible. let component_def_ids = data.iter().flat_map(|predicate| { match predicate.skip_binder() { diff --git a/compiler/rustc_hir_analysis/src/coherence/orphan.rs b/compiler/rustc_hir_analysis/src/coherence/orphan.rs index 8a1a887766c75..df98333e39b96 100644 --- a/compiler/rustc_hir_analysis/src/coherence/orphan.rs +++ b/compiler/rustc_hir_analysis/src/coherence/orphan.rs @@ -116,7 +116,7 @@ pub(crate) fn orphan_check_impl( // We can allow f to be called on `dyn DynCompatibleTrait + AutoTrait`. // // If we didn't deny `impl AutoTrait for dyn Trait`, it would be unsound - // for the `DynCompatibleTrait` shown above to be dyn-compatible because someone + // for the `DynCompatibleTrait` shown above to be dyn compatible because someone // could take some type implementing `DynCompatibleTrait` but not `AutoTrait`, // unsize it to `dyn DynCompatibleTrait`, and call `.f()` which has no // concrete implementation (issue #50781). diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs index fd49e7e44398b..6591edc862594 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs @@ -80,7 +80,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { if self_ty.span.can_be_used_for_suggestions() && !self.maybe_suggest_impl_trait(self_ty, &mut diag) { - // FIXME: Only emit this suggestion if the trait is dyn-compatible. + // FIXME: Only emit this suggestion if the trait is dyn compatible. diag.multipart_suggestion_verbose(label, sugg, Applicability::MachineApplicable); } // Check if the impl trait that we are considering is an impl of a local trait. @@ -102,7 +102,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { lint.primary_message("trait objects without an explicit `dyn` are deprecated"); if self_ty.span.can_be_used_for_suggestions() { lint.multipart_suggestion_verbose( - "if this is a dyn-compatible trait, use `dyn`", + "if this is a dyn compatible trait, use `dyn`", sugg, Applicability::MachineApplicable, ); diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs index f07384916094e..a53ed6fef658c 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs @@ -771,7 +771,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // give us a `QPath::TypeRelative` with a trait object as // `qself`. In that case, we want to avoid registering a WF obligation // for `dyn MyTrait`, since we don't actually need the trait - // to be dyn-compatible. + // to be dyn compatible. // We manually call `register_wf_obligation` in the success path // below. let ty = self.lowerer().lower_ty(qself); diff --git a/compiler/rustc_hir_typeck/src/method/confirm.rs b/compiler/rustc_hir_typeck/src/method/confirm.rs index 3754fd024282b..00a33ca439e29 100644 --- a/compiler/rustc_hir_typeck/src/method/confirm.rs +++ b/compiler/rustc_hir_typeck/src/method/confirm.rs @@ -307,7 +307,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> { // distinct types (e.g., if `Self` appeared as an // argument type), but those cases have already // been ruled out when we deemed the trait to be - // "dyn-compatible". + // "dyn compatible". let original_poly_trait_ref = principal.with_self_ty(this.tcx, object_ty); let upcast_poly_trait_ref = this.upcast(original_poly_trait_ref, trait_def_id); let upcast_trait_ref = diff --git a/compiler/rustc_lint/messages.ftl b/compiler/rustc_lint/messages.ftl index 6e35d89b48800..d96a1e2f1c012 100644 --- a/compiler/rustc_lint/messages.ftl +++ b/compiler/rustc_lint/messages.ftl @@ -507,7 +507,7 @@ lint_mixed_script_confusables = .includes_note = the usage includes {$includes} .note = please recheck to make sure their usages are indeed what you want -lint_multiple_supertrait_upcastable = `{$ident}` is dyn-compatible and has multiple supertraits +lint_multiple_supertrait_upcastable = `{$ident}` is dyn compatible and has multiple supertraits lint_named_argument_used_positionally = named argument `{$named_arg_name}` is not used by name .label_named_arg = this named argument is referred to by position in formatting string diff --git a/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs b/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs index 9fde35f82d823..e08b5051ffa5f 100644 --- a/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs +++ b/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs @@ -4,7 +4,7 @@ use rustc_session::{declare_lint, declare_lint_pass}; use crate::{LateContext, LateLintPass, LintContext}; declare_lint! { - /// The `multiple_supertrait_upcastable` lint detects when a dyn-compatible trait has multiple + /// The `multiple_supertrait_upcastable` lint detects when a dyn compatible trait has multiple /// supertraits. /// /// ### Example @@ -28,7 +28,7 @@ declare_lint! { /// additional overhead is justified. pub MULTIPLE_SUPERTRAIT_UPCASTABLE, Allow, - "detect when a dyn-compatible trait has multiple supertraits", + "detect when a dyn compatible trait has multiple supertraits", @feature_gate = multiple_supertrait_upcastable; } diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 4068d06f6dfd1..2ac527af9a931 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1367,7 +1367,7 @@ rustc_queries! { desc { |tcx| "determining dyn-compatibility of trait `{}`", tcx.def_path_str(trait_id) } } query is_dyn_compatible(trait_id: DefId) -> bool { - desc { |tcx| "checking if trait `{}` is dyn-compatible", tcx.def_path_str(trait_id) } + desc { |tcx| "checking if trait `{}` is dyn compatible", tcx.def_path_str(trait_id) } } /// Gets the ParameterEnvironment for a given item; this environment diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index ed5cd8dc59766..563c97cfb946b 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -796,7 +796,7 @@ impl DynCompatibilityViolation { format!("it contains the generic associated type `{name}`").into() } DynCompatibilityViolation::AsyncFnTrait { .. } => { - "`async` function traits are not yet `dyn`-compatible".into() + "async function traits are not yet dyn compatible".into() } } } @@ -904,7 +904,7 @@ impl DynCompatibilityViolationSolution { } } -/// Reasons a method might not be dyn-compatible. +/// Reasons a method might not be dyn compatible. #[derive(Clone, Debug, PartialEq, Eq, Hash, HashStable, PartialOrd, Ord)] pub enum MethodViolationCode { /// e.g., `fn foo()` diff --git a/compiler/rustc_middle/src/ty/instance.rs b/compiler/rustc_middle/src/ty/instance.rs index 0d1c56f0d3800..3befe39775e8f 100644 --- a/compiler/rustc_middle/src/ty/instance.rs +++ b/compiler/rustc_middle/src/ty/instance.rs @@ -50,7 +50,7 @@ pub enum ReifyReason { /// * A vtable entry is directly converted to a function call (e.g. creating a fn ptr from a /// method on a `dyn` object). /// * A function with `#[track_caller]` is converted to a function pointer - /// * If KCFI is enabled, creating a function pointer from a method on a dyn-compatible trait. + /// * If KCFI is enabled, creating a function pointer from a method on a dyn compatible trait. /// This includes the case of converting `::call`-like methods on closure-likes to function /// pointers. FnPtr, diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 039c988f5c972..7b0d56fe3b311 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -3115,7 +3115,7 @@ define_print! { ty::PredicateKind::Subtype(predicate) => p!(print(predicate)), ty::PredicateKind::Coerce(predicate) => p!(print(predicate)), ty::PredicateKind::DynCompatible(trait_def_id) => { - p!("the trait `", print_def_path(trait_def_id, &[]), "` is dyn-compatible") + p!("the trait `", print_def_path(trait_def_id, &[]), "` is dyn compatible") } ty::PredicateKind::ConstEquate(c1, c2) => { p!("the constant `", print(c1), "` equals `", print(c2), "`") diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 322deb539cdba..2cbe7064007c8 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -120,7 +120,7 @@ //! #### Unsizing Casts //! A subtle way of introducing use edges is by casting to a trait object. //! Since the resulting wide-pointer contains a reference to a vtable, we need to -//! instantiate all dyn-compatible methods of the trait, as we need to store +//! instantiate all dyn compatible methods of the trait, as we need to store //! pointers to these functions even if they never get called anywhere. This can //! be seen as a special case of taking a function reference. //! diff --git a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs index df4f0ffdd576b..c0eff6aa3b128 100644 --- a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs @@ -792,7 +792,7 @@ where let cx = self.cx(); let Goal { predicate: (a_ty, _), .. } = goal; - // Can only unsize to an dyn-compatible trait. + // Can only unsize to an dyn compatible trait. if b_data.principal_def_id().is_some_and(|def_id| !cx.trait_is_dyn_compatible(def_id)) { return Err(NoSolution); } diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs index cd691f38f71c0..f8620bba1050a 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs @@ -430,7 +430,7 @@ pub fn report_dyn_incompatibility<'tcx>( let trait_str = tcx.def_path_str(trait_def_id); // Avoid errors diving into the details of the `AsyncFn` traits if this is - // a straightforward "`AsyncFn` is not yet `dyn`-compatible" error. + // a straightforward "`AsyncFn` is not yet dyn compatible" error. if tcx.trait_is_async_fn(trait_def_id) { let fn_trait: Symbol = violations .iter() @@ -446,20 +446,20 @@ pub fn report_dyn_incompatibility<'tcx>( tcx.dcx(), span, E0802, - "the trait `{}` is not yet `dyn`-compatible", + "the trait `{}` is not yet dyn compatible", fn_trait ); // Note: this check is quite imprecise. // Comparing the DefIds or similar would be better, but we can't store // DefIds in `DynCompatibilityViolation`. if fn_trait.as_str() == trait_str { - err.span_label(span, format!("`{fn_trait}` is not yet `dyn`-compatible")); + err.span_label(span, format!("`{fn_trait}` is not yet dyn compatible")); } else { let trait_str = tcx.def_path_str(trait_def_id); err.span_label( span, format!( - "`{trait_str}` inherits from `{fn_trait}` which is not yet `dyn`-compatible'" + "`{trait_str}` inherits from `{fn_trait}` which is not yet dyn compatible'" ), ); } @@ -522,7 +522,7 @@ pub fn report_dyn_incompatibility<'tcx>( // FIXME(dyn_compat_renaming): Update the URL. err.span_note( note_span, - "for a trait to be \"dyn-compatible\" it needs to allow building a vtable to allow the call \ + "for a trait to be dyn compatible it needs to allow building a vtable to allow the call \ to be resolvable dynamically; for more information visit \ ", ); diff --git a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs index 12b3a20d1ee9b..eb03fe114bdb6 100644 --- a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs +++ b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs @@ -325,7 +325,7 @@ pub fn dyn_compatibility_violations_for_assoc_item( } match item.kind { - // Associated consts are never dyn-compatible, as they can't have `where` bounds yet at all, + // Associated consts are never dyn compatible, as they can't have `where` bounds yet at all, // and associated const bounds in trait objects aren't a thing yet either. ty::AssocKind::Const => { vec![DynCompatibilityViolation::AssocConst(item.name, item.ident(tcx).span)] @@ -348,7 +348,7 @@ pub fn dyn_compatibility_violations_for_assoc_item( DynCompatibilityViolation::Method(item.name, v, span) }) .collect(), - // Associated types can only be dyn-compatible if they have `Self: Sized` bounds. + // Associated types can only be dyn compatible if they have `Self: Sized` bounds. ty::AssocKind::Type => { if !tcx.features().generic_associated_types_extended() && !tcx.generics_of(item.def_id).is_own_empty() @@ -526,7 +526,7 @@ fn virtual_call_violations_for_method<'tcx>( /// This code checks that `receiver_is_dispatchable` is correctly implemented. /// /// This check is outlined from the dyn-compatibility check to avoid cycles with -/// layout computation, which relies on knowing whether methods are dyn-compatible. +/// layout computation, which relies on knowing whether methods are dyn compatible. fn check_receiver_correct<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId, method: ty::AssocItem) { if !is_vtable_safe_method(tcx, trait_def_id, method) { return; @@ -663,7 +663,7 @@ fn object_ty_for_trait<'tcx>( /// a pointer. /// /// In practice, we cannot use `dyn Trait` explicitly in the obligation because it would result in -/// a new check that `Trait` is dyn-compatible, creating a cycle (until dyn_compatible_for_dispatch +/// a new check that `Trait` is dyn compatible, creating a cycle (until dyn_compatible_for_dispatch /// is stabilized, see tracking issue ). /// Instead, we fudge a little by introducing a new type parameter `U` such that /// `Self: Unsize` and `U: Trait + ?Sized`, and use `U` in place of `dyn Trait`. diff --git a/compiler/rustc_type_ir/src/predicate_kind.rs b/compiler/rustc_type_ir/src/predicate_kind.rs index 21f4456abd114..edf3289b08872 100644 --- a/compiler/rustc_type_ir/src/predicate_kind.rs +++ b/compiler/rustc_type_ir/src/predicate_kind.rs @@ -52,7 +52,7 @@ pub enum PredicateKind { /// Prove a clause Clause(ClauseKind), - /// Trait must be dyn-compatible. + /// Trait must be dyn compatible. DynCompatible(I::DefId), /// `T1 <: T2` diff --git a/tests/ui/associated-consts/associated-const-in-trait.stderr b/tests/ui/associated-consts/associated-const-in-trait.stderr index b40c100579726..b0679fd5f37d5 100644 --- a/tests/ui/associated-consts/associated-const-in-trait.stderr +++ b/tests/ui/associated-consts/associated-const-in-trait.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | impl dyn Trait { | ^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/associated-const-in-trait.rs:4:11 | LL | trait Trait { @@ -19,7 +19,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | const fn n() -> usize { Self::N } | ^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/associated-const-in-trait.rs:4:11 | LL | trait Trait { diff --git a/tests/ui/associated-item/issue-48027.stderr b/tests/ui/associated-item/issue-48027.stderr index 2883259ce2fd8..45c7c02ea354a 100644 --- a/tests/ui/associated-item/issue-48027.stderr +++ b/tests/ui/associated-item/issue-48027.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | impl dyn Bar {} | ^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-48027.rs:2:11 | LL | trait Bar { diff --git a/tests/ui/async-await/async-closures/dyn.rs b/tests/ui/async-await/async-closures/dyn.rs index b667fb5251175..a189a8e5b6a77 100644 --- a/tests/ui/async-await/async-closures/dyn.rs +++ b/tests/ui/async-await/async-closures/dyn.rs @@ -8,27 +8,27 @@ use core::ops::{AsyncFn, AsyncFnMut, AsyncFnOnce}; // --- Explicit `dyn` --- fn takes_async_fn(_: &dyn AsyncFn()) {} -//~^ ERROR the trait `AsyncFn` is not yet `dyn`-compatible +//~^ ERROR the trait `AsyncFn` is not yet dyn compatible fn takes_async_fn_mut(_: &mut dyn AsyncFnMut()) {} -//~^ ERROR the trait `AsyncFnMut` is not yet `dyn`-compatible +//~^ ERROR the trait `AsyncFnMut` is not yet dyn compatible fn takes_async_fn_once(_: Box) {} -//~^ ERROR the trait `AsyncFnOnce` is not yet `dyn`-compatible +//~^ ERROR the trait `AsyncFnOnce` is not yet dyn compatible // --- Non-explicit `dyn` --- #[allow(bare_trait_objects)] fn takes_async_fn_implicit_dyn(_: &AsyncFn()) {} -//~^ ERROR the trait `AsyncFn` is not yet `dyn`-compatible +//~^ ERROR the trait `AsyncFn` is not yet dyn compatible #[allow(bare_trait_objects)] fn takes_async_fn_mut_implicit_dyn(_: &mut AsyncFnMut()) {} -//~^ ERROR the trait `AsyncFnMut` is not yet `dyn`-compatible +//~^ ERROR the trait `AsyncFnMut` is not yet dyn compatible #[allow(bare_trait_objects)] fn takes_async_fn_once_implicit_dyn(_: Box) {} -//~^ ERROR the trait `AsyncFnOnce` is not yet `dyn`-compatible +//~^ ERROR the trait `AsyncFnOnce` is not yet dyn compatible // --- Supertrait --- diff --git a/tests/ui/async-await/async-closures/dyn.stderr b/tests/ui/async-await/async-closures/dyn.stderr index 57b26e604d3d7..cfcd509ed9c4c 100644 --- a/tests/ui/async-await/async-closures/dyn.stderr +++ b/tests/ui/async-await/async-closures/dyn.stderr @@ -1,63 +1,63 @@ -error[E0802]: the trait `AsyncFn` is not yet `dyn`-compatible +error[E0802]: the trait `AsyncFn` is not yet dyn compatible --> $DIR/dyn.rs:10:23 | LL | fn takes_async_fn(_: &dyn AsyncFn()) {} - | ^^^^^^^^^^^^^ `AsyncFn` is not yet `dyn`-compatible + | ^^^^^^^^^^^^^ `AsyncFn` is not yet dyn compatible | help: consider using an opaque type instead | LL | fn takes_async_fn(_: &impl AsyncFn()) {} | ~~~~ -error[E0802]: the trait `AsyncFnMut` is not yet `dyn`-compatible +error[E0802]: the trait `AsyncFnMut` is not yet dyn compatible --> $DIR/dyn.rs:13:31 | LL | fn takes_async_fn_mut(_: &mut dyn AsyncFnMut()) {} - | ^^^^^^^^^^^^^^^^ `AsyncFnMut` is not yet `dyn`-compatible + | ^^^^^^^^^^^^^^^^ `AsyncFnMut` is not yet dyn compatible | help: consider using an opaque type instead | LL | fn takes_async_fn_mut(_: &mut impl AsyncFnMut()) {} | ~~~~ -error[E0802]: the trait `AsyncFnOnce` is not yet `dyn`-compatible +error[E0802]: the trait `AsyncFnOnce` is not yet dyn compatible --> $DIR/dyn.rs:16:31 | LL | fn takes_async_fn_once(_: Box) {} - | ^^^^^^^^^^^^^^^^^ `AsyncFnOnce` is not yet `dyn`-compatible + | ^^^^^^^^^^^^^^^^^ `AsyncFnOnce` is not yet dyn compatible | help: consider using an opaque type instead | LL | fn takes_async_fn_once(_: Box) {} | ~~~~ -error[E0802]: the trait `AsyncFn` is not yet `dyn`-compatible +error[E0802]: the trait `AsyncFn` is not yet dyn compatible --> $DIR/dyn.rs:22:36 | LL | fn takes_async_fn_implicit_dyn(_: &AsyncFn()) {} - | ^^^^^^^^^ `AsyncFn` is not yet `dyn`-compatible + | ^^^^^^^^^ `AsyncFn` is not yet dyn compatible | help: consider using an opaque type instead | LL | fn takes_async_fn_implicit_dyn(_: &impl AsyncFn()) {} | ++++ -error[E0802]: the trait `AsyncFnMut` is not yet `dyn`-compatible +error[E0802]: the trait `AsyncFnMut` is not yet dyn compatible --> $DIR/dyn.rs:26:44 | LL | fn takes_async_fn_mut_implicit_dyn(_: &mut AsyncFnMut()) {} - | ^^^^^^^^^^^^ `AsyncFnMut` is not yet `dyn`-compatible + | ^^^^^^^^^^^^ `AsyncFnMut` is not yet dyn compatible | help: consider using an opaque type instead | LL | fn takes_async_fn_mut_implicit_dyn(_: &mut impl AsyncFnMut()) {} | ++++ -error[E0802]: the trait `AsyncFnOnce` is not yet `dyn`-compatible +error[E0802]: the trait `AsyncFnOnce` is not yet dyn compatible --> $DIR/dyn.rs:30:44 | LL | fn takes_async_fn_once_implicit_dyn(_: Box) {} - | ^^^^^^^^^^^^^ `AsyncFnOnce` is not yet `dyn`-compatible + | ^^^^^^^^^^^^^ `AsyncFnOnce` is not yet dyn compatible | help: consider using an opaque type instead | @@ -70,8 +70,8 @@ error[E0038]: the trait `SubAsyncFn` cannot be made into an object LL | fn takes_sub_async_fn(_: &dyn SubAsyncFn) {} | ^^^^^^^^^^^^^^ `SubAsyncFn` cannot be made into an object | - = note: the trait cannot be made into an object because `async` function traits are not yet `dyn`-compatible - = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = note: the trait cannot be made into an object because async function traits are not yet dyn compatible + = note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit help: consider using an opaque type instead | LL | fn takes_sub_async_fn(_: &impl SubAsyncFn) {} diff --git a/tests/ui/async-await/async-fn/dyn-pos.rs b/tests/ui/async-await/async-fn/dyn-pos.rs index fccd0bc90de7e..3c972315ab225 100644 --- a/tests/ui/async-await/async-fn/dyn-pos.rs +++ b/tests/ui/async-await/async-fn/dyn-pos.rs @@ -3,6 +3,6 @@ #![feature(async_closure)] fn foo(x: &dyn async Fn()) {} -//~^ ERROR the trait `AsyncFn` is not yet `dyn`-compatible +//~^ ERROR the trait `AsyncFn` is not yet dyn compatible fn main() {} diff --git a/tests/ui/async-await/async-fn/dyn-pos.stderr b/tests/ui/async-await/async-fn/dyn-pos.stderr index 20a4b08d7df6a..03904b98b41a4 100644 --- a/tests/ui/async-await/async-fn/dyn-pos.stderr +++ b/tests/ui/async-await/async-fn/dyn-pos.stderr @@ -1,8 +1,8 @@ -error[E0802]: the trait `AsyncFn` is not yet `dyn`-compatible +error[E0802]: the trait `AsyncFn` is not yet dyn compatible --> $DIR/dyn-pos.rs:5:12 | LL | fn foo(x: &dyn async Fn()) {} - | ^^^^^^^^^^^^^^ `AsyncFn` is not yet `dyn`-compatible + | ^^^^^^^^^^^^^^ `AsyncFn` is not yet dyn compatible | help: consider using an opaque type instead | diff --git a/tests/ui/async-await/in-trait/dyn-compatibility.stderr b/tests/ui/async-await/in-trait/dyn-compatibility.stderr index 5cc3b6800ddbc..3c17bef05d8ab 100644 --- a/tests/ui/async-await/in-trait/dyn-compatibility.stderr +++ b/tests/ui/async-await/in-trait/dyn-compatibility.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let x: &dyn Foo = todo!(); | ^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility.rs:5:14 | LL | trait Foo { diff --git a/tests/ui/async-await/inference_var_self_argument.stderr b/tests/ui/async-await/inference_var_self_argument.stderr index 7b7b3dbc757f1..e0cd4bc2d6906 100644 --- a/tests/ui/async-await/inference_var_self_argument.stderr +++ b/tests/ui/async-await/inference_var_self_argument.stderr @@ -13,7 +13,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | async fn foo(self: &dyn Foo) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/inference_var_self_argument.rs:5:14 | LL | trait Foo { diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr index 542be2dbc305c..4da790391b797 100644 --- a/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr +++ b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `DynIncompatible` cannot be made into an object LL | impl DynIncompatible for dyn DynIncompatible { } | ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:6:45 | LL | trait DynIncompatible { fn eq(&self, other: Self); } diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr index 84281eb53c946..bde31840be172 100644 --- a/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr +++ b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `ConstParamTy_` cannot be made into an object LL | fn foo(a: &dyn ConstParamTy_) {} | ^^^^^^^^^^^^^^^^^ `ConstParamTy_` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $SRC_DIR/core/src/cmp.rs:LL:COL | = note: the trait cannot be made into an object because it uses `Self` as a type parameter @@ -19,7 +19,7 @@ error[E0038]: the trait `UnsizedConstParamTy` cannot be made into an object LL | fn bar(a: &dyn UnsizedConstParamTy) {} | ^^^^^^^^^^^^^^^^^^^^^^^ `UnsizedConstParamTy` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $SRC_DIR/core/src/cmp.rs:LL:COL | = note: the trait cannot be made into an object because it uses `Self` as a type parameter diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr index d2017615e67db..091cd4542226e 100644 --- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr +++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | fn use_dyn(v: &dyn Foo) { | ^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility-err-ret.rs:8:8 | LL | trait Foo { @@ -22,7 +22,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | v.test(); | ^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility-err-ret.rs:8:8 | LL | trait Foo { diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr index 26ca2d4df5ffc..2b0274e9401b8 100644 --- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr +++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | fn use_dyn(v: &dyn Foo) { | ^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility-err-where-bounds.rs:8:8 | LL | trait Foo { @@ -20,7 +20,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | v.test(); | ^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility-err-where-bounds.rs:8:8 | LL | trait Foo { diff --git a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr index 9a75f372879fd..be72c3ca4cfc8 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr @@ -98,7 +98,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn f2<'a>(arg: Box = &'a ()>>) {} | ^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-102768.rs:5:10 | LL | trait X { diff --git a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr index 2500409e82858..29a3ea289bae8 100644 --- a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr +++ b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr @@ -24,7 +24,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | trait Trait { | ^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/not_wf_param_in_rpitit.rs:9:14 | LL | trait Trait { @@ -47,7 +47,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | trait Trait { | ^^^^^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/not_wf_param_in_rpitit.rs:9:14 | LL | trait Trait { @@ -70,7 +70,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | trait Trait { | ^^^^^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/not_wf_param_in_rpitit.rs:9:14 | LL | trait Trait { diff --git a/tests/ui/consts/const_refs_to_static-ice-121413.rs b/tests/ui/consts/const_refs_to_static-ice-121413.rs index 7ef67d9a98462..77355cd5e6d3c 100644 --- a/tests/ui/consts/const_refs_to_static-ice-121413.rs +++ b/tests/ui/consts/const_refs_to_static-ice-121413.rs @@ -11,7 +11,7 @@ const REF_INTERIOR_MUT: &usize = { //~| ERROR the size for values of type `(dyn Sync + 'static)` cannot be known at compilation time //~| ERROR the size for values of type `(dyn Sync + 'static)` cannot be known at compilation time //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! - //~| HELP if this is a dyn-compatible trait, use `dyn` + //~| HELP if this is a dyn compatible trait, use `dyn` //~| HELP the trait `Sized` is not implemented for `(dyn Sync + 'static)` //~| HELP the trait `Sized` is not implemented for `(dyn Sync + 'static)` unsafe { &*(&FOO as *const _ as *const usize) } diff --git a/tests/ui/consts/const_refs_to_static-ice-121413.stderr b/tests/ui/consts/const_refs_to_static-ice-121413.stderr index 7beb43d84fb0f..f9e42b8993001 100644 --- a/tests/ui/consts/const_refs_to_static-ice-121413.stderr +++ b/tests/ui/consts/const_refs_to_static-ice-121413.stderr @@ -18,7 +18,7 @@ LL | static FOO: Sync = AtomicUsize::new(0); = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | static FOO: dyn Sync = AtomicUsize::new(0); | +++ diff --git a/tests/ui/did_you_mean/bad-assoc-ty.stderr b/tests/ui/did_you_mean/bad-assoc-ty.stderr index 41039ae82a6fa..5656300984038 100644 --- a/tests/ui/did_you_mean/bad-assoc-ty.stderr +++ b/tests/ui/did_you_mean/bad-assoc-ty.stderr @@ -182,7 +182,7 @@ LL | type H = Fn(u8) -> (u8)::Output; = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | type H = (u8)>::Output; | ++++ + diff --git a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr index 8ef0d17844449..fb52b4b68e998 100644 --- a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr +++ b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr @@ -27,7 +27,7 @@ LL | let _: &Copy + 'static; | ^^^^^ `Copy` cannot be made into an object | = note: the trait cannot be made into an object because it requires `Self: Sized` - = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit error: aborting due to 3 previous errors diff --git a/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr index 99bcccc20c01a..ed18dc1080916 100644 --- a/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr +++ b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | impl Dyn for dyn Foo + '_ { | ^^^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/almost-supertrait-associated-type.rs:33:34 | LL | trait Foo: Super @@ -21,7 +21,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | (&PhantomData:: as &dyn Foo).transmute(t) | ^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/almost-supertrait-associated-type.rs:33:34 | LL | trait Foo: Super @@ -38,7 +38,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | (&PhantomData:: as &dyn Foo).transmute(t) | ^^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/almost-supertrait-associated-type.rs:33:34 | LL | trait Foo: Super diff --git a/tests/ui/dyn-compatibility/associated-consts.curr.stderr b/tests/ui/dyn-compatibility/associated-consts.curr.stderr index 17d184942c701..ba0ef49291280 100644 --- a/tests/ui/dyn-compatibility/associated-consts.curr.stderr +++ b/tests/ui/dyn-compatibility/associated-consts.curr.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | fn make_bar(t: &T) -> &dyn Bar { | ^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/associated-consts.rs:9:11 | LL | trait Bar { @@ -19,7 +19,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/associated-consts.rs:9:11 | LL | trait Bar { diff --git a/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr index cc5120232c244..23c69a50dcef3 100644 --- a/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr +++ b/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/associated-consts.rs:9:11 | LL | trait Bar { diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr index 54daefea31c10..9110d18d75965 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr @@ -7,7 +7,7 @@ LL | fn id(f: Copy) -> usize { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn id(f: dyn Copy) -> usize { | +++ @@ -21,7 +21,7 @@ LL | fn id(f: Copy) -> usize { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn id(f: dyn Copy) -> usize { | +++ @@ -33,7 +33,7 @@ LL | fn id(f: Copy) -> usize { | ^^^^ `Copy` cannot be made into an object | = note: the trait cannot be made into an object because it requires `Self: Sized` - = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit error[E0618]: expected function, found `(dyn Copy + 'static)` --> $DIR/avoid-ice-on-warning-2.rs:12:5 diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr index 6bc2d73a0d0e4..66feef72c16a4 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr @@ -7,7 +7,7 @@ LL | trait B { fn f(a: A) -> A; } = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait B { fn f(a: dyn A) -> A; } | +++ @@ -20,7 +20,7 @@ LL | trait B { fn f(a: A) -> A; } | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait B { fn f(a: A) -> dyn A; } | +++ @@ -33,7 +33,7 @@ LL | trait A { fn g(b: B) -> B; } | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait A { fn g(b: dyn B) -> B; } | +++ @@ -46,7 +46,7 @@ LL | trait A { fn g(b: B) -> B; } | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait A { fn g(b: B) -> dyn B; } | +++ @@ -60,7 +60,7 @@ LL | trait B { fn f(a: A) -> A; } = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait B { fn f(a: dyn A) -> A; } | +++ @@ -71,7 +71,7 @@ error[E0038]: the trait `A` cannot be made into an object LL | trait B { fn f(a: A) -> A; } | ^ `A` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/avoid-ice-on-warning-3.rs:14:14 | LL | trait A { fn g(b: B) -> B; } @@ -96,7 +96,7 @@ LL | trait A { fn g(b: B) -> B; } = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait A { fn g(b: dyn B) -> B; } | +++ @@ -107,7 +107,7 @@ error[E0038]: the trait `B` cannot be made into an object LL | trait A { fn g(b: B) -> B; } | ^ `B` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/avoid-ice-on-warning-3.rs:4:14 | LL | trait B { fn f(a: A) -> A; } diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr index 646fb57af9edd..4a712b6acfe02 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr @@ -24,7 +24,7 @@ LL | fn call_this(f: F) : Fn(&str) + call_that {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn call_this(f: F) : dyn Fn(&str) + call_that {} | +++ diff --git a/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr index 45c9b0ce5d9cb..1784342857797 100644 --- a/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr +++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn ord_prefer_dot(s: String) -> dyn Ord { | +++ @@ -22,7 +22,7 @@ error[E0038]: the trait `Ord` cannot be made into an object LL | fn ord_prefer_dot(s: String) -> Ord { | ^^^ `Ord` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $SRC_DIR/core/src/cmp.rs:LL:COL | = note: the trait cannot be made into an object because it uses `Self` as a type parameter diff --git a/tests/ui/dyn-compatibility/bounds.stderr b/tests/ui/dyn-compatibility/bounds.stderr index 9231d524fd173..de41466a666d5 100644 --- a/tests/ui/dyn-compatibility/bounds.stderr +++ b/tests/ui/dyn-compatibility/bounds.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn f() -> Box> { | ^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/bounds.rs:4:13 | LL | trait X { diff --git a/tests/ui/dyn-compatibility/generics.curr.stderr b/tests/ui/dyn-compatibility/generics.curr.stderr index c63db38a080b4..d0b5be3dd1842 100644 --- a/tests/ui/dyn-compatibility/generics.curr.stderr +++ b/tests/ui/dyn-compatibility/generics.curr.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | fn make_bar(t: &T) -> &dyn Bar { | ^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/generics.rs:10:8 | LL | trait Bar { @@ -19,7 +19,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | fn make_bar_explicit(t: &T) -> &dyn Bar { | ^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/generics.rs:10:8 | LL | trait Bar { @@ -34,7 +34,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/generics.rs:10:8 | LL | trait Bar { @@ -50,7 +50,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t as &dyn Bar | ^^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/generics.rs:10:8 | LL | trait Bar { @@ -65,7 +65,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t as &dyn Bar | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/generics.rs:10:8 | LL | trait Bar { diff --git a/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr index ba2546ef2dc5c..9f144fb124ea2 100644 --- a/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr +++ b/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/generics.rs:10:8 | LL | trait Bar { @@ -20,7 +20,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t as &dyn Bar | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/generics.rs:10:8 | LL | trait Bar { diff --git a/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr index 7378ec023c926..bd26657650a14 100644 --- a/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr +++ b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | let test: &mut dyn Bar = &mut thing; | ^^^^^^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mention-correct-dyn-incompatible-trait.rs:4:8 | LL | fn foo(&self, val: T); @@ -21,7 +21,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | let test: &mut dyn Bar = &mut thing; | ^^^^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mention-correct-dyn-incompatible-trait.rs:4:8 | LL | fn foo(&self, val: T); diff --git a/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr index 7578edce7d19e..0378baf7d7494 100644 --- a/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr +++ b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Expr` cannot be made into an object LL | elements: Vec>, | ^^^^^^^^^^^^^ `Expr` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self-in-super-predicates.rs:5:21 | LL | trait Expr: Debug + PartialEq { @@ -19,7 +19,7 @@ error[E0038]: the trait `Expr` cannot be made into an object LL | let a: Box = Box::new(SExpr::new()); | ^^^^^^^^ `Expr` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self-in-super-predicates.rs:5:21 | LL | trait Expr: Debug + PartialEq { @@ -34,7 +34,7 @@ error[E0038]: the trait `Expr` cannot be made into an object LL | let b: Box = Box::new(SExpr::new()); | ^^^^^^^^ `Expr` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self-in-super-predicates.rs:5:21 | LL | trait Expr: Debug + PartialEq { diff --git a/tests/ui/dyn-compatibility/mentions-Self.curr.stderr b/tests/ui/dyn-compatibility/mentions-Self.curr.stderr index 434e41cf2182d..6f5f0b903b42f 100644 --- a/tests/ui/dyn-compatibility/mentions-Self.curr.stderr +++ b/tests/ui/dyn-compatibility/mentions-Self.curr.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | fn make_bar(t: &T) -> &dyn Bar { | ^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self.rs:11:22 | LL | trait Bar { @@ -19,7 +19,7 @@ error[E0038]: the trait `Baz` cannot be made into an object LL | fn make_baz(t: &T) -> &dyn Baz { | ^^^^^^^ `Baz` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self.rs:15:22 | LL | trait Baz { @@ -34,7 +34,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self.rs:11:22 | LL | trait Bar { @@ -50,7 +50,7 @@ error[E0038]: the trait `Baz` cannot be made into an object LL | t | ^ `Baz` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self.rs:15:22 | LL | trait Baz { diff --git a/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr index dc2d1f87eb737..361ee0e258d90 100644 --- a/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr +++ b/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self.rs:11:22 | LL | trait Bar { @@ -20,7 +20,7 @@ error[E0038]: the trait `Baz` cannot be made into an object LL | t | ^ `Baz` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/mentions-Self.rs:15:22 | LL | trait Baz { diff --git a/tests/ui/dyn-compatibility/missing-assoc-type.stderr b/tests/ui/dyn-compatibility/missing-assoc-type.stderr index f8450ba212d03..9072e68aeacc9 100644 --- a/tests/ui/dyn-compatibility/missing-assoc-type.stderr +++ b/tests/ui/dyn-compatibility/missing-assoc-type.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | fn bar(x: &dyn Foo) {} | ^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/missing-assoc-type.rs:2:10 | LL | trait Foo { @@ -19,7 +19,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | fn bar(x: &dyn Foo) {} | ^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/missing-assoc-type.rs:2:10 | LL | trait Foo { @@ -35,7 +35,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | fn bar(x: &dyn Foo) {} | ^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/missing-assoc-type.rs:2:10 | LL | trait Foo { @@ -51,7 +51,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | fn bar(x: &dyn Foo) {} | ^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/missing-assoc-type.rs:2:10 | LL | trait Foo { diff --git a/tests/ui/dyn-compatibility/no-static.curr.stderr b/tests/ui/dyn-compatibility/no-static.curr.stderr index 584db77985566..be5fff87cbb42 100644 --- a/tests/ui/dyn-compatibility/no-static.curr.stderr +++ b/tests/ui/dyn-compatibility/no-static.curr.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | fn diverges() -> Box { | ^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/no-static.rs:9:8 | LL | trait Foo { @@ -27,7 +27,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let b: Box = Box::new(Bar); | ^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/no-static.rs:9:8 | LL | trait Foo { @@ -50,7 +50,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let b: Box = Box::new(Bar); | ^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/no-static.rs:9:8 | LL | trait Foo { diff --git a/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr index f2deb3b8d84b9..618e708c2eebf 100644 --- a/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr +++ b/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let b: Box = Box::new(Bar); | ^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/no-static.rs:9:8 | LL | trait Foo { diff --git a/tests/ui/dyn-compatibility/sized-2.curr.stderr b/tests/ui/dyn-compatibility/sized-2.curr.stderr index 1017fde53d313..2cea59da6ed47 100644 --- a/tests/ui/dyn-compatibility/sized-2.curr.stderr +++ b/tests/ui/dyn-compatibility/sized-2.curr.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | fn make_bar(t: &T) -> &dyn Bar { | ^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/sized-2.rs:9:18 | LL | trait Bar @@ -18,7 +18,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/sized-2.rs:9:18 | LL | trait Bar diff --git a/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr index 534cf0f1b033f..8132c904e5e9a 100644 --- a/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr +++ b/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/sized-2.rs:9:18 | LL | trait Bar diff --git a/tests/ui/dyn-compatibility/sized.curr.stderr b/tests/ui/dyn-compatibility/sized.curr.stderr index 613833aad12ee..2b655b1c76f69 100644 --- a/tests/ui/dyn-compatibility/sized.curr.stderr +++ b/tests/ui/dyn-compatibility/sized.curr.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | fn make_bar(t: &T) -> &dyn Bar { | ^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/sized.rs:8:12 | LL | trait Bar: Sized { @@ -18,7 +18,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/sized.rs:8:12 | LL | trait Bar: Sized { diff --git a/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr index cf847bc157785..ef829847335ec 100644 --- a/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr +++ b/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | t | ^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/sized.rs:8:12 | LL | trait Bar: Sized { diff --git a/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr index ac5a5b28d94d4..da1ad35835ca5 100644 --- a/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr +++ b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr @@ -26,7 +26,7 @@ error[E0038]: the trait `SuperTrait` cannot be made into an object LL | fn c(&self) -> dyn SuperTrait; | ^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/supertrait-mentions-GAT.rs:4:10 | LL | type Gat<'a> diff --git a/tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr b/tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr index 6474b115c4628..a6b805657dd4b 100644 --- a/tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr +++ b/tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr @@ -24,7 +24,7 @@ error[E0038]: the trait `Baz` cannot be made into an object LL | fn make_baz(t: &T) -> &dyn Baz { | ^^^^^^^ `Baz` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/supertrait-mentions-Self.rs:8:13 | LL | trait Baz : Bar { diff --git a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr index 8d62ac9d923f9..d29fdd56ee5fd 100644 --- a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr +++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr @@ -7,7 +7,7 @@ LL | fn get<'a>(self: &'a Box) -> Pin> LL | fn fetcher() -> Box { | ^^^^^^^^^^^ `Fetcher` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22 | LL | pub trait Fetcher: Send + Sync { @@ -24,7 +24,7 @@ LL | fn get<'a>(self: &'a Box) -> Pin> LL | let fetcher = fetcher(); | ^^^^^^^^^ `Fetcher` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22 | LL | pub trait Fetcher: Send + Sync { @@ -41,7 +41,7 @@ LL | fn get<'a>(self: &'a Box) -> Pin> LL | let _ = fetcher.get(); | ^^^^^^^^^^^^^ `Fetcher` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22 | LL | pub trait Fetcher: Send + Sync { diff --git a/tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr b/tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr index b930815d13bb1..41340c56d4b4b 100644 --- a/tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr +++ b/tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #[deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn function(x: &dyn SomeTrait, y: Box) { | +++ @@ -24,7 +24,7 @@ LL | fn function(x: &SomeTrait, y: Box) { | = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn function(x: &SomeTrait, y: Box) { | +++ @@ -37,7 +37,7 @@ LL | let _x: &SomeTrait = todo!(); | = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let _x: &dyn SomeTrait = todo!(); | +++ diff --git a/tests/ui/dyn-keyword/dyn-angle-brackets.stderr b/tests/ui/dyn-keyword/dyn-angle-brackets.stderr index 6a29dab04868d..e154cb0970b94 100644 --- a/tests/ui/dyn-keyword/dyn-angle-brackets.stderr +++ b/tests/ui/dyn-keyword/dyn-angle-brackets.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | ::fmt(self, f) | +++ diff --git a/tests/ui/error-codes/E0038.stderr b/tests/ui/error-codes/E0038.stderr index 54b489c655f64..896667426c876 100644 --- a/tests/ui/error-codes/E0038.stderr +++ b/tests/ui/error-codes/E0038.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | fn call_foo(x: Box) { | ^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/E0038.rs:2:22 | LL | trait Trait { @@ -19,7 +19,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | let y = x.foo(); | ^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/E0038.rs:2:22 | LL | trait Trait { diff --git a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr index 24f00cfa6be91..a7465e75a4bcd 100644 --- a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr +++ b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr @@ -7,7 +7,7 @@ LL | let _ = MyIterator::next; = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let _ = ::next; | ++++ + diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr index 28caaf8356f8e..2f3da2405f505 100644 --- a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr +++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr @@ -7,7 +7,7 @@ LL | fn ptr(self: Ptr); LL | Ptr(Box::new(4)) as Ptr; | ^^^^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:25:18 | LL | trait Trait { @@ -25,7 +25,7 @@ LL | fn ptr(self: Ptr); LL | Ptr(Box::new(4)) as Ptr; | ^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:25:18 | LL | trait Trait { diff --git a/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr index ed021c154a5b8..cf99df5d7a308 100644 --- a/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr +++ b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `DynIncompatible1` cannot be made into an object LL | fn takes_dyn_incompatible_ref(obj: &dyn DynIncompatible1) { | ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25 | LL | trait DynIncompatible1: Sized {} @@ -18,7 +18,7 @@ error[E0038]: the trait `DynIncompatible2` cannot be made into an object LL | fn return_dyn_incompatible_ref() -> &'static dyn DynIncompatible2 { | ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible2` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:7:8 | LL | trait DynIncompatible2 { @@ -40,7 +40,7 @@ error[E0038]: the trait `DynIncompatible3` cannot be made into an object LL | fn takes_dyn_incompatible_box(obj: Box) { | ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible3` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:11:8 | LL | trait DynIncompatible3 { @@ -55,7 +55,7 @@ error[E0038]: the trait `DynIncompatible4` cannot be made into an object LL | fn return_dyn_incompatible_rc() -> std::rc::Rc { | ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible4` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:15:22 | LL | trait DynIncompatible4 { @@ -70,7 +70,7 @@ error[E0038]: the trait `DynIncompatible1` cannot be made into an object LL | impl Trait for dyn DynIncompatible1 {} | ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25 | LL | trait DynIncompatible1: Sized {} diff --git a/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr b/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr index 867f55b0deead..8d3899bd75028 100644 --- a/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr +++ b/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr @@ -42,7 +42,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn _f(arg : Box X = &'a [u32]>>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:2:8 | LL | trait X { diff --git a/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr b/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr index 34642f8fdc6c8..187a06cab7526 100644 --- a/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr +++ b/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | fn f(_arg : Box Foo = &'a ()>>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/gat-in-trait-path.rs:10:10 | LL | trait Foo { @@ -22,7 +22,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | f(Box::new(foo)); | ^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/gat-in-trait-path.rs:10:10 | LL | trait Foo { @@ -40,7 +40,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | f(Box::new(foo)); | ^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/gat-in-trait-path.rs:10:10 | LL | trait Foo { diff --git a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr index 97b7019b38515..79969614ea876 100644 --- a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr +++ b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr @@ -129,7 +129,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn foo<'a>(arg: Box>) {} | ^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/gat-trait-path-parenthesised-args.rs:2:8 | LL | trait X { @@ -194,7 +194,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn bar<'a>(arg: Box>) {} | ^^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/gat-trait-path-parenthesised-args.rs:2:8 | LL | trait X { diff --git a/tests/ui/generic-associated-types/issue-67510-pass.base.stderr b/tests/ui/generic-associated-types/issue-67510-pass.base.stderr index cac8010018ec0..7448e26b55153 100644 --- a/tests/ui/generic-associated-types/issue-67510-pass.base.stderr +++ b/tests/ui/generic-associated-types/issue-67510-pass.base.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn _func1<'a>(_x: Box=&'a ()>>) {} | ^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-67510-pass.rs:9:10 | LL | trait X { diff --git a/tests/ui/generic-associated-types/issue-67510.stderr b/tests/ui/generic-associated-types/issue-67510.stderr index 416f04ac2fd6c..9a2782800390e 100644 --- a/tests/ui/generic-associated-types/issue-67510.stderr +++ b/tests/ui/generic-associated-types/issue-67510.stderr @@ -35,7 +35,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn f(x: Box = &'a ()>>) {} | ^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-67510.rs:2:10 | LL | trait X { diff --git a/tests/ui/generic-associated-types/issue-71176.stderr b/tests/ui/generic-associated-types/issue-71176.stderr index 15d5a3df6f276..fffbb7f213801 100644 --- a/tests/ui/generic-associated-types/issue-71176.stderr +++ b/tests/ui/generic-associated-types/issue-71176.stderr @@ -54,7 +54,7 @@ error[E0038]: the trait `Provider` cannot be made into an object LL | inner: Box>, | ^^^^^^^^^^^^^^^^^^^ `Provider` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-71176.rs:2:10 | LL | trait Provider { @@ -70,7 +70,7 @@ error[E0038]: the trait `Provider` cannot be made into an object LL | inner: Box::new(()), | ^^^^^^^^^^^^ `Provider` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-71176.rs:2:10 | LL | trait Provider { diff --git a/tests/ui/generic-associated-types/issue-76535.base.stderr b/tests/ui/generic-associated-types/issue-76535.base.stderr index a44c8dc51e7e9..5da0b8c2c01f8 100644 --- a/tests/ui/generic-associated-types/issue-76535.base.stderr +++ b/tests/ui/generic-associated-types/issue-76535.base.stderr @@ -20,7 +20,7 @@ error[E0038]: the trait `SuperTrait` cannot be made into an object LL | let sub: Box> = Box::new(SuperStruct::new(0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-76535.rs:9:10 | LL | pub trait SuperTrait { @@ -37,7 +37,7 @@ error[E0038]: the trait `SuperTrait` cannot be made into an object LL | let sub: Box> = Box::new(SuperStruct::new(0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-76535.rs:9:10 | LL | pub trait SuperTrait { diff --git a/tests/ui/generic-associated-types/issue-78671.base.stderr b/tests/ui/generic-associated-types/issue-78671.base.stderr index 9f2be785460f3..59960afe80a85 100644 --- a/tests/ui/generic-associated-types/issue-78671.base.stderr +++ b/tests/ui/generic-associated-types/issue-78671.base.stderr @@ -20,7 +20,7 @@ error[E0038]: the trait `CollectionFamily` cannot be made into an object LL | Box::new(Family) as &dyn CollectionFamily | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CollectionFamily` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-78671.rs:7:10 | LL | trait CollectionFamily { diff --git a/tests/ui/generic-associated-types/issue-79422.base.stderr b/tests/ui/generic-associated-types/issue-79422.base.stderr index 3ea62bdbb2763..6d216ba24e066 100644 --- a/tests/ui/generic-associated-types/issue-79422.base.stderr +++ b/tests/ui/generic-associated-types/issue-79422.base.stderr @@ -20,7 +20,7 @@ error[E0038]: the trait `MapLike` cannot be made into an object LL | as Box>>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-79422.rs:23:10 | LL | trait MapLike { @@ -38,7 +38,7 @@ error[E0038]: the trait `MapLike` cannot be made into an object LL | let m = Box::new(std::collections::BTreeMap::::new()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-79422.rs:23:10 | LL | trait MapLike { diff --git a/tests/ui/generic-associated-types/missing_lifetime_args.stderr b/tests/ui/generic-associated-types/missing_lifetime_args.stderr index 61cf4f3dd4a7e..60631bc6826ea 100644 --- a/tests/ui/generic-associated-types/missing_lifetime_args.stderr +++ b/tests/ui/generic-associated-types/missing_lifetime_args.stderr @@ -54,7 +54,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn foo<'c, 'd>(_arg: Box>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/missing_lifetime_args.rs:2:10 | LL | trait X { diff --git a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr index 91f0f7b3fcf2d..8640f7922ac6e 100644 --- a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr +++ b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr @@ -98,7 +98,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | fn f2<'a>(arg : Box = &'a ()>>) {} | ^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/trait-path-type-error-once-implemented.rs:2:10 | LL | trait X { diff --git a/tests/ui/generic-associated-types/trait-objects.base.stderr b/tests/ui/generic-associated-types/trait-objects.base.stderr index 0b5a9b9f7fb64..0150b08b14f5f 100644 --- a/tests/ui/generic-associated-types/trait-objects.base.stderr +++ b/tests/ui/generic-associated-types/trait-objects.base.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `StreamingIterator` cannot be made into an object LL | fn min_size(x: &mut dyn for<'a> StreamingIterator = &'a i32>) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `StreamingIterator` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/trait-objects.rs:7:10 | LL | trait StreamingIterator { @@ -19,7 +19,7 @@ error[E0038]: the trait `StreamingIterator` cannot be made into an object LL | x.size_hint().0 | ^^^^^^^^^ `StreamingIterator` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/trait-objects.rs:7:10 | LL | trait StreamingIterator { @@ -34,7 +34,7 @@ error[E0038]: the trait `StreamingIterator` cannot be made into an object LL | x.size_hint().0 | ^^^^^^^^^^^^^ `StreamingIterator` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/trait-objects.rs:7:10 | LL | trait StreamingIterator { diff --git a/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr b/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr index d48bf8a471d61..bf35efa4f88d8 100644 --- a/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr +++ b/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let x: &dyn Foo = &(); | ^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/span-bug-issue-121597.rs:4:12 | LL | trait Foo: for Bar {} @@ -19,7 +19,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let x: &dyn Foo = &(); | ^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/span-bug-issue-121597.rs:4:12 | LL | trait Foo: for Bar {} diff --git a/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr index 576bd909cbc7d..039007db10932 100644 --- a/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr +++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `DynIncompatible` cannot be made into an object LL | fn car() -> dyn DynIncompatible { | ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8 | LL | trait DynIncompatible { @@ -29,7 +29,7 @@ error[E0038]: the trait `DynIncompatible` cannot be made into an object LL | fn cat() -> Box { | ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8 | LL | trait DynIncompatible { @@ -71,7 +71,7 @@ error[E0038]: the trait `DynIncompatible` cannot be made into an object LL | return Box::new(A); | ^^^^^^^^^^^ `DynIncompatible` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8 | LL | trait DynIncompatible { @@ -97,7 +97,7 @@ error[E0038]: the trait `DynIncompatible` cannot be made into an object LL | Box::new(B) | ^^^^^^^^^^^ `DynIncompatible` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8 | LL | trait DynIncompatible { diff --git a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr index 418f9acf5899a..c5af7f1c4777f 100644 --- a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr +++ b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr @@ -7,7 +7,7 @@ LL | fn ice() -> impl AsRef { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn ice() -> impl AsRef { | +++ @@ -21,7 +21,7 @@ LL | fn ice() -> impl AsRef { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn ice() -> impl AsRef { | +++ diff --git a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.stderr b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.stderr index a975b6204aa5a..7dbe2a1b69769 100644 --- a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.stderr +++ b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.stderr @@ -14,7 +14,7 @@ error[E0038]: the trait `MyTrait` cannot be made into an object LL | MyTrait::foo(&self) | ^^^^^^^^^^^^ `MyTrait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22 | LL | trait MyTrait { @@ -38,7 +38,7 @@ error[E0038]: the trait `MyTrait` cannot be made into an object LL | impl dyn MyTrait { | ^^^^^^^^^^^ `MyTrait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22 | LL | trait MyTrait { @@ -54,7 +54,7 @@ error[E0038]: the trait `MyTrait` cannot be made into an object LL | fn other(&self) -> impl Marker { | ^^^^ `MyTrait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22 | LL | trait MyTrait { diff --git a/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr b/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr index 115cb014b8c34..660d5f7965cd9 100644 --- a/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr +++ b/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let i = Box::new(42_u32) as Box; | ^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility.rs:4:22 | LL | trait Foo { @@ -20,7 +20,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let s = i.baz(); | ^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility.rs:4:22 | LL | trait Foo { @@ -36,7 +36,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let s = i.baz(); | ^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility.rs:4:22 | LL | trait Foo { @@ -52,7 +52,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let i = Box::new(42_u32) as Box; | ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-compatibility.rs:4:22 | LL | trait Foo { diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr index 895d8686742b3..90708342f4f23 100644 --- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr +++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let _: &dyn rpitit::Foo = todo!(); | ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/auxiliary/rpitit.rs:4:21 | LL | fn bar(self) -> impl Deref; diff --git a/tests/ui/issues/issue-18959.stderr b/tests/ui/issues/issue-18959.stderr index 5bb452250aa40..ad757f9d49264 100644 --- a/tests/ui/issues/issue-18959.stderr +++ b/tests/ui/issues/issue-18959.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | fn foo(b: &dyn Bar) { | ^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-18959.rs:1:20 | LL | pub trait Foo { fn foo(&self, ext_thing: &T); } @@ -19,7 +19,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | b.foo(&0) | ^^^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-18959.rs:1:20 | LL | pub trait Foo { fn foo(&self, ext_thing: &T); } @@ -34,7 +34,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | let test: &dyn Bar = &mut thing; | ^^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-18959.rs:1:20 | LL | pub trait Foo { fn foo(&self, ext_thing: &T); } @@ -49,7 +49,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | let test: &dyn Bar = &mut thing; | ^^^^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-18959.rs:1:20 | LL | pub trait Foo { fn foo(&self, ext_thing: &T); } @@ -65,7 +65,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | foo(test); | ^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-18959.rs:1:20 | LL | pub trait Foo { fn foo(&self, ext_thing: &T); } diff --git a/tests/ui/issues/issue-19380.stderr b/tests/ui/issues/issue-19380.stderr index afbe67befa1ab..082d4d8742ff8 100644 --- a/tests/ui/issues/issue-19380.stderr +++ b/tests/ui/issues/issue-19380.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Qiz` cannot be made into an object LL | foos: &'static [&'static (dyn Qiz + 'static)] | ^^^^^^^^^^^^^^^^^ `Qiz` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-19380.rs:2:6 | LL | trait Qiz { @@ -27,7 +27,7 @@ error[E0038]: the trait `Qiz` cannot be made into an object LL | const BAR : Bar = Bar { foos: &[&FOO]}; | ^^^^ `Qiz` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-19380.rs:2:6 | LL | trait Qiz { @@ -51,7 +51,7 @@ error[E0038]: the trait `Qiz` cannot be made into an object LL | const BAR : Bar = Bar { foos: &[&FOO]}; | ^^^^^^^ `Qiz` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-19380.rs:2:6 | LL | trait Qiz { diff --git a/tests/ui/issues/issue-26056.stderr b/tests/ui/issues/issue-26056.stderr index be5453ec19dfc..4b21ab65748d6 100644 --- a/tests/ui/issues/issue-26056.stderr +++ b/tests/ui/issues/issue-26056.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Map` cannot be made into an object LL | as &dyn Map; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Map` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-26056.rs:9:12 | LL | trait Map: MapLookup<::Key> { diff --git a/tests/ui/issues/issue-28344.stderr b/tests/ui/issues/issue-28344.stderr index 261f8b67b52cc..e1d3416132642 100644 --- a/tests/ui/issues/issue-28344.stderr +++ b/tests/ui/issues/issue-28344.stderr @@ -7,7 +7,7 @@ LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let x: u8 = ::bitor(0 as u8, 0 as u8); | ++++ + @@ -35,7 +35,7 @@ LL | let g = BitXor::bitor; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let g = ::bitor; | ++++ + diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr index 4e8e7c61fee89..de889a2361e75 100644 --- a/tests/ui/issues/issue-34373.stderr +++ b/tests/ui/issues/issue-34373.stderr @@ -23,7 +23,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | pub struct Foo>>; | ^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-34373.rs:4:8 | LL | trait Trait { diff --git a/tests/ui/issues/issue-50781.stderr b/tests/ui/issues/issue-50781.stderr index 3e54a53aa95f8..193334a80a7ac 100644 --- a/tests/ui/issues/issue-50781.stderr +++ b/tests/ui/issues/issue-50781.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | impl Trait for dyn X {} | ^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-50781.rs:4:8 | LL | trait X { @@ -20,7 +20,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | ::foo(&()); | ^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-50781.rs:4:8 | LL | trait X { @@ -37,7 +37,7 @@ error[E0038]: the trait `X` cannot be made into an object LL | ::foo(&()); | ^^^^^ `X` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-50781.rs:4:8 | LL | trait X { diff --git a/tests/ui/issues/issue-58734.stderr b/tests/ui/issues/issue-58734.stderr index a2acd9dcf8189..bc17a62d19f90 100644 --- a/tests/ui/issues/issue-58734.stderr +++ b/tests/ui/issues/issue-58734.stderr @@ -7,7 +7,7 @@ LL | Trait::nonexistent(()); = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | ::nonexistent(()); | ++++ + diff --git a/tests/ui/issues/issue-86756.stderr b/tests/ui/issues/issue-86756.stderr index 728d7ea709558..54a5645f2eb9c 100644 --- a/tests/ui/issues/issue-86756.stderr +++ b/tests/ui/issues/issue-86756.stderr @@ -21,7 +21,7 @@ LL | eq:: = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | eq:: | +++ diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.curr.stderr b/tests/ui/kindck/kindck-inherited-copy-bound.curr.stderr index c392879db3ebb..4c6ca5d9fcf6a 100644 --- a/tests/ui/kindck/kindck-inherited-copy-bound.curr.stderr +++ b/tests/ui/kindck/kindck-inherited-copy-bound.curr.stderr @@ -25,7 +25,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let z = &x as &dyn Foo; | ^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/kindck-inherited-copy-bound.rs:10:13 | LL | trait Foo : Copy { @@ -39,7 +39,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let z = &x as &dyn Foo; | ^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/kindck-inherited-copy-bound.rs:10:13 | LL | trait Foo : Copy { diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr b/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr index 34dcad13af30b..c0ba7956c1d8b 100644 --- a/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr +++ b/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr @@ -25,7 +25,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let z = &x as &dyn Foo; | ^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/kindck-inherited-copy-bound.rs:10:13 | LL | trait Foo : Copy { diff --git a/tests/ui/lint/bare-trait-objects-path.stderr b/tests/ui/lint/bare-trait-objects-path.stderr index d2d139dd025a5..c99b39a26ba00 100644 --- a/tests/ui/lint/bare-trait-objects-path.stderr +++ b/tests/ui/lint/bare-trait-objects-path.stderr @@ -7,7 +7,7 @@ LL | let _: Dyn::Ty; = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let _: ::Ty; | ++++ + @@ -26,7 +26,7 @@ LL | Dyn::func(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | ::func(); | ++++ + @@ -39,7 +39,7 @@ LL | ::Dyn::func(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | ::func(); | ++++++ ++ @@ -52,7 +52,7 @@ LL | Dyn::CONST; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | ::CONST; | ++++ + diff --git a/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.stderr b/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.stderr index a1aa29dd6977e..98e61f33cfa96 100644 --- a/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.stderr +++ b/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.stderr @@ -7,7 +7,7 @@ LL | pub fn function(_x: Box) {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: requested on the command line with `--force-warn bare-trait-objects` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | pub fn function(_x: Box) {} | +++ diff --git a/tests/ui/lint/force-warn/cap-lints-allow.stderr b/tests/ui/lint/force-warn/cap-lints-allow.stderr index 0d10a43a14d77..181bd0eaf3814 100644 --- a/tests/ui/lint/force-warn/cap-lints-allow.stderr +++ b/tests/ui/lint/force-warn/cap-lints-allow.stderr @@ -7,7 +7,7 @@ LL | pub fn function(_x: Box) {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: requested on the command line with `--force-warn bare-trait-objects` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | pub fn function(_x: Box) {} | +++ diff --git a/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.stderr b/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.stderr index d52bd67e36af3..183ffab07eb02 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.stderr +++ b/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.stderr @@ -7,7 +7,7 @@ LL | pub fn function(_x: Box) {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | pub fn function(_x: Box) {} | +++ diff --git a/tests/ui/lint/force-warn/lint-group-allowed-lint-group.stderr b/tests/ui/lint/force-warn/lint-group-allowed-lint-group.stderr index 22483a3d874de..cb44733e7d14e 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-lint-group.stderr +++ b/tests/ui/lint/force-warn/lint-group-allowed-lint-group.stderr @@ -7,7 +7,7 @@ LL | pub fn function(_x: Box) {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | pub fn function(_x: Box) {} | +++ diff --git a/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.stderr b/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.stderr index aa183b9ba54cf..8fb4faf70fc5d 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.stderr +++ b/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.stderr @@ -7,7 +7,7 @@ LL | pub fn function(_x: Box) {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | pub fn function(_x: Box) {} | +++ diff --git a/tests/ui/parser/trait-object-trait-parens.stderr b/tests/ui/parser/trait-object-trait-parens.stderr index d75352b6811ea..f26dbb156b167 100644 --- a/tests/ui/parser/trait-object-trait-parens.stderr +++ b/tests/ui/parser/trait-object-trait-parens.stderr @@ -34,7 +34,7 @@ LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let _: Box Trait<'a>)>; | +++ @@ -58,7 +58,7 @@ LL | let _: Box Trait<'a>) + (Obj)>; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let _: Box Trait<'a>) + (Obj)>; | +++ @@ -82,7 +82,7 @@ LL | let _: Box Trait<'a> + (Obj) + (?Sized)>; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let _: Box Trait<'a> + (Obj) + (?Sized)>; | +++ diff --git a/tests/ui/resolve/issue-3907-2.stderr b/tests/ui/resolve/issue-3907-2.stderr index 7c47c5973e313..5bb1f78eae4df 100644 --- a/tests/ui/resolve/issue-3907-2.stderr +++ b/tests/ui/resolve/issue-3907-2.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `issue_3907::Foo` cannot be made into an object LL | fn bar(_x: Foo) {} | ^^^ `issue_3907::Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/auxiliary/issue-3907.rs:2:8 | LL | fn bar(); diff --git a/tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr index 2eb7597d5c105..18e024d2ad8d9 100644 --- a/tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr +++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr @@ -7,7 +7,7 @@ LL | fn foo(self: &Rc) -> usize; LL | let x = Rc::new(5usize) as Rc; | ^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18 | LL | trait Foo { @@ -25,7 +25,7 @@ LL | fn foo(self: &Rc) -> usize; LL | let x = Rc::new(5usize) as Rc; | ^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18 | LL | trait Foo { diff --git a/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr index 02af692c4a352..14ce6025a4767 100644 --- a/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr +++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr @@ -7,7 +7,7 @@ LL | fn foo(self: &Rc) -> usize; LL | let x = Rc::new(5usize) as Rc; | ^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18 | LL | trait Foo { diff --git a/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr b/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr index 35dd570e91fbb..011d30de78c3f 100644 --- a/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr +++ b/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Qux` cannot be made into an object LL | pub desc: &'static dyn Qux, | ^^^^^^^ `Qux` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/unsizing-wfcheck-issue-127299.rs:4:8 | LL | trait Qux { @@ -42,7 +42,7 @@ error[E0038]: the trait `Qux` cannot be made into an object LL | static FOO: &Lint = &Lint { desc: "desc" }; | ^^^^^^ `Qux` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/unsizing-wfcheck-issue-127299.rs:4:8 | LL | trait Qux { @@ -65,7 +65,7 @@ error[E0038]: the trait `Qux` cannot be made into an object LL | static FOO: &Lint = &Lint { desc: "desc" }; | ^^^^^^ `Qux` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/unsizing-wfcheck-issue-127299.rs:4:8 | LL | trait Qux { diff --git a/tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr b/tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr index 242c44abd9d66..463bd805fc52e 100644 --- a/tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr +++ b/tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | fn bar(x: &dyn Trait) {} | ^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-references-self.rs:2:22 | LL | trait Trait { @@ -23,7 +23,7 @@ error[E0038]: the trait `Other` cannot be made into an object LL | fn foo(x: &dyn Other) {} | ^^^^^^^^^ `Other` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-references-self.rs:11:14 | LL | trait Other: Sized {} diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr index 5e0d1a1445230..5549fbef1b470 100644 --- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr +++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr @@ -17,7 +17,7 @@ error[E0038]: the trait `A` cannot be made into an object LL | fn f(a: dyn A) -> dyn A; | ^^^^^ `A` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:3:10 | LL | trait A: Sized { @@ -44,7 +44,7 @@ error[E0038]: the trait `B` cannot be made into an object LL | fn f(a: dyn B) -> dyn B; | ^^^^^ `B` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:8 | LL | trait B { diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr index 93f6ea2b12e67..4a3643da95b5b 100644 --- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr +++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr @@ -17,7 +17,7 @@ error[E0038]: the trait `A` cannot be made into an object LL | fn f(a: A) -> A; | ^ `A` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-should-use-self.rs:2:10 | LL | trait A: Sized { @@ -44,7 +44,7 @@ error[E0038]: the trait `B` cannot be made into an object LL | fn f(a: B) -> B; | ^ `B` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-should-use-self.rs:8:8 | LL | trait B { diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr index beafd7c2ab00f..0d4e946ac92f9 100644 --- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr +++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | fn bar(x: &dyn Trait) {} | ^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/dyn-incompatible-trait-should-use-where-sized.rs:5:8 | LL | trait Trait { diff --git a/tests/ui/suggestions/issue-116434-2015.rs b/tests/ui/suggestions/issue-116434-2015.rs index 2e94473eb1a12..a44f3e86bf65a 100644 --- a/tests/ui/suggestions/issue-116434-2015.rs +++ b/tests/ui/suggestions/issue-116434-2015.rs @@ -3,10 +3,10 @@ trait Foo { fn foo() -> Clone; //~^ WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! - //~| HELP if this is a dyn-compatible trait, use `dyn` + //~| HELP if this is a dyn compatible trait, use `dyn` //~| WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! - //~| HELP if this is a dyn-compatible trait, use `dyn` + //~| HELP if this is a dyn compatible trait, use `dyn` //~| ERROR the trait `Clone` cannot be made into an object [E0038] //~| HELP there is an associated type with the same name } @@ -18,10 +18,10 @@ trait DbInterface { fn handle() -> DbHandle; //~^ WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! - //~| HELP if this is a dyn-compatible trait, use `dyn` + //~| HELP if this is a dyn compatible trait, use `dyn` //~| WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! - //~| HELP if this is a dyn-compatible trait, use `dyn` + //~| HELP if this is a dyn compatible trait, use `dyn` //~| ERROR the trait `DbHandle` cannot be made into an object [E0038] //~| HELP there is an associated type with the same name } diff --git a/tests/ui/suggestions/issue-116434-2015.stderr b/tests/ui/suggestions/issue-116434-2015.stderr index 24fc87f765f80..ece981c7c0283 100644 --- a/tests/ui/suggestions/issue-116434-2015.stderr +++ b/tests/ui/suggestions/issue-116434-2015.stderr @@ -7,7 +7,7 @@ LL | fn foo() -> Clone; = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn foo() -> dyn Clone; | +++ @@ -20,7 +20,7 @@ LL | fn handle() -> DbHandle; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn handle() -> dyn DbHandle; | +++ @@ -34,7 +34,7 @@ LL | fn foo() -> Clone; = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn foo() -> dyn Clone; | +++ @@ -46,7 +46,7 @@ LL | fn foo() -> Clone; | ^^^^^ `Clone` cannot be made into an object | = note: the trait cannot be made into an object because it requires `Self: Sized` - = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit help: there is an associated type with the same name | LL | fn foo() -> Self::Clone; @@ -61,7 +61,7 @@ LL | fn handle() -> DbHandle; = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn handle() -> dyn DbHandle; | +++ @@ -72,7 +72,7 @@ error[E0038]: the trait `DbHandle` cannot be made into an object LL | fn handle() -> DbHandle; | ^^^^^^^^ `DbHandle` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-116434-2015.rs:14:17 | LL | trait DbHandle: Sized {} diff --git a/tests/ui/suggestions/issue-61963.stderr b/tests/ui/suggestions/issue-61963.stderr index 734c88f3fd675..710ea35260885 100644 --- a/tests/ui/suggestions/issue-61963.stderr +++ b/tests/ui/suggestions/issue-61963.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | bar: Box, | +++ @@ -24,7 +24,7 @@ LL | pub struct Foo { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | dyn pub struct Foo { | +++ diff --git a/tests/ui/suggestions/issue-98500.stderr b/tests/ui/suggestions/issue-98500.stderr index d7136ec1a649f..fdb1dba851834 100644 --- a/tests/ui/suggestions/issue-98500.stderr +++ b/tests/ui/suggestions/issue-98500.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `B` cannot be made into an object LL | struct S(Box); | ^^^^^ `B` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/auxiliary/dyn-incompatible.rs:4:8 | LL | fn f(); diff --git a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr index d1da9a89c191b..57c49c1e7c179 100644 --- a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr +++ b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr @@ -67,7 +67,7 @@ LL | impl<'a, T> Struct for Trait<'a, T> {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | impl<'a, T> Struct for dyn Trait<'a, T> {} | +++ @@ -80,7 +80,7 @@ LL | impl<'a, T> Enum for Trait<'a, T> {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | impl<'a, T> Enum for dyn Trait<'a, T> {} | +++ @@ -93,7 +93,7 @@ LL | impl<'a, T> Union for Trait<'a, T> {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | impl<'a, T> Union for dyn Trait<'a, T> {} | +++ diff --git a/tests/ui/traits/alias/object-fail.stderr b/tests/ui/traits/alias/object-fail.stderr index 1b89b87db9f8f..3aa57245bca69 100644 --- a/tests/ui/traits/alias/object-fail.stderr +++ b/tests/ui/traits/alias/object-fail.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Eq` cannot be made into an object LL | let _: &dyn EqAlias = &123; | ^^^^^^^^^^^ `Eq` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $SRC_DIR/core/src/cmp.rs:LL:COL | = note: the trait cannot be made into an object because it uses `Self` as a type parameter diff --git a/tests/ui/traits/bound/not-on-bare-trait.stderr b/tests/ui/traits/bound/not-on-bare-trait.stderr index c2cb303b01874..245c98430a779 100644 --- a/tests/ui/traits/bound/not-on-bare-trait.stderr +++ b/tests/ui/traits/bound/not-on-bare-trait.stderr @@ -7,7 +7,7 @@ LL | fn foo(_x: Foo + Send) { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn foo(_x: dyn Foo + Send) { | +++ diff --git a/tests/ui/traits/issue-20692.stderr b/tests/ui/traits/issue-20692.stderr index 5e6a967fdc4e9..8a79d5e7ac37b 100644 --- a/tests/ui/traits/issue-20692.stderr +++ b/tests/ui/traits/issue-20692.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Array` cannot be made into an object LL | &dyn Array; | ^^^^^^^^^^ `Array` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-20692.rs:1:14 | LL | trait Array: Sized + Copy {} @@ -19,7 +19,7 @@ error[E0038]: the trait `Array` cannot be made into an object LL | let _ = x | ^ `Array` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-20692.rs:1:14 | LL | trait Array: Sized + Copy {} diff --git a/tests/ui/traits/issue-28576.stderr b/tests/ui/traits/issue-28576.stderr index 23581f2ee51aa..938c22799f35f 100644 --- a/tests/ui/traits/issue-28576.stderr +++ b/tests/ui/traits/issue-28576.stderr @@ -25,7 +25,7 @@ LL | / dyn Bar LL | | | |________________________^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-28576.rs:5:16 | LL | pub trait Bar: Foo { diff --git a/tests/ui/traits/issue-38404.stderr b/tests/ui/traits/issue-38404.stderr index 145eeb88dd5e7..f9bb408e64b25 100644 --- a/tests/ui/traits/issue-38404.stderr +++ b/tests/ui/traits/issue-38404.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `B` cannot be made into an object LL | trait C: A> {} | ^^^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-38404.rs:1:13 | LL | trait A: std::ops::Add + Sized {} @@ -18,7 +18,7 @@ error[E0038]: the trait `B` cannot be made into an object LL | trait C: A> {} | ^^^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-38404.rs:1:13 | LL | trait A: std::ops::Add + Sized {} @@ -33,7 +33,7 @@ error[E0038]: the trait `B` cannot be made into an object LL | trait C: A> {} | ^^^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-38404.rs:1:13 | LL | trait A: std::ops::Add + Sized {} diff --git a/tests/ui/traits/issue-38604.stderr b/tests/ui/traits/issue-38604.stderr index 5c788b0c85d19..5c901c305142b 100644 --- a/tests/ui/traits/issue-38604.stderr +++ b/tests/ui/traits/issue-38604.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let _f: Box = | ^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-38604.rs:2:22 | LL | trait Foo where u32: Q { @@ -19,7 +19,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | Box::new(()); | ^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-38604.rs:2:22 | LL | trait Foo where u32: Q { diff --git a/tests/ui/traits/issue-72410.stderr b/tests/ui/traits/issue-72410.stderr index 6d56a198fc1c0..7761245c441bb 100644 --- a/tests/ui/traits/issue-72410.stderr +++ b/tests/ui/traits/issue-72410.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Bar` cannot be made into an object LL | where for<'a> &'a mut [dyn Bar]: ; | ^^^^^^^^^^^^^^^^^ `Bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-72410.rs:13:8 | LL | pub trait Bar { diff --git a/tests/ui/traits/issue-78372.stderr b/tests/ui/traits/issue-78372.stderr index 4cc2c59fd8dc5..040b8cae65ca2 100644 --- a/tests/ui/traits/issue-78372.stderr +++ b/tests/ui/traits/issue-78372.stderr @@ -64,7 +64,7 @@ LL | fn foo(self: Smaht); LL | impl Marker for dyn Foo {} | ^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-78372.rs:9:18 | LL | trait Foo: X {} diff --git a/tests/ui/traits/item-privacy.stderr b/tests/ui/traits/item-privacy.stderr index c20d2f723c598..ec35d59ff0420 100644 --- a/tests/ui/traits/item-privacy.stderr +++ b/tests/ui/traits/item-privacy.stderr @@ -142,7 +142,7 @@ error[E0038]: the trait `assoc_const::C` cannot be made into an object LL | ::A; | ^^^^^ `assoc_const::C` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/item-privacy.rs:25:15 | LL | const A: u8 = 0; diff --git a/tests/ui/traits/missing-for-type-in-impl.e2015.stderr b/tests/ui/traits/missing-for-type-in-impl.e2015.stderr index 541b49b024fda..bd3ab58189c15 100644 --- a/tests/ui/traits/missing-for-type-in-impl.e2015.stderr +++ b/tests/ui/traits/missing-for-type-in-impl.e2015.stderr @@ -7,7 +7,7 @@ LL | impl Foo { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | impl dyn Foo { | +++ @@ -25,7 +25,7 @@ LL | impl Foo { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | impl dyn Foo { | +++ @@ -40,7 +40,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | impl Foo { | ^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/missing-for-type-in-impl.rs:4:8 | LL | trait Foo { diff --git a/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr index dd2dca74f9087..d400594b449f3 100644 --- a/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr +++ b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr @@ -13,7 +13,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let x: &dyn Foo = &(); | ^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/supertrait-dyn-compatibility.rs:4:12 | LL | trait Foo: for Bar {} @@ -29,7 +29,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | let x: &dyn Foo = &(); | ^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/supertrait-dyn-compatibility.rs:4:12 | LL | trait Foo: for Bar {} @@ -44,7 +44,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | needs_bar(x); | ^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/supertrait-dyn-compatibility.rs:4:12 | LL | trait Foo: for Bar {} diff --git a/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr b/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr index 960802e2f8f82..14ba6d3482d7b 100644 --- a/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr +++ b/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr @@ -12,7 +12,7 @@ error[E0038]: the trait `FromResidual` cannot be made into an object LL | let b: &dyn FromResidual = &(); | ^^^^^^^^^^^^^^^^^ `FromResidual` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/canonicalize-fresh-infer-vars-issue-103626.rs:2:8 | LL | trait FromResidual::Residual> { diff --git a/tests/ui/traits/object/macro-matcher.stderr b/tests/ui/traits/object/macro-matcher.stderr index 7924c86e29400..a7c60412216e4 100644 --- a/tests/ui/traits/object/macro-matcher.stderr +++ b/tests/ui/traits/object/macro-matcher.stderr @@ -11,7 +11,7 @@ LL | m!(dyn Copy + Send + 'static); | ^^^^^^^^^^^^^^^^^^^^^^^^^ `Copy` cannot be made into an object | = note: the trait cannot be made into an object because it requires `Self: Sized` - = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit error: aborting due to 2 previous errors diff --git a/tests/ui/traits/object/safety.stderr b/tests/ui/traits/object/safety.stderr index a2cb656b08d3e..522944a018c14 100644 --- a/tests/ui/traits/object/safety.stderr +++ b/tests/ui/traits/object/safety.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Tr` cannot be made into an object LL | let _: &dyn Tr = &St; | ^^^ `Tr` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/safety.rs:4:8 | LL | trait Tr { @@ -28,7 +28,7 @@ error[E0038]: the trait `Tr` cannot be made into an object LL | let _: &dyn Tr = &St; | ^^^^^^^ `Tr` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/safety.rs:4:8 | LL | trait Tr { diff --git a/tests/ui/traits/test-2.stderr b/tests/ui/traits/test-2.stderr index 3da95b478448f..ec48dc4994467 100644 --- a/tests/ui/traits/test-2.stderr +++ b/tests/ui/traits/test-2.stderr @@ -32,7 +32,7 @@ error[E0038]: the trait `bar` cannot be made into an object LL | (Box::new(10) as Box).dup(); | ^^^^^^^^^^^^ `bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/test-2.rs:4:30 | LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } @@ -52,7 +52,7 @@ error[E0038]: the trait `bar` cannot be made into an object LL | (Box::new(10) as Box).dup(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/test-2.rs:4:30 | LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } @@ -72,7 +72,7 @@ error[E0038]: the trait `bar` cannot be made into an object LL | (Box::new(10) as Box).dup(); | ^^^^^^^^^^^^ `bar` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/test-2.rs:4:30 | LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } diff --git a/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.rs b/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.rs index 626630e60b720..16015f51ed4de 100644 --- a/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.rs +++ b/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.rs @@ -5,6 +5,6 @@ trait A {} trait B {} trait C: A + B {} -//~^ ERROR `C` is dyn-compatible and has multiple supertraits +//~^ ERROR `C` is dyn compatible and has multiple supertraits fn main() {} diff --git a/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr b/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr index fab781026b11e..03f7192e6e3c7 100644 --- a/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr +++ b/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr @@ -1,4 +1,4 @@ -error: `C` is dyn-compatible and has multiple supertraits +error: `C` is dyn compatible and has multiple supertraits --> $DIR/multiple_supertrait_upcastable.rs:7:1 | LL | trait C: A + B {} diff --git a/tests/ui/traits/unspecified-self-in-trait-ref.stderr b/tests/ui/traits/unspecified-self-in-trait-ref.stderr index 22dceadc10de9..9ea5341dfa854 100644 --- a/tests/ui/traits/unspecified-self-in-trait-ref.stderr +++ b/tests/ui/traits/unspecified-self-in-trait-ref.stderr @@ -7,7 +7,7 @@ LL | let a = Foo::lol(); = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let a = ::lol(); | ++++ + @@ -26,7 +26,7 @@ LL | let b = Foo::<_>::lol(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let b = >::lol(); | ++++ + @@ -45,7 +45,7 @@ LL | let c = Bar::lol(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let c = ::lol(); | ++++ + @@ -64,7 +64,7 @@ LL | let d = Bar::::lol(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let d = >::lol(); | ++++ + @@ -83,7 +83,7 @@ LL | let e = Bar::::lol(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | let e = >::lol(); | ++++ + diff --git a/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr b/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr index 2d5bcf1fbc4cf..bccdc290433a0 100644 --- a/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr +++ b/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr @@ -16,7 +16,7 @@ error[E0038]: the trait `MyAdd` cannot be made into an object LL | let y = x as dyn MyAdd; | ^^^^^^^^^^^^^^ `MyAdd` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/type-parameter-defaults-referencing-Self-ppaux.rs:6:55 | LL | trait MyAdd { fn add(&self, other: &Rhs) -> Self; } diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr index fefb788fac79c..76a3e62072dfb 100644 --- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr +++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr @@ -34,7 +34,7 @@ LL | trait Trait { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait Trait { | +++ @@ -67,7 +67,7 @@ LL | fn fnc(&self) -> Trait { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn fnc(&self) -> Trait { | +++ @@ -80,7 +80,7 @@ LL | fn fnc(&self) -> Trait { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn fnc(&self) -> dyn Trait { | +++ @@ -94,7 +94,7 @@ LL | trait Trait { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait Trait { | +++ @@ -105,7 +105,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | trait Trait { | ^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:8 | LL | trait Trait { @@ -121,7 +121,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | trait Trait { | ^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:8 | LL | trait Trait { @@ -154,7 +154,7 @@ LL | fn fnc(&self) -> Trait { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | fn fnc(&self) -> Trait { | +++ @@ -165,7 +165,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | fn fnc(&self) -> Trait { | ^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:8 | LL | trait Trait { @@ -181,7 +181,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | trait Trait { | ^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:8 | LL | trait Trait { diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr index f8905437c6ea6..6cb881abcd7ac 100644 --- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr +++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr @@ -7,7 +7,7 @@ LL | trait Foo> { = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait Foo> { | +++ @@ -20,7 +20,7 @@ LL | trait Bar> {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see -help: if this is a dyn-compatible trait, use `dyn` +help: if this is a dyn compatible trait, use `dyn` | LL | trait Bar> {} | +++ @@ -50,7 +50,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | trait Foo> { | ^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/ice-hir-wf-check-anon-const-issue-122989.rs:8:8 | LL | trait Foo> { @@ -81,7 +81,7 @@ error[E0038]: the trait `Foo` cannot be made into an object LL | trait Bar> {} | ^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/ice-hir-wf-check-anon-const-issue-122989.rs:8:8 | LL | trait Foo> { diff --git a/tests/ui/wf/issue-87495.stderr b/tests/ui/wf/issue-87495.stderr index 5973fff3e009e..bd12e4a46a168 100644 --- a/tests/ui/wf/issue-87495.stderr +++ b/tests/ui/wf/issue-87495.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `T` cannot be made into an object LL | const CONST: (bool, dyn T); | ^^^^^ `T` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/issue-87495.rs:4:11 | LL | trait T { diff --git a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr index 38426545bc8cb..3a9afb115384f 100644 --- a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr +++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | let t_box: Box = Box::new(S); | ^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14 | LL | trait Trait: Sized {} @@ -20,7 +20,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | takes_box(Box::new(S)); | ^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14 | LL | trait Trait: Sized {} @@ -36,7 +36,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | Box::new(S) as Box; | ^^^^^^^^^^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14 | LL | trait Trait: Sized {} diff --git a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr index 94259aa5b0aa8..4a2016eedcada 100644 --- a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr +++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | let t: &dyn Trait = &S; | ^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14 | LL | trait Trait: Sized {} @@ -20,7 +20,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | takes_trait(&S); | ^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14 | LL | trait Trait: Sized {} @@ -36,7 +36,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | &S as &dyn Trait; | ^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14 | LL | trait Trait: Sized {} diff --git a/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr index 6cd4ebf8412b6..315f74e3e0d21 100644 --- a/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr +++ b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr @@ -18,7 +18,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | Some(()) => &S, | ^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-dyn-incompat-trait-obj-match.rs:6:14 | LL | trait Trait: Sized {} @@ -36,7 +36,7 @@ error[E0038]: the trait `Trait` cannot be made into an object LL | None => &R, | ^^ `Trait` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-dyn-incompat-trait-obj-match.rs:6:14 | LL | trait Trait: Sized {} diff --git a/tests/ui/wf/wf-dyn-incompatible.stderr b/tests/ui/wf/wf-dyn-incompatible.stderr index cf016b63c7405..b1ccaff651e9c 100644 --- a/tests/ui/wf/wf-dyn-incompatible.stderr +++ b/tests/ui/wf/wf-dyn-incompatible.stderr @@ -4,7 +4,7 @@ error[E0038]: the trait `A` cannot be made into an object LL | let _x: &dyn A; | ^^^^^^ `A` cannot be made into an object | -note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit --> $DIR/wf-dyn-incompatible.rs:5:23 | LL | trait A { diff --git a/tests/ui/wf/wf-fn-where-clause.stderr b/tests/ui/wf/wf-fn-where-clause.stderr index fbfe42ac62477..1c8fa58adcc79 100644 --- a/tests/ui/wf/wf-fn-where-clause.stderr +++ b/tests/ui/wf/wf-fn-where-clause.stderr @@ -21,7 +21,7 @@ LL | fn bar() where Vec:, {} | ^^^^^^^^^^^^^ `Copy` cannot be made into an object | = note: the trait cannot be made into an object because it requires `Self: Sized` - = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + = note: for a trait to be dyn compatible it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit error[E0277]: the size for values of type `(dyn Copy + 'static)` cannot be known at compilation time --> $DIR/wf-fn-where-clause.rs:12:16