about summary refs log tree commit diff
path: root/src/librustsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-04-30 10:37:58 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-04-30 19:53:02 -0700
commit2db4259b3531e0cfa1f6df2ff95e30a4c871a105 (patch)
tree192b8d969e34bd1390bd769e17d68b2e9c57e77e /src/librustsyntax/parse/parser.rs
parent079c3b02a86aa73d0d070876612ed889dc187354 (diff)
downloadrust-2db4259b3531e0cfa1f6df2ff95e30a4c871a105.tar.gz
rust-2db4259b3531e0cfa1f6df2ff95e30a4c871a105.zip
Stop inferring bot/static when types/regions are unconstrained.
Also, some other changes that came up along the way:
- add a 'blk' region for the current block.
- detect unused type/region variables.
Diffstat (limited to 'src/librustsyntax/parse/parser.rs')
-rw-r--r--src/librustsyntax/parse/parser.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/librustsyntax/parse/parser.rs b/src/librustsyntax/parse/parser.rs
index 890e59cbb14..0c681900dd5 100644
--- a/src/librustsyntax/parse/parser.rs
+++ b/src/librustsyntax/parse/parser.rs
@@ -250,16 +250,7 @@ fn parse_ret_ty(p: parser) -> (ast::ret_style, @ast::ty) {
 
 fn region_from_name(p: parser, s: option<str>) -> @ast::region {
     let r = alt s {
-      some (string) {
-        // FIXME: To be consistent with our type resolution, the
-        // static region should probably be resolved during type
-        // checking, not in the parser. (Issue #2256)
-        if string == "static" {
-            ast::re_static
-        } else {
-            ast::re_named(string)
-        }
-      }
+      some (string) { ast::re_named(string) }
       none { ast::re_anon }
     };