Compiler: Finalize dyn compatibility renaming

This commit is contained in:
León Orell Valerian Liehr 2025-01-22 05:14:07 +01:00
parent 01a26c026d
commit 57b5d3af62
No known key found for this signature in database
GPG key ID: D17A07215F68E713
111 changed files with 193 additions and 463 deletions

View file

@ -199,10 +199,9 @@ fn check_object_overlap<'tcx>(
for component_def_id in component_def_ids {
if !tcx.is_dyn_compatible(component_def_id) {
// FIXME(dyn_compat_renaming): Rename test and update comment.
// Without the 'dyn_compatible_for_dispatch' feature this is an error
// which will be reported by wfcheck. Ignore it here.
// This is tested by `coherence-impl-trait-for-trait-object-safe.rs`.
// This is tested by `coherence-impl-trait-for-trait-dyn-compatible.rs`.
// With the feature enabled, the trait is not implemented automatically,
// so this is valid.
} else {

View file

@ -37,7 +37,7 @@ declare_lint_pass!(MultipleSupertraitUpcastable => [MULTIPLE_SUPERTRAIT_UPCASTAB
impl<'tcx> LateLintPass<'tcx> for MultipleSupertraitUpcastable {
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) {
let def_id = item.owner_id.to_def_id();
// NOTE(nbdd0121): use `object_safety_violations` instead of `is_dyn_compatible` because
// NOTE(nbdd0121): use `dyn_compatibility_violations` instead of `is_dyn_compatible` because
// the latter will report `where_clause_object_safety` lint.
if let hir::ItemKind::Trait(_, _, _, _, _) = item.kind
&& cx.tcx.is_dyn_compatible(def_id)

View file

@ -4,7 +4,7 @@ use crate::ty::{self, ExistentialPredicateStableCmpExt, TyCtxt};
impl<'tcx> TyCtxt<'tcx> {
/// Given a `def_id` of a trait or impl method, compute whether that method needs to
/// have an RPITIT shim applied to it for it to be object safe. If so, return the
/// have an RPITIT shim applied to it for it to be dyn compatible. If so, return the
/// `def_id` of the RPITIT, and also the args of trait method that returns the RPITIT.
///
/// NOTE that these args are not, in general, the same as than the RPITIT's args. They

View file

@ -482,11 +482,10 @@ pub fn report_dyn_incompatibility<'tcx>(
for (span, msg) in iter::zip(multi_span, messages) {
note_span.push_span_label(span, msg);
}
// 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\n\
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>",
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>",
);
// Only provide the help if its a local trait, otherwise it's not actionable.

View file

@ -64,7 +64,7 @@ fn is_dyn_compatible(tcx: TyCtxt<'_>, trait_def_id: DefId) -> bool {
}
/// We say a method is *vtable safe* if it can be invoked on a trait
/// object. Note that object-safe traits can have some
/// object. Note that dyn-compatible traits can have some
/// non-vtable-safe methods, so long as they require `Self: Sized` or
/// otherwise ensure that they cannot be used when `Self = Trait`.
pub fn is_vtable_safe_method(tcx: TyCtxt<'_>, trait_def_id: DefId, method: ty::AssocItem) -> bool {
@ -421,7 +421,7 @@ fn virtual_call_violations_for_method<'tcx>(
let receiver_ty = tcx.liberate_late_bound_regions(method.def_id, sig.input(0));
// Until `unsized_locals` is fully implemented, `self: Self` can't be dispatched on.
// However, this is already considered object-safe. We allow it as a special case here.
// However, this is already considered dyn compatible. We allow it as a special case here.
// FIXME(mikeyhew) get rid of this `if` statement once `receiver_is_dispatchable` allows
// `Receiver: Unsize<Receiver[Self => dyn Trait]>`.
if receiver_ty != tcx.types.self_param {
@ -631,7 +631,7 @@ fn object_ty_for_trait<'tcx>(
/// - `self: Pin<Box<Self>>` requires `Pin<Box<Self>>: DispatchFromDyn<Pin<Box<dyn Trait>>>`.
///
/// The only case where the receiver is not dispatchable, but is still a valid receiver
/// type (just not object-safe), is when there is more than one level of pointer indirection.
/// type (just not dyn compatible), is when there is more than one level of pointer indirection.
/// E.g., `self: &&Self`, `self: &Rc<Self>`, `self: Box<Box<Self>>`. In these cases, there
/// is no way, or at least no inexpensive way, to coerce the receiver from the version where
/// `Self = dyn Trait` to the version where `Self = T`, where `T` is the unknown erased type

View file

@ -25,7 +25,7 @@ use tracing::debug;
/// trait Bar {}
/// trait Foo = Bar + Bar;
///
/// let not_object_safe: dyn Foo; // bad, two `Bar` principals.
/// let dyn_incompatible: dyn Foo; // bad, two `Bar` principals.
/// ```
pub fn expand_trait_aliases<'tcx>(
tcx: TyCtxt<'tcx>,

View file

@ -99,7 +99,7 @@ LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/invalid_const_in_lifetime_position.rs:2:10
|
LL | trait X {

View file

@ -301,7 +301,7 @@ LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `SVec` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/ice-generic-type-alias-105742.rs:15:17
|
LL | pub trait SVec: Index<

View file

@ -5,7 +5,7 @@ LL | impl dyn Trait {
| ^^^^^^^^^ `Trait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/associated-const-in-trait.rs:4:11
|
LL | trait Trait {
@ -21,7 +21,7 @@ LL | const fn n() -> usize { Self::N }
| ^^^^ `Trait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/associated-const-in-trait.rs:4:11
|
LL | trait Trait {

View file

@ -5,7 +5,7 @@ LL | impl dyn Bar {}
| ^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-48027.rs:2:11
|
LL | trait Bar {

View file

@ -5,7 +5,7 @@ LL | fn foo(x: &dyn AsyncFn()) {}
| ^^^^^^^^^ `AsyncFnMut` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $SRC_DIR/core/src/ops/async_function.rs:LL:COL
|
= note: the trait is not dyn compatible because it contains the generic associated type `CallRefFuture`

View file

@ -5,7 +5,7 @@ LL | let x: &dyn Foo = todo!();
| ^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility.rs:5:14
|
LL | trait Foo {

View file

@ -14,7 +14,7 @@ LL | async fn foo(self: &dyn Foo) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/inference_var_self_argument.rs:5:14
|
LL | trait Foo {

View file

@ -5,7 +5,7 @@ LL | impl DynIncompatible for dyn DynIncompatible { }
| ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:6:45
|
LL | trait DynIncompatible { fn eq(&self, other: Self); }

View file

@ -5,7 +5,7 @@ LL | fn foo(a: &dyn ConstParamTy_) {}
| ^^^^^^^^^^^^^ `ConstParamTy_` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
= note: the trait is not dyn compatible because it uses `Self` as a type parameter
@ -21,7 +21,7 @@ LL | fn bar(a: &dyn UnsizedConstParamTy) {}
| ^^^^^^^^^^^^^^^^^^^ `UnsizedConstParamTy` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
= note: the trait is not dyn compatible because it uses `Self` as a type parameter

View file

@ -5,7 +5,7 @@ LL | fn use_dyn(v: &dyn Foo) {
| ^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility-err-ret.rs:8:8
|
LL | trait Foo {
@ -24,7 +24,7 @@ LL | v.test();
| ^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility-err-ret.rs:8:8
|
LL | trait Foo {

View file

@ -5,7 +5,7 @@ LL | fn use_dyn(v: &dyn Foo) {
| ^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility-err-where-bounds.rs:8:8
|
LL | trait Foo {
@ -22,7 +22,7 @@ LL | v.test();
| ^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility-err-where-bounds.rs:8:8
|
LL | trait Foo {

View file

@ -99,7 +99,7 @@ LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-102768.rs:5:10
|
LL | trait X {

View file

@ -28,7 +28,7 @@ LL | let _: &Copy + 'static;
|
= note: the trait is not dyn compatible because it requires `Self: Sized`
= note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
error: aborting due to 3 previous errors

View file

@ -5,7 +5,7 @@ LL | impl<T, U> Dyn for dyn Foo<T, U> + '_ {
| ^^^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/almost-supertrait-associated-type.rs:33:34
|
LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>
@ -22,7 +22,7 @@ LL | (&PhantomData::<T> as &dyn Foo<T, U>).transmute(t)
| ^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/almost-supertrait-associated-type.rs:33:34
|
LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>
@ -39,7 +39,7 @@ LL | (&PhantomData::<T> as &dyn Foo<T, U>).transmute(t)
| ^^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/almost-supertrait-associated-type.rs:33:34
|
LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>

View file

@ -5,7 +5,7 @@ LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
| ^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/associated-consts.rs:9:11
|
LL | trait Bar {
@ -21,7 +21,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/associated-consts.rs:9:11
|
LL | trait Bar {

View file

@ -5,7 +5,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/associated-consts.rs:9:11
|
LL | trait Bar {

View file

@ -34,7 +34,7 @@ LL | fn id<F>(f: Copy) -> usize {
|
= note: the trait is not dyn compatible because it requires `Self: Sized`
= note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
error[E0618]: expected function, found `(dyn Copy + 'static)`
--> $DIR/avoid-ice-on-warning-2.rs:12:5

View file

@ -72,7 +72,7 @@ LL | trait B { fn f(a: A) -> A; }
| ^ `A` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/avoid-ice-on-warning-3.rs:14:14
|
LL | trait A { fn g(b: B) -> B; }
@ -109,7 +109,7 @@ LL | trait A { fn g(b: B) -> B; }
| ^ `B` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/avoid-ice-on-warning-3.rs:4:14
|
LL | trait B { fn f(a: A) -> A; }

View file

@ -23,7 +23,7 @@ LL | fn ord_prefer_dot(s: String) -> Ord {
| ^^^ `Ord` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
= note: the trait is not dyn compatible because it uses `Self` as a type parameter

View file

@ -5,7 +5,7 @@ LL | fn f() -> Box<dyn X<U = u32>> {
| ^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/bounds.rs:4:13
|
LL | trait X {

View file

@ -5,7 +5,7 @@ LL | fn take_dyn(_: &dyn Child) {}
| ^^^^^ `Super` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/gat-incompatible-supertrait.rs:10:10
|
LL | trait Super {

View file

@ -5,7 +5,7 @@ LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
| ^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generics.rs:10:8
|
LL | trait Bar {
@ -21,7 +21,7 @@ LL | fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
| ^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generics.rs:10:8
|
LL | trait Bar {
@ -37,7 +37,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generics.rs:10:8
|
LL | trait Bar {
@ -54,7 +54,7 @@ LL | t as &dyn Bar
| ^^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generics.rs:10:8
|
LL | trait Bar {
@ -70,7 +70,7 @@ LL | t as &dyn Bar
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generics.rs:10:8
|
LL | trait Bar {

View file

@ -5,7 +5,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generics.rs:10:8
|
LL | trait Bar {
@ -22,7 +22,7 @@ LL | t as &dyn Bar
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generics.rs:10:8
|
LL | trait Bar {

View file

@ -5,7 +5,7 @@ LL | let test: &mut dyn Bar = &mut thing;
| ^^^^^^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mention-correct-dyn-incompatible-trait.rs:4:8
|
LL | fn foo<T>(&self, val: T);
@ -23,7 +23,7 @@ LL | let test: &mut dyn Bar = &mut thing;
| ^^^^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mention-correct-dyn-incompatible-trait.rs:4:8
|
LL | fn foo<T>(&self, val: T);

View file

@ -5,7 +5,7 @@ LL | elements: Vec<Box<dyn Expr + 'x>>,
| ^^^^ `Expr` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self-in-super-predicates.rs:5:21
|
LL | trait Expr: Debug + PartialEq {
@ -20,7 +20,7 @@ LL | let a: Box<dyn Expr> = Box::new(SExpr::new());
| ^^^^ `Expr` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self-in-super-predicates.rs:5:21
|
LL | trait Expr: Debug + PartialEq {
@ -35,7 +35,7 @@ LL | let b: Box<dyn Expr> = Box::new(SExpr::new());
| ^^^^ `Expr` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self-in-super-predicates.rs:5:21
|
LL | trait Expr: Debug + PartialEq {

View file

@ -5,7 +5,7 @@ LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
| ^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self.rs:11:22
|
LL | trait Bar {
@ -21,7 +21,7 @@ LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
| ^^^^^^^ `Baz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self.rs:15:22
|
LL | trait Baz {
@ -37,7 +37,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self.rs:11:22
|
LL | trait Bar {
@ -54,7 +54,7 @@ LL | t
| ^ `Baz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self.rs:15:22
|
LL | trait Baz {

View file

@ -5,7 +5,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self.rs:11:22
|
LL | trait Bar {
@ -22,7 +22,7 @@ LL | t
| ^ `Baz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/mentions-Self.rs:15:22
|
LL | trait Baz {

View file

@ -5,7 +5,7 @@ LL | fn bar(x: &dyn Foo) {}
| ^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/missing-assoc-type.rs:2:10
|
LL | trait Foo {

View file

@ -5,7 +5,7 @@ LL | fn diverges() -> Box<dyn Foo> {
| ^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/no-static.rs:9:8
|
LL | trait Foo {
@ -29,7 +29,7 @@ LL | let b: Box<dyn Foo> = Box::new(Bar);
| ^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/no-static.rs:9:8
|
LL | trait Foo {
@ -53,7 +53,7 @@ LL | let b: Box<dyn Foo> = Box::new(Bar);
| ^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/no-static.rs:9:8
|
LL | trait Foo {

View file

@ -5,7 +5,7 @@ LL | let b: Box<dyn Foo> = Box::new(Bar);
| ^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/no-static.rs:9:8
|
LL | trait Foo {

View file

@ -5,7 +5,7 @@ LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
| ^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/sized-2.rs:9:18
|
LL | trait Bar
@ -20,7 +20,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/sized-2.rs:9:18
|
LL | trait Bar

View file

@ -5,7 +5,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/sized-2.rs:9:18
|
LL | trait Bar

View file

@ -5,7 +5,7 @@ LL | fn make_bar<T: Bar>(t: &T) -> &dyn Bar {
| ^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/sized.rs:8:12
|
LL | trait Bar: Sized {
@ -20,7 +20,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/sized.rs:8:12
|
LL | trait Bar: Sized {

View file

@ -5,7 +5,7 @@ LL | t
| ^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/sized.rs:8:12
|
LL | trait Bar: Sized {

View file

@ -27,7 +27,7 @@ LL | fn c(&self) -> dyn SuperTrait<T>;
| ^^^^^^^^^^^^^^^^^ `SuperTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/supertrait-mentions-GAT.rs:4:10
|
LL | type Gat<'a>

View file

@ -25,7 +25,7 @@ LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
| ^^^ `Baz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/supertrait-mentions-Self.rs:8:13
|
LL | trait Baz : Bar<Self> {

View file

@ -5,7 +5,7 @@ LL | static FOO: &(dyn Qux + Sync) = "desc";
| ^^^^^^^^^^^^^^ `Qux` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/taint-const-eval.rs:8:8
|
LL | trait Qux {
@ -28,7 +28,7 @@ LL | static FOO: &(dyn Qux + Sync) = "desc";
| ^^^^^^ `Qux` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/taint-const-eval.rs:8:8
|
LL | trait Qux {
@ -52,7 +52,7 @@ LL | static FOO: &(dyn Qux + Sync) = "desc";
| ^^^^^^^^^^^^^^ `Qux` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/taint-const-eval.rs:8:8
|
LL | trait Qux {

View file

@ -5,7 +5,7 @@ LL | static FOO: &(dyn Qux + Sync) = "desc";
| ^^^^^^ `Qux` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/taint-const-eval.rs:8:8
|
LL | trait Qux {

View file

@ -8,7 +8,7 @@ LL | fn fetcher() -> Box<dyn Fetcher> {
| ^^^^^^^^^^^ `Fetcher` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
|
LL | pub trait Fetcher: Send + Sync {
@ -26,7 +26,7 @@ LL | let fetcher = fetcher();
| ^^^^^^^^^ `Fetcher` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
|
LL | pub trait Fetcher: Send + Sync {
@ -44,7 +44,7 @@ LL | let _ = fetcher.get();
| ^^^^^^^^^^^^^ `Fetcher` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
|
LL | pub trait Fetcher: Send + Sync {

View file

@ -5,7 +5,7 @@ LL | fn call_foo(x: Box<dyn Trait>) {
| ^^^^^^^^^ `Trait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/E0038.rs:2:22
|
LL | trait Trait {
@ -21,7 +21,7 @@ LL | let y = x.foo();
| ^^^^^^^ `Trait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/E0038.rs:2:22
|
LL | trait Trait {

View file

@ -5,7 +5,7 @@ LL | async fn takes_dyn_trait(x: &dyn Foo) {
| ^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-async-fn-in-dyn-trait.rs:4:14
|
LL | trait Foo {
@ -21,7 +21,7 @@ LL | x.bar().await;
| ^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-async-fn-in-dyn-trait.rs:4:14
|
LL | trait Foo {
@ -37,7 +37,7 @@ LL | x.bar().await;
| ^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-async-fn-in-dyn-trait.rs:4:14
|
LL | trait Foo {

View file

@ -8,7 +8,7 @@ LL | Ptr(Box::new(4)) as Ptr<dyn Trait>;
| ^^^^^^^^^^^^^^ `Trait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:25:18
|
LL | trait Trait {
@ -27,7 +27,7 @@ LL | Ptr(Box::new(4)) as Ptr<dyn Trait>;
| ^^^^^^^^^^^^^^^^ `Trait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:25:18
|
LL | trait Trait {

View file

@ -5,7 +5,7 @@ LL | fn takes_dyn_incompatible_ref<T>(obj: &dyn DynIncompatible1) {
| ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
|
LL | trait DynIncompatible1: Sized {}
@ -20,7 +20,7 @@ LL | fn return_dyn_incompatible_ref() -> &'static dyn DynIncompatible2 {
| ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible2` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:7:8
|
LL | trait DynIncompatible2 {
@ -43,7 +43,7 @@ LL | fn takes_dyn_incompatible_box(obj: Box<dyn DynIncompatible3>) {
| ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible3` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:11:8
|
LL | trait DynIncompatible3 {
@ -59,7 +59,7 @@ LL | fn return_dyn_incompatible_rc() -> std::rc::Rc<dyn DynIncompatible4> {
| ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible4` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:15:22
|
LL | trait DynIncompatible4 {
@ -75,7 +75,7 @@ LL | impl Trait for dyn DynIncompatible1 {}
| ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
|
LL | trait DynIncompatible1: Sized {}

View file

@ -43,7 +43,7 @@ LL | fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/gat-in-trait-path-undeclared-lifetime.rs:2:8
|
LL | trait X {

View file

@ -1,52 +0,0 @@
error[E0038]: the trait `Foo` is not dyn compatible
--> $DIR/gat-in-trait-path.rs:26:17
|
LL | fn f(_arg : Box<dyn for<'a> Foo<A<'a> = &'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/gat-in-trait-path.rs:10:10
|
LL | trait Foo {
| --- this trait is not dyn compatible...
LL | type A<'a> where Self: 'a;
| ^ ...because it contains the generic associated type `A`
= help: consider moving `A` to another trait
error[E0038]: the trait `Foo` is not dyn compatible
--> $DIR/gat-in-trait-path.rs:32:5
|
LL | f(Box::new(foo));
| ^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/gat-in-trait-path.rs:10:10
|
LL | trait Foo {
| --- this trait is not dyn compatible...
LL | type A<'a> where Self: 'a;
| ^ ...because it contains the generic associated type `A`
= help: consider moving `A` to another trait
error[E0038]: the trait `Foo` is not dyn compatible
--> $DIR/gat-in-trait-path.rs:32:5
|
LL | f(Box::new(foo));
| ^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/gat-in-trait-path.rs:10:10
|
LL | trait Foo {
| --- this trait is not dyn compatible...
LL | type A<'a> where Self: 'a;
| ^ ...because it contains the generic associated type `A`
= help: consider moving `A` to another trait
= note: required for the cast from `Box<Fooer<{integer}>>` to `Box<(dyn Foo<A<'a> = &'a ()> + 'static)>`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0038`.

View file

@ -5,7 +5,7 @@ LL | fn f(_arg : Box<dyn for<'a> Foo<A<'a> = &'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/gat-in-trait-path.rs:6:10
|
LL | trait Foo {
@ -21,7 +21,7 @@ LL | f(Box::new(foo));
| ^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/gat-in-trait-path.rs:6:10
|
LL | trait Foo {
@ -37,7 +37,7 @@ LL | f(Box::new(foo));
| ^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/gat-in-trait-path.rs:6:10
|
LL | trait Foo {

View file

@ -130,7 +130,7 @@ LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/gat-trait-path-parenthesised-args.rs:2:8
|
LL | trait X {
@ -196,7 +196,7 @@ LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
| ^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/gat-trait-path-parenthesised-args.rs:2:8
|
LL | trait X {

View file

@ -1,19 +0,0 @@
error[E0038]: the trait `X` is not dyn compatible
--> $DIR/issue-67510-pass.rs:12:23
|
LL | fn _func1<'a>(_x: Box<dyn X<Y<'a>=&'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/issue-67510-pass.rs:9:10
|
LL | trait X {
| - this trait is not dyn compatible...
LL | type Y<'a>;
| ^ ...because it contains the generic associated type `Y`
= help: consider moving `Y` to another trait
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.

View file

@ -5,7 +5,7 @@ LL | fn _func1<'a>(_x: Box<dyn X<Y<'a>=&'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-67510-pass.rs:4:10
|
LL | trait X {

View file

@ -36,7 +36,7 @@ LL | fn f(x: Box<dyn X<Y<'a> = &'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-67510.rs:2:10
|
LL | trait X {

View file

@ -55,7 +55,7 @@ LL | inner: Box<dyn Provider<A = B>>,
| ^^^^^^^^^^^^^^^^^^^ `Provider` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-71176.rs:2:10
|
LL | trait Provider {
@ -72,7 +72,7 @@ LL | inner: Box::new(()),
| ^^^^^^^^^^^^ `Provider` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-71176.rs:2:10
|
LL | trait Provider {
@ -89,7 +89,7 @@ LL | inner: Box::new(()),
| ^^^^^^^^^^^^ `Provider` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-71176.rs:2:10
|
LL | trait Provider {

View file

@ -1,57 +0,0 @@
error[E0107]: missing generics for associated type `SuperTrait::SubType`
--> $DIR/issue-76535.rs:39:33
|
LL | let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
| ^^^^^^^ expected 1 lifetime argument
|
note: associated type defined here, with 1 lifetime parameter: `'a`
--> $DIR/issue-76535.rs:9:10
|
LL | type SubType<'a>: SubTrait where Self: 'a;
| ^^^^^^^ --
help: add missing lifetime argument
|
LL | let sub: Box<dyn SuperTrait<SubType<'a> = SubStruct>> = Box::new(SuperStruct::new(0));
| ++++
error[E0038]: the trait `SuperTrait` is not dyn compatible
--> $DIR/issue-76535.rs:39:14
|
LL | let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/issue-76535.rs:9:10
|
LL | pub trait SuperTrait {
| ---------- this trait is not dyn compatible...
LL | type SubType<'a>: SubTrait where Self: 'a;
| ^^^^^^^ ...because it contains the generic associated type `SubType`
= help: consider moving `SubType` to another trait
= help: only type `SuperStruct` implements `SuperTrait` within this crate. Consider using it directly instead.
= note: `SuperTrait` may be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
error[E0038]: the trait `SuperTrait` is not dyn compatible
--> $DIR/issue-76535.rs:39:57
|
LL | let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/issue-76535.rs:9:10
|
LL | pub trait SuperTrait {
| ---------- this trait is not dyn compatible...
LL | type SubType<'a>: SubTrait where Self: 'a;
| ^^^^^^^ ...because it contains the generic associated type `SubType`
= help: consider moving `SubType` to another trait
= help: only type `SuperStruct` implements `SuperTrait` within this crate. Consider using it directly instead.
= note: `SuperTrait` may be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
= note: required for the cast from `Box<SuperStruct>` to `Box<dyn SuperTrait<SubType<'_> = SubStruct<'_>>>`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0038, E0107.
For more information about an error, try `rustc --explain E0038`.

View file

@ -21,7 +21,7 @@ LL | let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruc
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-76535.rs:4:10
|
LL | pub trait SuperTrait {
@ -39,7 +39,7 @@ LL | let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruc
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-76535.rs:4:10
|
LL | pub trait SuperTrait {

View file

@ -1,36 +0,0 @@
error[E0107]: missing generics for associated type `CollectionFamily::Member`
--> $DIR/issue-78671.rs:10:47
|
LL | Box::new(Family) as &dyn CollectionFamily<Member=usize>
| ^^^^^^ expected 1 generic argument
|
note: associated type defined here, with 1 generic parameter: `T`
--> $DIR/issue-78671.rs:7:10
|
LL | type Member<T>;
| ^^^^^^ -
help: add missing generic argument
|
LL | Box::new(Family) as &dyn CollectionFamily<Member<T>=usize>
| +++
error[E0038]: the trait `CollectionFamily` is not dyn compatible
--> $DIR/issue-78671.rs:10:25
|
LL | Box::new(Family) as &dyn CollectionFamily<Member=usize>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CollectionFamily` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/issue-78671.rs:7:10
|
LL | trait CollectionFamily {
| ---------------- this trait is not dyn compatible...
LL | type Member<T>;
| ^^^^^^ ...because it contains the generic associated type `Member`
= help: consider moving `Member` to another trait
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0038, E0107.
For more information about an error, try `rustc --explain E0038`.

View file

@ -21,7 +21,7 @@ LL | Box::new(Family) as &dyn CollectionFamily<Member=usize>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CollectionFamily` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-78671.rs:2:10
|
LL | trait CollectionFamily {

View file

@ -1,53 +0,0 @@
error[E0107]: missing generics for associated type `MapLike::VRefCont`
--> $DIR/issue-79422.rs:47:36
|
LL | as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
| ^^^^^^^^ expected 1 lifetime argument
|
note: associated type defined here, with 1 lifetime parameter: `'a`
--> $DIR/issue-79422.rs:23:10
|
LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
| ^^^^^^^^ --
help: add missing lifetime argument
|
LL | as Box<dyn MapLike<u8, u8, VRefCont<'a> = dyn RefCont<'_, u8>>>;
| ++++
error[E0038]: the trait `MapLike` is not dyn compatible
--> $DIR/issue-79422.rs:47:12
|
LL | as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/issue-79422.rs:23:10
|
LL | trait MapLike<K, V> {
| ------- this trait is not dyn compatible...
LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
| ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
= help: consider moving `VRefCont` to another trait
error[E0038]: the trait `MapLike` is not dyn compatible
--> $DIR/issue-79422.rs:44:13
|
LL | let m = Box::new(std::collections::BTreeMap::<u8, u8>::new())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/issue-79422.rs:23:10
|
LL | trait MapLike<K, V> {
| ------- this trait is not dyn compatible...
LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
| ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
= help: consider moving `VRefCont` to another trait
= note: required for the cast from `Box<BTreeMap<u8, u8>>` to `Box<dyn MapLike<u8, u8, VRefCont<'_> = (dyn RefCont<'_, u8> + 'static)>>`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0038, E0107.
For more information about an error, try `rustc --explain E0038`.

View file

@ -21,7 +21,7 @@ LL | as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-79422.rs:18:10
|
LL | trait MapLike<K, V> {
@ -37,7 +37,7 @@ LL | let m = Box::new(std::collections::BTreeMap::<u8, u8>::new())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-79422.rs:18:10
|
LL | trait MapLike<K, V> {

View file

@ -55,7 +55,7 @@ LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/missing_lifetime_args.rs:2:10
|
LL | trait X {

View file

@ -99,7 +99,7 @@ LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
| ^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/trait-path-type-error-once-implemented.rs:2:10
|
LL | trait X {

View file

@ -1,51 +0,0 @@
error[E0038]: the trait `StreamingIterator` is not dyn compatible
--> $DIR/trait-objects.rs:13:21
|
LL | fn min_size(x: &mut dyn for<'a> StreamingIterator<Item<'a> = &'a i32>) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `StreamingIterator` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/trait-objects.rs:7:10
|
LL | trait StreamingIterator {
| ----------------- this trait is not dyn compatible...
LL | type Item<'a> where Self: 'a;
| ^^^^ ...because it contains the generic associated type `Item`
= help: consider moving `Item` to another trait
error[E0038]: the trait `StreamingIterator` is not dyn compatible
--> $DIR/trait-objects.rs:15:7
|
LL | x.size_hint().0
| ^^^^^^^^^ `StreamingIterator` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/trait-objects.rs:7:10
|
LL | trait StreamingIterator {
| ----------------- this trait is not dyn compatible...
LL | type Item<'a> where Self: 'a;
| ^^^^ ...because it contains the generic associated type `Item`
= help: consider moving `Item` to another trait
error[E0038]: the trait `StreamingIterator` is not dyn compatible
--> $DIR/trait-objects.rs:15:5
|
LL | x.size_hint().0
| ^^^^^^^^^^^^^ `StreamingIterator` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/trait-objects.rs:7:10
|
LL | trait StreamingIterator {
| ----------------- this trait is not dyn compatible...
LL | type Item<'a> where Self: 'a;
| ^^^^ ...because it contains the generic associated type `Item`
= help: consider moving `Item` to another trait
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0038`.

View file

@ -5,7 +5,7 @@ LL | fn min_size(x: &mut dyn for<'a> StreamingIterator<Item<'a> = &'a i32>) -> u
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `StreamingIterator` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/trait-objects.rs:2:10
|
LL | trait StreamingIterator {
@ -21,7 +21,7 @@ LL | x.size_hint().0
| ^^^^^^^^^ `StreamingIterator` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/trait-objects.rs:2:10
|
LL | trait StreamingIterator {
@ -37,7 +37,7 @@ LL | x.size_hint().0
| ^^^^^^^^^^^^^ `StreamingIterator` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/trait-objects.rs:2:10
|
LL | trait StreamingIterator {

View file

@ -5,7 +5,7 @@ LL | let x: &dyn Foo = &();
| ^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/span-bug-issue-121597.rs:4:12
|
LL | trait Foo: for<T> Bar<T> {}
@ -21,7 +21,7 @@ LL | let x: &dyn Foo = &();
| ^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/span-bug-issue-121597.rs:4:12
|
LL | trait Foo: for<T> Bar<T> {}

View file

@ -5,7 +5,7 @@ LL | fn car() -> dyn DynIncompatible {
| ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
|
LL | trait DynIncompatible {
@ -33,7 +33,7 @@ LL | fn cat() -> Box<dyn DynIncompatible> {
| ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
|
LL | trait DynIncompatible {
@ -78,7 +78,7 @@ LL | return Box::new(A);
| ^^^^^^^^^^^ `DynIncompatible` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
|
LL | trait DynIncompatible {
@ -107,7 +107,7 @@ LL | Box::new(B)
| ^^^^^^^^^^^ `DynIncompatible` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
|
LL | trait DynIncompatible {

View file

@ -15,7 +15,7 @@ LL | MyTrait::foo(&self)
| ^^^^^^^^^^^^ `MyTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
|
LL | trait MyTrait {
@ -40,7 +40,7 @@ LL | impl dyn MyTrait {
| ^^^^^^^^^^^ `MyTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
|
LL | trait MyTrait {
@ -57,7 +57,7 @@ LL | fn other(&self) -> impl Marker {
| ^^^^ `MyTrait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
|
LL | trait MyTrait {

View file

@ -5,7 +5,7 @@ LL | let i = Box::new(42_u32) as Box<dyn Foo>;
| ^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility.rs:4:22
|
LL | trait Foo {
@ -22,7 +22,7 @@ LL | let s = i.baz();
| ^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility.rs:4:22
|
LL | trait Foo {
@ -39,7 +39,7 @@ LL | let s = i.baz();
| ^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility.rs:4:22
|
LL | trait Foo {
@ -56,7 +56,7 @@ LL | let i = Box::new(42_u32) as Box<dyn Foo>;
| ^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-compatibility.rs:4:22
|
LL | trait Foo {

View file

@ -5,7 +5,7 @@ LL | let _: &dyn rpitit::Foo = todo!();
| ^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/auxiliary/rpitit.rs:4:21
|
LL | fn bar(self) -> impl Deref<Target = impl Sized>;

View file

@ -5,7 +5,7 @@ LL | fn foo(b: &dyn Bar) {
| ^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-18959.rs:1:20
|
LL | pub trait Foo { fn foo<T>(&self, ext_thing: &T); }
@ -21,7 +21,7 @@ LL | b.foo(&0)
| ^^^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-18959.rs:1:20
|
LL | pub trait Foo { fn foo<T>(&self, ext_thing: &T); }
@ -37,7 +37,7 @@ LL | let test: &dyn Bar = &mut thing;
| ^^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-18959.rs:1:20
|
LL | pub trait Foo { fn foo<T>(&self, ext_thing: &T); }
@ -53,7 +53,7 @@ LL | let test: &dyn Bar = &mut thing;
| ^^^^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-18959.rs:1:20
|
LL | pub trait Foo { fn foo<T>(&self, ext_thing: &T); }
@ -70,7 +70,7 @@ LL | foo(test);
| ^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-18959.rs:1:20
|
LL | pub trait Foo { fn foo<T>(&self, ext_thing: &T); }

View file

@ -5,7 +5,7 @@ LL | foos: &'static [&'static (dyn Qiz + 'static)]
| ^^^^^^^^^^^^^^^^^ `Qiz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-19380.rs:2:6
|
LL | trait Qiz {
@ -29,7 +29,7 @@ LL | const BAR : Bar = Bar { foos: &[&FOO]};
| ^^^^ `Qiz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-19380.rs:2:6
|
LL | trait Qiz {
@ -54,7 +54,7 @@ LL | const BAR : Bar = Bar { foos: &[&FOO]};
| ^^^^^^^ `Qiz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-19380.rs:2:6
|
LL | trait Qiz {

View file

@ -5,7 +5,7 @@ LL | as &dyn Map<Key=u32,MapValue=u32>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `Map` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-26056.rs:9:12
|
LL | trait Map: MapLookup<<Self as Map>::Key> {

View file

@ -5,7 +5,7 @@ LL | impl Trait for dyn X {}
| ^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-50781.rs:4:8
|
LL | trait X {
@ -22,7 +22,7 @@ LL | <dyn X as X>::foo(&());
| ^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-50781.rs:4:8
|
LL | trait X {
@ -40,7 +40,7 @@ LL | <dyn X as X>::foo(&());
| ^^^^^ `X` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-50781.rs:4:8
|
LL | trait X {

View file

@ -26,7 +26,7 @@ LL | let z = &x as &dyn Foo;
| ^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/kindck-inherited-copy-bound.rs:10:13
|
LL | trait Foo : Copy {
@ -41,7 +41,7 @@ LL | let z = &x as &dyn Foo;
| ^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/kindck-inherited-copy-bound.rs:10:13
|
LL | trait Foo : Copy {

View file

@ -26,7 +26,7 @@ LL | let z = &x as &dyn Foo;
| ^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/kindck-inherited-copy-bound.rs:10:13
|
LL | trait Foo : Copy {

View file

@ -5,7 +5,7 @@ LL | fn bar(_x: Foo) {}
| ^^^ `issue_3907::Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/auxiliary/issue-3907.rs:2:8
|
LL | fn bar();

View file

@ -8,7 +8,7 @@ LL | let x = Rc::new(5usize) as Rc<dyn Foo>;
| ^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
|
LL | trait Foo {
@ -27,7 +27,7 @@ LL | let x = Rc::new(5usize) as Rc<dyn Foo>;
| ^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
|
LL | trait Foo {

View file

@ -8,7 +8,7 @@ LL | let x = Rc::new(5usize) as Rc<dyn Foo>;
| ^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
|
LL | trait Foo {

View file

@ -5,7 +5,7 @@ LL | pub desc: &'static dyn Qux,
| ^^^^^^^ `Qux` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/unsizing-wfcheck-issue-127299.rs:4:8
|
LL | trait Qux {
@ -44,7 +44,7 @@ LL | static FOO: &Lint = &Lint { desc: "desc" };
| ^^^^^^ `Qux` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/unsizing-wfcheck-issue-127299.rs:4:8
|
LL | trait Qux {
@ -68,7 +68,7 @@ LL | static FOO: &Lint = &Lint { desc: "desc" };
| ^^^^^^ `Qux` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/unsizing-wfcheck-issue-127299.rs:4:8
|
LL | trait Qux {

View file

@ -5,7 +5,7 @@ LL | fn bar(x: &dyn Trait) {}
| ^^^^^^^^^ `Trait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-references-self.rs:2:22
|
LL | trait Trait {
@ -25,7 +25,7 @@ LL | fn foo(x: &dyn Other) {}
| ^^^^^^^^^ `Other` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-references-self.rs:11:14
|
LL | trait Other: Sized {}

View file

@ -18,7 +18,7 @@ LL | fn f(a: dyn A) -> dyn A;
| ^^^^^ `A` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:3:10
|
LL | trait A: Sized {
@ -46,7 +46,7 @@ LL | fn f(a: dyn B) -> dyn B;
| ^^^^^ `B` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:8
|
LL | trait B {

View file

@ -18,7 +18,7 @@ LL | fn f(a: A) -> A;
| ^ `A` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-should-use-self.rs:2:10
|
LL | trait A: Sized {
@ -46,7 +46,7 @@ LL | fn f(a: B) -> B;
| ^ `B` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-should-use-self.rs:8:8
|
LL | trait B {

View file

@ -5,7 +5,7 @@ LL | fn bar(x: &dyn Trait) {}
| ^^^^^^^^^ `Trait` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/dyn-incompatible-trait-should-use-where-sized.rs:5:8
|
LL | trait Trait {

View file

@ -47,7 +47,7 @@ LL | fn foo() -> Clone;
|
= note: the trait is not dyn compatible because it requires `Self: Sized`
= note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
help: there is an associated type with the same name
|
LL | fn foo() -> Self::Clone;
@ -74,7 +74,7 @@ LL | fn handle() -> DbHandle;
| ^^^^^^^^ `DbHandle` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-116434-2015.rs:14:17
|
LL | trait DbHandle: Sized {}

View file

@ -5,7 +5,7 @@ LL | struct S(Box<dyn B>);
| ^^^^^ `B` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/auxiliary/dyn-incompatible.rs:4:8
|
LL | fn f();

View file

@ -15,7 +15,7 @@ LL | struct Foo<T>(dyn SendEqAlias<T>);
| ^^^^^^^^^^^^^^ `SendEqAlias` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generic-default-in-dyn.rs:1:24
|
LL | trait SendEqAlias<T> = PartialEq;
@ -30,7 +30,7 @@ LL | struct Bar<T>(dyn SendEqAlias<T>, T);
| ^^^^^^^^^^^^^^ `SendEqAlias` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/generic-default-in-dyn.rs:1:24
|
LL | trait SendEqAlias<T> = PartialEq;

View file

@ -5,7 +5,7 @@ LL | let _: &dyn EqAlias = &123;
| ^^^^^^^ `EqAlias` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
= note: ...because it uses `Self` as a type parameter

View file

@ -5,7 +5,7 @@ LL | fn foo(x: &dyn BB) {}
| ^^ `BB` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/self-in-const-generics.rs:7:12
|
LL | trait BB = Bar<{ 2 + 1 }>;

View file

@ -5,7 +5,7 @@ LL | pub fn f(_f: &dyn SelfInput) {}
| ^^^^^^^^^ `SelfInput` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/self-in-generics.rs:6:23
|
LL | pub trait SelfInput = Fn(&mut Self);

View file

@ -5,7 +5,7 @@ LL | &dyn Array;
| ^^^^^^^^^^ `Array` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-20692.rs:1:14
|
LL | trait Array: Sized + Copy {}
@ -21,7 +21,7 @@ LL | let _ = x
| ^ `Array` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-20692.rs:1:14
|
LL | trait Array: Sized + Copy {}

View file

@ -27,7 +27,7 @@ LL | | <Assoc=()>
| |________________________^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-28576.rs:5:16
|
LL | pub trait Bar: Foo<Assoc=()> {

View file

@ -5,7 +5,7 @@ LL | trait C<T>: A<dyn B<T, Output = usize>> {}
| ^^^^^^^^^^^^^^^^^^^^ `B` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-38404.rs:1:13
|
LL | trait A<T>: std::ops::Add<Self> + Sized {}
@ -20,7 +20,7 @@ LL | trait C<T>: A<dyn B<T, Output = usize>> {}
| ^^^^^^^^^^^^^^^^^^^^ `B` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-38404.rs:1:13
|
LL | trait A<T>: std::ops::Add<Self> + Sized {}
@ -36,7 +36,7 @@ LL | trait C<T>: A<dyn B<T, Output = usize>> {}
| ^^^^^^^^^^^^^^^^^^^^ `B` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-38404.rs:1:13
|
LL | trait A<T>: std::ops::Add<Self> + Sized {}

View file

@ -5,7 +5,7 @@ LL | let _f: Box<dyn Foo> =
| ^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-38604.rs:2:22
|
LL | trait Foo where u32: Q<Self> {
@ -21,7 +21,7 @@ LL | Box::new(());
| ^^^^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-38604.rs:2:22
|
LL | trait Foo where u32: Q<Self> {

View file

@ -5,7 +5,7 @@ LL | where for<'a> &'a mut [dyn Bar]: ;
| ^^^^^^^^^^^^^^^^^ `Bar` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-72410.rs:13:8
|
LL | pub trait Bar {

View file

@ -143,7 +143,7 @@ LL | <dyn C>::A;
| ^^^^^ `assoc_const::C` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/item-privacy.rs:25:15
|
LL | const A: u8 = 0;

View file

@ -41,7 +41,7 @@ LL | impl Foo<i64> {
| ^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/missing-for-type-in-impl.rs:4:8
|
LL | trait Foo<T> {

View file

@ -14,7 +14,7 @@ LL | let x: &dyn Foo = &();
| ^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/supertrait-dyn-compatibility.rs:4:12
|
LL | trait Foo: for<T> Bar<T> {}
@ -31,7 +31,7 @@ LL | let x: &dyn Foo = &();
| ^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/supertrait-dyn-compatibility.rs:4:12
|
LL | trait Foo: for<T> Bar<T> {}
@ -47,7 +47,7 @@ LL | needs_bar(x);
| ^^^^^^^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/supertrait-dyn-compatibility.rs:4:12
|
LL | trait Foo: for<T> Bar<T> {}

Some files were not shown because too many files have changed in this diff Show more