librustc: Disallow "mut" from distributing over bindings.

This is the backwards-incompatible part of per-binding-site "mut".
This commit is contained in:
Patrick Walton
2013-06-06 18:54:14 -07:00
committed by Corey Richardson
parent 1c0aa78481
commit f9b54541ee
32 changed files with 190 additions and 50 deletions

View File

@@ -619,6 +619,15 @@ pub enum Privacy {
Public
}
/// Returns true if the given pattern consists solely of an identifier
/// and false otherwise.
pub fn pat_is_ident(pat: @ast::pat) -> bool {
match pat.node {
ast::pat_ident(*) => true,
_ => false,
}
}
// HYGIENE FUNCTIONS
/// Construct an identifier with the given name and an empty context: