about summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2014-07-08 14:26:02 +1200
committerNick Cameron <ncameron@mozilla.com>2014-07-08 22:44:31 +1200
commita0cfda53c4b7367f6494e3d746b35cea644ee50d (patch)
treea9a65cb86769ae39e01562cda9eda0dfdb860245 /src/libsyntax/parse/token.rs
parent6959931498820b2b784168164b53a79dceafc4da (diff)
downloadrust-a0cfda53c4b7367f6494e3d746b35cea644ee50d.tar.gz
rust-a0cfda53c4b7367f6494e3d746b35cea644ee50d.zip
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) {}
```
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index dcf37e37ff0..367b18916ac 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -76,6 +76,7 @@ pub enum Token {
     RBRACE,
     POUND,
     DOLLAR,
+    QUESTION,
 
     /* Literals */
     LIT_BYTE(u8),
@@ -195,6 +196,7 @@ pub fn to_str(t: &Token) -> String {
       RBRACE => "}".to_string(),
       POUND => "#".to_string(),
       DOLLAR => "$".to_string(),
+      QUESTION => "?".to_string(),
 
       /* Literals */
       LIT_BYTE(b) => {