1
Fork 0
Empowering everyone to build reliable and efficient software. Gabriel's commits. https://www.rust-lang.org/
Find a file
Tim Chevalier 1a6d029b07 Emit a better error message for unbound type parameters in nested functions
This code was causing a bounds check failure:

fn hd[U](&vec[U] v) -> U {
  fn hd1(&vec[U] w) -> U {
    ret w.(0);
  }
  ret hd1(v);
}

because in hd1, U was being treated as if it referred to a type
parameter of hd1, rather than referring to the lexically enclosing binding
for U that's part of hd.

I'm actually not sure whether this is a legit program or not. But I wanted
to get rid of the bounds check error, so I assumed that program shouldn't
compile and made it a proper error message.
2011-06-21 17:58:49 -07:00
doc Turn doc FIXMEs into comments 2011-06-21 06:17:54 -07:00
mk Setting rt optimization on OS X to -O0 when using clang, like we already do with gcc. Tail-call elimination was causing valgrind errors with stack switching. Closes #494. 2011-06-21 13:13:33 -07:00
src Emit a better error message for unbound type parameters in nested functions 2011-06-21 17:58:49 -07:00
.gitignore Ignore files generated by Doxygen. 2011-06-01 10:37:48 -07:00
AUTHORS.txt authors: Add Josh Matthews to AUTHORS 2011-06-08 09:09:50 -07:00
configure Move creation of stageN/lib directories to the configure script 2011-06-17 18:36:44 -07:00
LICENSE.txt Update copyrights for completeness. 2011-05-03 12:10:03 -07:00
Makefile.in Finish the transition to having the std library in stageN/lib. 2011-06-20 13:38:11 -04:00
README Update README to point to github, test email notification. 2010-06-23 21:11:10 -07:00

This is a compiler and suite of associated libraries and documentation for the
Rust programming language.

See LICENSE.txt for terms of copyright and redistribution.

See http://github.com/graydon/rust for current development page.