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.
This commit is contained in:
parent
079c3b02a8
commit
2db4259b35
30 changed files with 234 additions and 154 deletions
|
@ -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 }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue