Brian Anderson
d1fc2b5995
Convert to new closure syntax
2012-07-01 19:19:32 -07:00
Brian Anderson
a3382b6f26
Eliminate usages of old sugared call syntax
2012-06-30 16:01:49 -07:00
Gareth Daniel Smith
0b653ab953
initial draft of fix for issue #2498 :
...
1. make /// ... and //! ... and /** ... */ and /*! ... */ into sugar for #[doc = ...] attributes.
2. add a script in etc/ to help converting doc-attributes to doc-comments
3. add some functions to core::str to help with (1)
2012-06-30 11:54:54 +01:00
Michael Sullivan
98e161f00e
Switch the compiler over to using ~[] notation instead of []/~. Closes #2759 .
2012-06-29 17:41:45 -07:00
Michael Sullivan
0a00b32bb3
Get rid of some spurious /~s in rustdoc. Oops.
2012-06-28 10:42:19 -07:00
Graydon Hoare
697f1e38d6
Change 'native' and 'crust' to 'extern'.
...
This comes with a terminology change. All linkage-symbols are 'extern'
now, including rust syms in other crates. Some extern ABIs are
merely "foreign". The term "native" is retired, not clear/useful.
What was "crust" is now "extern" applied to a _definition_. This
is a bit of an overloading, but should be unambiguous: it means
that the definition should be made available to some non-rust ABI.
2012-06-26 16:18:37 -07:00
Patrick Walton
999b567e2a
rustdoc: Work around some more metadata infelicities
2012-06-26 14:39:49 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Tim Chevalier
e9f19283b3
Remove resources from a few places I missed
2012-06-25 12:20:51 -07:00
Tim Chevalier
487cbf8e90
Remove resources
...
Also fixed shapes for classes with dtors, as well as handling
offsets for classes with dtors correctly in take glue.
Closes #2485
2012-06-24 15:09:57 -07:00
Graydon Hoare
312faf31df
Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.
2012-06-21 16:44:10 -07:00
Brian Anderson
4dcf84e4f4
Remove bind. Issue #2189
2012-06-20 17:27:28 -07:00
Paul Stansifer
1e36d216be
Add the interner to parse_sess.
2012-06-15 12:41:41 -07:00
Tim Chevalier
39d9c30a15
Remove code from parser that was awaiting snapshot
...
Remove old parser functions as well as support for old-style capture
clauses. Remove remaining old-style capture clauses.
2012-06-14 19:09:02 -07:00
Tim Chevalier
1509b091c4
Comments only: annotate FIXMEs in rustdoc
2012-06-14 14:30:17 -07:00
Brian Anderson
ce750a7dbc
Box AST idents
2012-06-13 11:30:45 -07:00
Michael Sullivan
6396e2c3c3
Make vecs implicitly copyable for all of our projects.
2012-06-04 19:53:30 -07:00
Michael Sullivan
6d9dd055d1
Get rid of warnings from instantiating typarams with non-implicitly copyable types.
2012-06-04 16:35:32 -07:00
Kevin Cantu
7dcbaedd32
Rename librustsyntax to libsyntax
...
Per issue #2418 .
2012-05-31 11:15:00 -07:00
Niko Matsakis
862976c267
avoid modifying variable we are alting over
2012-05-30 11:26:15 -07:00
Brian Anderson
736ff34e8a
rustc: Move filesearch into metadata mod
...
It's not that related to metadata, but metadata needs it and it will
probably be useful for doing dynamic loading.
2012-05-29 20:38:49 -07:00
Michael Sullivan
8668d06400
Get rid of many implicit copies as a preliminary to Issue #2448 .
2012-05-25 16:39:35 -07:00
Paul Stansifer
5b72e52e47
Access parse/attrs.rs with an impl.
2012-05-24 14:39:22 -07:00
Eric Holk
5f154770e2
Prevent capturing non-copyable things in closures.
2012-05-23 15:46:43 -07:00
Brian Anderson
4756556748
rustc: Move new_def_hash to ast_util
2012-05-23 00:43:02 -07:00
Eric Holk
0b2f2cabbe
Send is no longer a subkind of copy. This allows for sendable, but non-copyable resources. Closes #2420 .
2012-05-22 14:10:32 -07:00
Brian Anderson
9aa18c2852
rustc: Move ast_map to the syntax crate
2012-05-21 23:39:27 -07:00
Brian Anderson
df532e7f1b
rustc: Remove ast_map's session dependency
2012-05-21 23:22:06 -07:00
Niko Matsakis
34b42eeb65
change list so that it must be used in a purely boxed fashion
...
The old way was inconsistent---the head was unboxed but the
tail was boxed. This resulted in numerous needless copies and
also made the borrow check unhappy, because the head tended to be
stored in mutable memory.
2012-05-21 09:37:34 -07:00
Brian Anderson
1f52652a06
rustc: Eliminate some indirection to the syntax crate
2012-05-13 17:33:29 -07:00
Brian Anderson
fa6c18e014
rustc: Refactor driver to better understand string sources
2012-05-09 23:40:50 -07:00
Brian Anderson
d41af13334
rustc: Extract session::basic_options from rustdoc
2012-05-08 22:33:45 -07:00
Tim Chevalier
85fbfa25d7
Revert "Eliminate a copy in syntax::parse::new_parser_from_file"
...
This reverts commit 2bb3b63ec4
.
(I was confused.)
2012-04-30 11:52:07 -07:00
Tim Chevalier
2bb3b63ec4
Eliminate a copy in syntax::parse::new_parser_from_file
...
Fixing a FIXME turned out to be pretty involved. I added an io function
that returns a unique boxed string (for the contents of a file) rather than
a string, and went from there. Also made the src field of codemap a unique
boxed string. This doesn't seem to make that much difference in amount of
allocation according to valgrind (disappointingly), but I also had to introduce
a copy somewhere else pending a new snapshot, so maybe that's it.
2012-04-30 10:44:31 -07:00
Niko Matsakis
825fd1808e
lots of work to make iface/impls parameterized by regions
...
- paths can now take region parameters, replacing the dirty hack
I was doing before of abusing vstores. vstores are now a bit
of a hack though.
- fix various small bugs:
- we never checked that iface types were compatible when casting
to an iface with `as`
- we allowed nonsense like int<int>
- and more! (actually that may be it)
2012-04-25 19:26:56 -07:00
Tim Chevalier
f7641286b2
Allow classes to be cast to ifaces that are in the same crate
...
I had to xfail one existing test case (class-implements-int) because,
I think, of the same bug described in #2272 .
2012-04-23 21:15:03 -07:00
Tim Chevalier
1c39fda0ea
Rename option::get_or_default to get_default, for consistency
2012-04-23 20:52:50 -07:00
Marijn Haverbeke
9053f54498
Move map iface over to more for
-friendly iteration methods
2012-04-23 15:18:19 +02:00
Brian Anderson
628e80d525
syntax: Extract attribute parsing to its own mod
2012-04-19 21:58:45 -07:00
Niko Matsakis
3c995fb8f3
make nominal types optionally parameterized by a self region.
...
Issue #2201 .
2012-04-19 21:01:11 -07:00
Brian Anderson
9a8a04629e
syntax: Put the main parser interface in mod parse
2012-04-18 10:50:50 -07:00
Niko Matsakis
4c26d70a0a
new debug flag, new test
2012-04-17 12:02:36 -07:00
Brian Anderson
4f576275be
syntax: Cleanup attr module. Closes #1545
2012-04-15 01:43:38 -07:00
Graydon Hoare
8a7fd4a04f
Support general warnings and errors in lint pass via flags and attrs. Close #1543 .
2012-04-12 17:31:49 -07:00
Brian Anderson
599cbf7a6b
rustdoc: Use parallel map by default
2012-04-08 13:46:11 -07:00
Tim Chevalier
9d274ec5f2
Re-rename option functions
...
get_with_default (nee from_maybe) => get_default
with_option (nee maybe) => map_default
with_option_do (nee may) => iter
As per discussion of 21be1379d5
2012-04-06 12:20:13 -07:00
Marijn Haverbeke
c902eafa14
Convert old-style for loops to new-style
...
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.
(This hack will go away soon.)
Issue #1619
2012-04-06 20:38:23 +02:00
Brian Anderson
d13c0c77a2
Explicitly use version 0.2 of crates
2012-04-05 20:29:42 -07:00
Brian Anderson
bd97ee6520
rustdoc: Remove stray binary
2012-04-03 19:01:00 -07:00
Tim Chevalier
21be1379d5
Rename some core::option functions
...
from_maybe => get_with_default
maybe => with_option
may => with_option_do
I know these names are kind of ridiculous, but it's the best I could think of.
Feel free to bikeshed. Closes #2081
2012-04-02 16:12:49 -07:00
Brian Anderson
0e87039348
rustc: Remove the rustsyntax::attr wrapper in front
2012-03-29 14:42:31 -07:00
Graydon Hoare
b37d7e26fe
Update crate URLs to point to interesting things.
2012-03-28 13:52:47 -07:00
Graydon Hoare
6e6798c4e1
Bulk-edit mutable -> mut.
2012-03-26 18:35:18 -07:00
Marijn Haverbeke
87e097a853
Disallow ret inside of block functions
...
Also adds proper checking for cont/break being inside a loop.
Closes #1854
Issue #1619
2012-03-26 12:45:47 +02:00
Niko Matsakis
042c532a08
Implement new inference algorithm.
2012-03-23 21:47:28 -07:00
Brian Anderson
f3fe85dad7
Bump version numbers to 0.2
2012-03-22 15:25:02 -07:00
Graydon Hoare
b224bcf6e1
Add an LLVM-instruction-counting mode to trans.
...
Pipe to xdu to see a trans call graph of generated insns.
2012-03-22 13:44:20 -07:00
Niko Matsakis
dc07280b08
make --enforce-mut-vars always on, add mut annotations to remaining files
2012-03-22 09:58:19 -07:00
Josh Matthews
8142438938
Avoid mangling names differently in debug builds to work around a build error. Fix up file name and path debug information, and build one compilation unit for a crate instead of one per source file.
2012-03-21 18:56:36 -04:00
Brian Anderson
1695148b5d
rustdoc: Refactor reexport_pass
2012-03-20 14:54:40 -07:00
Brian Anderson
651aeea961
rustdoc: Document impl reexports
2012-03-20 14:54:40 -07:00
Brian Anderson
f3ed738399
rustdoc: Run the entire resolve pass
2012-03-20 14:54:40 -07:00
Marijn Haverbeke
7a34ac5890
Revert order of arguments to option::maybe and from_maybe
...
Closes #2019
2012-03-20 14:55:07 +01:00
Brian Anderson
4c4ac05f02
rustdoc: Print type params in fn sigs. Closes #2021
2012-03-18 21:41:57 -07:00
Brian Anderson
47d468f08c
core: Store reexporting result and either. Closes #1997
2012-03-16 15:14:37 -07:00
Brian Anderson
ddbd02aaf2
rustdoc: Allow elipses to appear in brief descriptions. Closes #2003
2012-03-16 14:50:30 -07:00
Brian Anderson
0b0ecc662b
rustdoc: Escape backslashes
2012-03-16 12:20:29 -07:00
Marijn Haverbeke
0e5da379dd
Turn on monomorphization by default
2012-03-15 08:59:29 +01:00
Brian Anderson
3864d6d845
std: Rename the hashmap constructors to conform to new standards
...
Instead of using the new_ prefix just name them after their type
2012-03-14 18:19:08 -07:00
Brian Anderson
b968c8e6cd
Name types after their modules instead of 't'
2012-03-13 15:14:17 -07:00
Brian Anderson
cd72b1f848
Overhaul constructor naming in libs
2012-03-13 11:07:22 -07:00
Graydon Hoare
6f5853f5a1
Libc/os/run/rand/io reorganization. Close #1373 . Close #1638 .
...
- Move io, run and rand to core.
- Remove incorrect ctypes module (use libc).
- Remove os-specific modules for os and fs.
- Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Brian Anderson
8f071bb841
rustdoc: Add indexes to native mods. Closes #1963
2012-03-11 16:36:20 -07:00
Tim Chevalier
eb9d0e89d1
wibble
2012-03-10 20:36:48 -08:00
Brian Anderson
91e5a1c8b3
core: Remove the nearly empty math module
...
This mod only had two functions, all of whose users have been changed
to use the uint module.
2012-03-10 17:43:19 -08:00
Brian Anderson
a5368fb6d8
rustdoc: Put native mods on their own pages. Closes #1959
2012-03-10 16:44:48 -08:00
Brian Anderson
474ad2e4de
rustdoc: Fix native mod breakage
2012-03-10 16:43:38 -08:00
Brian Anderson
4bbe33c8eb
rustdoc: Write page titles
2012-03-10 16:21:23 -08:00
Brian Anderson
78d539927a
rustdoc: Remove unused fn
2012-03-10 15:42:08 -08:00
Brian Anderson
d54d9b1cab
rustdoc: Fix generation of impl links. Closes #1953
2012-03-10 15:38:52 -08:00
Tim Chevalier
a0521971b1
Merge branch 'master' into floop-for-snapshot
2012-03-09 22:16:52 -08:00
Brian Anderson
e2dad03f44
rustdoc: Change the formatting for enum variants
2012-03-09 21:20:51 -08:00
Brian Anderson
f9755c666d
rustdoc: Simplify attribute parsing
2012-03-09 18:13:14 -08:00
Brian Anderson
effe4559d2
rustdoc: Accept the first sentence as the brief description
2012-03-09 18:13:14 -08:00
Brian Anderson
4fc5b822e2
rustdoc: Simplify the relation between the brief and long description
...
Brief is just used for indexes now
2012-03-09 18:13:14 -08:00
Brian Anderson
0905ad2bbe
rustdoc: Vastly simplify the document model
...
Don't attempt to impose any structure for documenting arguments, return
values, etc.
2012-03-09 17:24:56 -08:00
Brian Anderson
9f4c0d71e5
rustdoc: Update the demo module
2012-03-09 17:24:56 -08:00
Brian Anderson
e399263b5e
rustdoc: Write sections in markdown
2012-03-09 17:24:56 -08:00
Brian Anderson
0ad8265fee
rustdoc: Add the concept of 'sections'
2012-03-09 17:24:55 -08:00
Tim Chevalier
321fd80219
Add an infinite loop construct
...
Add a loop {} construct for infinite loops, and use it in test
cases. See #1906 for details.
2012-03-09 16:40:58 -08:00
Brian Anderson
256146bba4
rustdoc: Rename desc_pass to text_pass
2012-03-08 17:00:03 -08:00
Tim Chevalier
0c5fdc8745
Rename last to last_opt, last_unsafe to last
...
As per discussion on IRC. I am about to file an RFC for further
discussion about the more general issue of whether to enforce
invariants through types, typestate, or dynamic checks, but for now,
removing the misleading name "last_unsafe".
2012-03-08 15:25:56 -08:00
Brian Anderson
57596cbe53
rustdoc: Improve formatting of subsection headers
2012-03-08 15:05:13 -08:00
Brian Anderson
7d686d6372
rustdoc: Format return values consistently
2012-03-08 15:05:13 -08:00
Brian Anderson
6ad653bb31
rustdoc: Add some more demo docs
2012-03-08 15:05:13 -08:00
Brian Anderson
ac8b2c8354
rustdoc: Don't bother reporting the type of return values
2012-03-08 15:05:13 -08:00
Brian Anderson
5c28b2c1d1
rustdoc: Don't bother reporting the type of arguments
...
This is already displayed in the function signature. Simpler this way.
2012-03-08 15:05:13 -08:00
Tim Chevalier
ebc1d3e704
Rename last_total to last_unsafe
...
See Issue 1943 for any discussion (reopen it if necessary).
Closes #1943
2012-03-08 13:07:31 -08:00
Marijn Haverbeke
fd465f91a8
Drop collect_items pass, create decls on demand
...
This solves a problem with inlined functions that have inner functions.
2012-03-08 21:17:32 +01:00
Brian Anderson
bdec806848
rustdoc: Look for pandoc in ~/.cabal
2012-03-07 19:22:02 -08:00