summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2014-01-18auto merge of #11607 : alexcrichton/rust/issue-9957, r=cmrbors-1/+1
For `use` statements, this means disallowing qualifiers when in functions and disallowing `priv` outside of functions. For `extern mod` statements, this means disallowing everything everywhere. It may have been envisioned for `pub extern mod foo` to be a thing, but it currently doesn't do anything (resolve doesn't pick it up), so better to err on the side of forwards-compatibility and forbid it entirely for now. Closes #9957
2014-01-18Forbid unnecessary visibility on view itemsAlex Crichton-1/+1
For `use` statements, this means disallowing qualifiers when in functions and disallowing `priv` outside of functions. For `extern mod` statements, this means disallowing everything everywhere. It may have been envisioned for `pub extern mod foo` to be a thing, but it currently doesn't do anything (resolve doesn't pick it up), so better to err on the side of forwards-compatibility and forbid it entirely for now. Closes #9957
2014-01-17Actually force a / in the path for ext cratesSteven Fackler-2/+2
If the library is in the working directory, its path won't have a "/" which will cause dlopen to search /usr/lib etc. It turns out that Path auto-normalizes during joins so Path::new(".").join(path) is actually a no-op.
2014-01-17auto merge of #11585 : nikomatsakis/rust/issue-3511-rvalue-lifetimes, r=pcwaltonbors-22/+23
Major changes: - Define temporary scopes in a syntax-based way that basically defaults to the innermost statement or conditional block, except for in a `let` initializer, where we default to the innermost block. Rules are documented in the code, but not in the manual (yet). See new test run-pass/cleanup-value-scopes.rs for examples. - Refactors Datum to better define cleanup roles. - Refactor cleanup scopes to not be tied to basic blocks, permitting us to have a very large number of scopes (one per AST node). - Introduce nascent documentation in trans/doc.rs covering datums and cleanup in a more comprehensive way. r? @pcwalton
2014-01-18syntax::ext: replace span_fatal with span_err in many places.Huon Wilson-84/+197
This means that compilation continues for longer, and so we can see more errors per compile. This is mildly more user-friendly because it stops users having to run rustc n times to see n macro errors: just run it once to see all of them.
2014-01-17Change expansion of `for` loop to use a `match` statementNiko Matsakis-18/+12
so that the "innermost enclosing statement" used for rvalue temporaries matches up with user expectations
2014-01-16Load macros from external modulesSteven Fackler-75/+216
2014-01-15Issue #3511 - Rationalize temporary lifetimes.Niko Matsakis-4/+11
Major changes: - Define temporary scopes in a syntax-based way that basically defaults to the innermost statement or conditional block, except for in a `let` initializer, where we default to the innermost block. Rules are documented in the code, but not in the manual (yet). See new test run-pass/cleanup-value-scopes.rs for examples. - Refactors Datum to better define cleanup roles. - Refactor cleanup scopes to not be tied to basic blocks, permitting us to have a very large number of scopes (one per AST node). - Introduce nascent documentation in trans/doc.rs covering datums and cleanup in a more comprehensive way.
2014-01-14auto merge of #11485 : eddyb/rust/sweep-old-rust, r=nikomatsakisbors-1/+1
2014-01-13librustc: Remove `@` pointer patterns from the languagePatrick Walton-69/+69
2014-01-12Removed remnants of `@mut` and `~mut` from comments and the type system.Eduard Burtescu-1/+1
2014-01-11auto merge of #11463 : brson/rust/envcaps, r=huonwbors-6/+6
Death to caps.
2014-01-10syntax: Fix capitalization in macro_parser errorsBrian Anderson-5/+5
2014-01-10rustc: Fix formatting of env! error messageBrian Anderson-1/+1
Death to caps.
2014-01-11Remove re-exports of std::io::stdio::{print, println} in the prelude.Brendan Zabarauskas-5/+5
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-600/+561
2014-01-09Remove ApproxEq and assert_approx_eq!Brendan Zabarauskas-37/+0
This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases.
2014-01-08auto merge of #11401 : michaelwoerister/rust/issue11322, r=alexcrichtonbors-13/+6
`expand_include_str()` in libsyntax seems to have corrupted the CodeMap by always setting the BytePos of any included files to zero. It now uses `CodeMap::new_filemap()` which should set everything properly. This should fix issue #11322 but I don't want to close it before I have confirmation from the reporters that the problem is indeed fixed.
2014-01-08auto merge of #11370 : alexcrichton/rust/issue-10465, r=pwaltonbors-1/+1
Turned out to be a 2-line fix, but the compiler fallout was huge.
2014-01-08Fix CodeMap issue in expand_include_str()Michael Woerister-13/+6
2014-01-07Fixup the rest of the tests in the compilerAlex Crichton-0/+1
2014-01-07Fix remaining cases of leaking importsAlex Crichton-1/+0
2014-01-07'borrowed pointer' -> 'reference'Brian Anderson-1/+1
2014-01-06auto merge of #11332 : sfackler/rust/de-at-se, r=huonwbors-61/+60
This is necessary for #11151 to make sure dtors run before the libraries are unloaded.
2014-01-06Disowned the Visitor.Eduard Burtescu-1/+1
2014-01-05Use ~-objects instead of @-objects for syntax extsSteven Fackler-61/+60
This is necessary for #11151 to make sure dtors run before the libraries are unloaded.
2014-01-04etc: licenseck: don't hardcode a specific yearAdrien Tétar-2/+2
2014-01-03libsyntax: Fix tests.Patrick Walton-9/+10
2014-01-03librustc: Remove `@mut` support from the parserPatrick Walton-9/+10
2014-01-03libsyntax: Remove unused `MultiRenamer`Patrick Walton-17/+3
2014-01-03libsyntax: De-`@mut` `ps::boxes`Patrick Walton-2/+3
2014-01-03libsyntax: De-`@mut` `CodeMap::files`Patrick Walton-1/+2
2014-01-03libsyntax: De-`@mut` `FileMap::multibyte_chars`Patrick Walton-1/+1
2014-01-03libsyntax: De-`@mut` `FileMap::lines`Patrick Walton-1/+2
2014-01-03libsyntax: Correctly de-`@mut` the pretty printer writerPatrick Walton-1/+1
2014-01-03libsyntax: De-`@mut` `SCTable::table`Patrick Walton-2/+6
2014-01-03libsyntax: De-`@mut` `TtFrame`Patrick Walton-7/+7
2014-01-03libsyntax: De-`@mut` `TtFrame::idx`Patrick Walton-14/+14
2014-01-03librustc: De-`@mut` the span handlerPatrick Walton-3/+3
2014-01-03libsyntax: De-`@mut` `StringReader`, `TtReader`, and `reader`Patrick Walton-28/+19
2014-01-03libsyntax: De-`@mut` `TtReader::stack`Patrick Walton-24/+24
2014-01-03libsyntax: De-`@mut` `TtReader::cur_span`Patrick Walton-10/+11
2014-01-03libsyntax: De-`@mut` `TtReader::cur_tok`Patrick Walton-8/+9
2014-01-03libsyntax: De-`@mut` `TtReader::repeat_len`Patrick Walton-5/+8
2014-01-03libsyntax: De-`@mut` `TtReader::repeat_idx`Patrick Walton-17/+29
2014-01-03libsyntax: De-`@mut` `TtReader::interpolations`Patrick Walton-4/+9
2014-01-03librustc: De-`@mut` the parse sessionPatrick Walton-14/+13
2014-01-03auto merge of #11149 : alexcrichton/rust/remove-either, r=brsonbors-24/+27
Had to change some stuff in typeck to bootstrap (getting methods in fmt off of Either), but other than that not so painful. Closes #9157
2014-01-03Remove std::eitherAlex Crichton-24/+27
2014-01-03auto merge of #11228 : sfackler/rust/syntaxenv, r=pcwaltonbors-247/+129
I'd really like to be able to do something like ```rust struct MapChain<'next, K, V> { info: BlockInfo, map: HashMap<K, V>, next: Option<&'next mut MapChain<'next, K, V> } ``` but I can't get the lifetimes to work out.