Store item paths in ast_map, get rid of trans::local_ctxt
The direct motivation for this was that the monomorphizer needs to be able to generate sane symbols for random items. The typechecker can probably also use this in the future to provide more useful error messages.
This commit is contained in:
parent
c1b075d042
commit
43ce38375d
18 changed files with 383 additions and 400 deletions
|
|
@ -89,12 +89,10 @@ fn local_rhs_span(l: @ast::local, def: span) -> span {
|
|||
alt l.node.init { some(i) { ret i.expr.span; } _ { ret def; } }
|
||||
}
|
||||
|
||||
fn is_main_name(path: [ast::ident]) -> bool {
|
||||
str::eq(option::get(vec::last(path)), "main")
|
||||
fn is_main_name(path: middle::ast_map::path) -> bool {
|
||||
option::get(vec::last(path)) == middle::ast_map::path_name("main")
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Local Variables:
|
||||
// mode: rust
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue