Intermediate Rust
Q58 / 100

What is the ? Sized bound?

Correct! Well done.

Incorrect.

The correct answer is B) Relaxing the default Sized constraint on a generic parameter to allow dynamically-sized types (DSTs) like str and [T]

B

Correct Answer

Relaxing the default Sized constraint on a generic parameter to allow dynamically-sized types (DSTs) like str and [T]

Explanation

fn f<T: ?Sized>(x: &T) allows passing str and [T] as well as Sized types. fn f<T>(x: &T) implicitly requires T: Sized.

Progress
58/100