Skip to content

Commit 3883d82

Browse files
committed
Compiler: Finalize dyn compatibility renaming
1 parent 01a26c0 commit 3883d82

File tree

110 files changed

+192
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+192
-462
lines changed

compiler/rustc_hir_analysis/src/coherence/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,9 @@ fn check_object_overlap<'tcx>(
199199

200200
for component_def_id in component_def_ids {
201201
if !tcx.is_dyn_compatible(component_def_id) {
202-
// FIXME(dyn_compat_renaming): Rename test and update comment.
203202
// Without the 'dyn_compatible_for_dispatch' feature this is an error
204203
// which will be reported by wfcheck. Ignore it here.
205-
// This is tested by `coherence-impl-trait-for-trait-object-safe.rs`.
204+
// This is tested by `coherence-impl-trait-for-trait-dyn-compatible.rs`.
206205
// With the feature enabled, the trait is not implemented automatically,
207206
// so this is valid.
208207
} else {

compiler/rustc_lint/src/multiple_supertrait_upcastable.rs

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

compiler/rustc_middle/src/ty/return_position_impl_trait_in_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::ty::{self, ExistentialPredicateStableCmpExt, TyCtxt};
44

55
impl<'tcx> TyCtxt<'tcx> {
66
/// Given a `def_id` of a trait or impl method, compute whether that method needs to
7-
/// have an RPITIT shim applied to it for it to be object safe. If so, return the
7+
/// have an RPITIT shim applied to it for it to be dyn compatible. If so, return the
88
/// `def_id` of the RPITIT, and also the args of trait method that returns the RPITIT.
99
///
1010
/// NOTE that these args are not, in general, the same as than the RPITIT's args. They

compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,10 @@ pub fn report_dyn_incompatibility<'tcx>(
482482
for (span, msg) in iter::zip(multi_span, messages) {
483483
note_span.push_span_label(span, msg);
484484
}
485-
// FIXME(dyn_compat_renaming): Update the URL.
486485
err.span_note(
487486
note_span,
488487
"for a trait to be dyn compatible it needs to allow building a vtable\n\
489-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>",
488+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>",
490489
);
491490

492491
// Only provide the help if its a local trait, otherwise it's not actionable.

compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn is_dyn_compatible(tcx: TyCtxt<'_>, trait_def_id: DefId) -> bool {
6464
}
6565

6666
/// We say a method is *vtable safe* if it can be invoked on a trait
67-
/// object. Note that object-safe traits can have some
67+
/// object. Note that dyn-compatible traits can have some
6868
/// non-vtable-safe methods, so long as they require `Self: Sized` or
6969
/// otherwise ensure that they cannot be used when `Self = Trait`.
7070
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>(
421421
let receiver_ty = tcx.liberate_late_bound_regions(method.def_id, sig.input(0));
422422

423423
// Until `unsized_locals` is fully implemented, `self: Self` can't be dispatched on.
424-
// However, this is already considered object-safe. We allow it as a special case here.
424+
// However, this is already considered dyn compatible. We allow it as a special case here.
425425
// FIXME(mikeyhew) get rid of this `if` statement once `receiver_is_dispatchable` allows
426426
// `Receiver: Unsize<Receiver[Self => dyn Trait]>`.
427427
if receiver_ty != tcx.types.self_param {
@@ -631,7 +631,7 @@ fn object_ty_for_trait<'tcx>(
631631
/// - `self: Pin<Box<Self>>` requires `Pin<Box<Self>>: DispatchFromDyn<Pin<Box<dyn Trait>>>`.
632632
///
633633
/// The only case where the receiver is not dispatchable, but is still a valid receiver
634-
/// type (just not object-safe), is when there is more than one level of pointer indirection.
634+
/// type (just not dyn compatible), is when there is more than one level of pointer indirection.
635635
/// E.g., `self: &&Self`, `self: &Rc<Self>`, `self: Box<Box<Self>>`. In these cases, there
636636
/// is no way, or at least no inexpensive way, to coerce the receiver from the version where
637637
/// `Self = dyn Trait` to the version where `Self = T`, where `T` is the unknown erased type

compiler/rustc_trait_selection/src/traits/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use tracing::debug;
2525
/// trait Bar {}
2626
/// trait Foo = Bar + Bar;
2727
///
28-
/// let not_object_safe: dyn Foo; // bad, two `Bar` principals.
28+
/// let dyn_incompatible: dyn Foo; // bad, two `Bar` principals.
2929
/// ```
3030
pub fn expand_trait_aliases<'tcx>(
3131
tcx: TyCtxt<'tcx>,

tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr

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

tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr

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

tests/ui/associated-consts/associated-const-in-trait.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | impl dyn Trait {
55
| ^^^^^^^^^ `Trait` is not dyn compatible
66
|
77
note: for a trait to be dyn compatible it needs to allow building a vtable
8-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
99
--> $DIR/associated-const-in-trait.rs:4:11
1010
|
1111
LL | trait Trait {
@@ -21,7 +21,7 @@ LL | const fn n() -> usize { Self::N }
2121
| ^^^^ `Trait` is not dyn compatible
2222
|
2323
note: for a trait to be dyn compatible it needs to allow building a vtable
24-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
24+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
2525
--> $DIR/associated-const-in-trait.rs:4:11
2626
|
2727
LL | trait Trait {

tests/ui/associated-item/issue-48027.stderr

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

tests/ui/async-await/async-fn/dyn-pos.stderr

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

tests/ui/async-await/in-trait/dyn-compatibility.stderr

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

tests/ui/async-await/inference_var_self_argument.stderr

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

tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr

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

tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn foo(a: &dyn ConstParamTy_) {}
55
| ^^^^^^^^^^^^^ `ConstParamTy_` is not dyn compatible
66
|
77
note: for a trait to be dyn compatible it needs to allow building a vtable
8-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
99
--> $SRC_DIR/core/src/cmp.rs:LL:COL
1010
|
1111
= 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) {}
2121
| ^^^^^^^^^^^^^^^^^^^ `UnsizedConstParamTy` is not dyn compatible
2222
|
2323
note: for a trait to be dyn compatible it needs to allow building a vtable
24-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
24+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
2525
--> $SRC_DIR/core/src/cmp.rs:LL:COL
2626
|
2727
= note: the trait is not dyn compatible because it uses `Self` as a type parameter

tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn use_dyn(v: &dyn Foo) {
55
| ^^^^^^^ `Foo` is not dyn compatible
66
|
77
note: for a trait to be dyn compatible it needs to allow building a vtable
8-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
99
--> $DIR/dyn-compatibility-err-ret.rs:8:8
1010
|
1111
LL | trait Foo {
@@ -24,7 +24,7 @@ LL | v.test();
2424
| ^^^^^^^^ `Foo` is not dyn compatible
2525
|
2626
note: for a trait to be dyn compatible it needs to allow building a vtable
27-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
27+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
2828
--> $DIR/dyn-compatibility-err-ret.rs:8:8
2929
|
3030
LL | trait Foo {

tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn use_dyn(v: &dyn Foo) {
55
| ^^^^^^^ `Foo` is not dyn compatible
66
|
77
note: for a trait to be dyn compatible it needs to allow building a vtable
8-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
99
--> $DIR/dyn-compatibility-err-where-bounds.rs:8:8
1010
|
1111
LL | trait Foo {
@@ -22,7 +22,7 @@ LL | v.test();
2222
| ^^^^^^^^ `Foo` is not dyn compatible
2323
|
2424
note: for a trait to be dyn compatible it needs to allow building a vtable
25-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
25+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
2626
--> $DIR/dyn-compatibility-err-where-bounds.rs:8:8
2727
|
2828
LL | trait Foo {

tests/ui/const-generics/generic_const_exprs/issue-102768.stderr

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

tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LL | let _: &Copy + 'static;
2828
|
2929
= note: the trait is not dyn compatible because it requires `Self: Sized`
3030
= note: for a trait to be dyn compatible it needs to allow building a vtable
31-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
31+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
3232

3333
error: aborting due to 3 previous errors
3434

tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | impl<T, U> Dyn for dyn Foo<T, U> + '_ {
55
| ^^^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
66
|
77
note: for a trait to be dyn compatible it needs to allow building a vtable
8-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
99
--> $DIR/almost-supertrait-associated-type.rs:33:34
1010
|
1111
LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>
@@ -22,7 +22,7 @@ LL | (&PhantomData::<T> as &dyn Foo<T, U>).transmute(t)
2222
| ^^^^^^^^^^^^^^ `Foo` is not dyn compatible
2323
|
2424
note: for a trait to be dyn compatible it needs to allow building a vtable
25-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
25+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
2626
--> $DIR/almost-supertrait-associated-type.rs:33:34
2727
|
2828
LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>
@@ -39,7 +39,7 @@ LL | (&PhantomData::<T> as &dyn Foo<T, U>).transmute(t)
3939
| ^^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
4040
|
4141
note: for a trait to be dyn compatible it needs to allow building a vtable
42-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
42+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
4343
--> $DIR/almost-supertrait-associated-type.rs:33:34
4444
|
4545
LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>

tests/ui/dyn-compatibility/associated-consts.curr.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
55
| ^^^^^^^ `Bar` is not dyn compatible
66
|
77
note: for a trait to be dyn compatible it needs to allow building a vtable
8-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
99
--> $DIR/associated-consts.rs:9:11
1010
|
1111
LL | trait Bar {
@@ -21,7 +21,7 @@ LL | t
2121
| ^ `Bar` is not dyn compatible
2222
|
2323
note: for a trait to be dyn compatible it needs to allow building a vtable
24-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
24+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
2525
--> $DIR/associated-consts.rs:9:11
2626
|
2727
LL | trait Bar {

tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr

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

tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ LL | fn id<F>(f: Copy) -> usize {
3434
|
3535
= note: the trait is not dyn compatible because it requires `Self: Sized`
3636
= note: for a trait to be dyn compatible it needs to allow building a vtable
37-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
37+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
3838

3939
error[E0618]: expected function, found `(dyn Copy + 'static)`
4040
--> $DIR/avoid-ice-on-warning-2.rs:12:5

tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ LL | trait B { fn f(a: A) -> A; }
7272
| ^ `A` is not dyn compatible
7373
|
7474
note: for a trait to be dyn compatible it needs to allow building a vtable
75-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
75+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
7676
--> $DIR/avoid-ice-on-warning-3.rs:14:14
7777
|
7878
LL | trait A { fn g(b: B) -> B; }
@@ -109,7 +109,7 @@ LL | trait A { fn g(b: B) -> B; }
109109
| ^ `B` is not dyn compatible
110110
|
111111
note: for a trait to be dyn compatible it needs to allow building a vtable
112-
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
112+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
113113
--> $DIR/avoid-ice-on-warning-3.rs:4:14
114114
|
115115
LL | trait B { fn f(a: A) -> A; }

tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr

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

tests/ui/dyn-compatibility/bounds.stderr

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

0 commit comments

Comments
 (0)