Change DST syntax: type -> Sized?
closes #13367 [breaking-change] Use `Sized?` to indicate a dynamically sized type parameter or trait (used to be `type`). E.g., ``` trait Tr for Sized? {} fn foo<Sized? X: Share>(x: X) {} ```
This commit is contained in:
parent
6959931498
commit
a0cfda53c4
29 changed files with 215 additions and 178 deletions
|
@ -10,5 +10,5 @@
|
|||
|
||||
// error-pattern: instantiating a type parameter with an incompatible type
|
||||
fn bar<T: Sized>() { }
|
||||
fn foo<type T>() { bar::<Option<T>>() }
|
||||
fn foo<Sized? T>() { bar::<Option<T>>() }
|
||||
fn main() { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue