Parse auto trait inside fns.
Also refactored parsing auto traits.
This commit is contained in:
parent
9ccd3ac178
commit
4e3953bbdd
2 changed files with 20 additions and 13 deletions
|
|
@ -11,7 +11,6 @@
|
|||
#![feature(optin_builtin_traits)]
|
||||
|
||||
auto trait Auto {}
|
||||
|
||||
unsafe auto trait AutoUnsafe {}
|
||||
|
||||
impl !Auto for bool {}
|
||||
|
|
@ -26,6 +25,10 @@ fn take_auto<T: Auto>(_: T) {}
|
|||
fn take_auto_unsafe<T: AutoUnsafe>(_: T) {}
|
||||
|
||||
fn main() {
|
||||
// Parse inside functions.
|
||||
auto trait AutoInner {}
|
||||
unsafe auto trait AutoUnsafeInner {}
|
||||
|
||||
take_auto(0);
|
||||
take_auto(AutoBool(true));
|
||||
take_auto_unsafe(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue