Get back to zero warnings
This commit is contained in:
parent
0808bcbc87
commit
f71d3707c6
@ -331,7 +331,7 @@ impl ast::Pattern {
|
||||
}),
|
||||
ast::Pattern::TupleStruct(name, subpatterns) => {
|
||||
let symbol = symbol_table.lookup_symbol(&name.id).unwrap();
|
||||
if let SymbolSpec::DataConstructor { index: tag, type_id, arity } = symbol.spec() {
|
||||
if let SymbolSpec::DataConstructor { index: tag, type_id: _, arity: _ } = symbol.spec() {
|
||||
let items: Vec<_> = subpatterns.iter().map(|pat| pat.reduce(symbol_table)).collect();
|
||||
let items: Result<Vec<Pattern>, PatternError> = items.into_iter().collect();
|
||||
let items = items?;
|
||||
@ -346,7 +346,7 @@ impl ast::Pattern {
|
||||
ast::Pattern::VarOrName(name) => {
|
||||
let symbol = symbol_table.lookup_symbol(&name.id).unwrap();
|
||||
match symbol.spec() {
|
||||
SymbolSpec::DataConstructor { index: tag, type_id, arity } => {
|
||||
SymbolSpec::DataConstructor { index: tag, type_id: _, arity: _ } => {
|
||||
Pattern::Tuple {
|
||||
tag: Some(tag as u32),
|
||||
subpatterns: vec![]
|
||||
@ -359,7 +359,7 @@ impl ast::Pattern {
|
||||
spec => return Err(format!("Unexpected VarOrName symbol: {:?}", spec).into())
|
||||
}
|
||||
},
|
||||
ast::Pattern::Record(name, /*Vec<(Rc<String>, Pattern)>*/ _) => {
|
||||
ast::Pattern::Record(_name, _members/*Vec<(Rc<String>, Pattern)>*/) => {
|
||||
unimplemented!()
|
||||
},
|
||||
})
|
||||
|
@ -134,16 +134,7 @@ pub enum Pattern {
|
||||
Binding(DefId)
|
||||
}
|
||||
|
||||
/*
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Subpattern {
|
||||
pub tag: Option<usize>,
|
||||
pub subpatterns: Vec<Option<Subpattern>>,
|
||||
//pub bound_vars: BoundVars,
|
||||
pub guard: Option<Expression>,
|
||||
}
|
||||
*/
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
pub struct PatternError {
|
||||
msg: String,
|
||||
|
@ -298,7 +298,7 @@ impl<'a> ASTVisitor for ScopeResolver<'a> {
|
||||
self.lookup_name_in_scope(name);
|
||||
}
|
||||
//TODO this isn't really the right syntax for a VarOrName
|
||||
VarOrName(ref name @ QualifiedName { id, components }) => {
|
||||
VarOrName(QualifiedName { id, components }) => {
|
||||
if components.len() == 1 {
|
||||
//TODO need a better way to construct a FQSN from a QualifiedName
|
||||
let local_name: Rc<String> = components[0].clone();
|
||||
|
Loading…
Reference in New Issue
Block a user