about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2013-03-13librustc: Allow path-qualified constants in patternsPatrick Walton-3/+37
2013-03-13librustc: Don't require the "static" keyword to define a static methodPatrick Walton-10/+10
2013-03-13test: Some test fixesPatrick Walton-19/+19
2013-03-13librustc: Remove implicit self from the language, except for old-style drop ↵Patrick Walton-393/+337
blocks.
2013-03-13librustc: Remove "base types" from the language.Patrick Walton-148/+141
2013-03-13librustc: Remove overloaded operator autoderef.Patrick Walton-29/+63
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-537/+675
2013-03-13librustc: Separate out trait storage from evec/estr storagePatrick Walton-162/+293
2013-03-13auto merge of #5336 : ILyoan/rust/remove_unused, r=sanxiynbors-12/+2
Remove unused imports to get rid of warnings.
2013-03-14Remove unused import in librustcILyoan-1/+0
2013-03-14Remove unused imports in stdILyoan-1/+0
2013-03-14Remove unused import in coreILyoan-9/+2
2013-03-14Remove unused variableILyoan-1/+0
2013-03-13auto merge of #5340 : brson/rust/column, r=brsonbors-1/+1
#5274
2013-03-13auto merge of #5307 : nikomatsakis/rust/remove-by-val, r=nikomatsakisbors-303/+579
This is done in two steps: First, we make foreign functions not consider modes at all. This is because previously ++ mode was the only way to pass structs to foreign functions and so forth. We also add a lint mode warning if you use `&&` mode in a foreign function, since the semantics of that change (it used to pass a pointer to the C function, now it doesn't). Then, we remove by value and make it equivalent to `+` mode. At the same time, we stop parsing `-` mode and convert all uses of it to `+` mode (it was already being parsed to `+` mode anyhow). This obsoletes pull request #5298. r? @brson
2013-03-13Remove `++` mode from the compiler (it is parsed as `+` mode)Niko Matsakis-144/+89
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-13Revamp foreign code not to consider the Rust modes. This requiresNiko Matsakis-161/+492
adjusting a few foreign functions that were declared with by-ref mode. This also allows us to remove by-val mode in the near future. With copy mode, though, we have to be careful because Rust will implicitly pass somethings by pointer but this may not be the C ABI rules. For example, rust will pass a struct Foo as a Foo*. So I added some code into the adapters to fix this (though the C ABI rules may put the pointer back, oh well). This patch also includes a lint mode for the use of by-ref mode in foreign functions as the semantics of this have changed.
2013-03-13auto merge of #5339 : catamorphism/rust/less-copy, r=catamorphismbors-6/+5
2013-03-13auto merge of #5337 : yichoi/rust/pull-0312, r=sanxiynbors-0/+0
libuv submodule regression patch for ARM android compilation
2013-03-13auto merge of #5319 : brson/rust/debuginfo, r=brsonbors-102/+216
Continuing #5140 For the sake of getting this merged I've disabled debuginfo tests on mac (where running gdb needs root). Please feel free to follow up with further improvements.
2013-03-13auto merge of #5293 : brson/rust/logging, r=brsonbors-930/+880
r? @graydon This removes `log` from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to `__log` and hides it behind macros. After this the only way to log is with `debug!`, `info!`, etc. I figure that if there is demand for `log!` we can add it back later. I am not sure that we ever agreed on this course of action, though I *think* there is consensus that `log` shouldn't be a statement.
2013-03-12Work around linkage bug cross-compiling from x86_64-apple-darwin to ↵Brian Anderson-36/+47
i686-apple-darwin The correct opendir/readdir to use appear to be the 64-bit versions called opendir$INODE64, etc. but for some reason I can't get them to link properly on i686. Putting them in librustrt and making gcc figure it out works. This mystery will have to wait for another day.
2013-03-12libcore: Attempt to put out burning tree on Mac by using the old symbol on ↵Patrick Walton-5/+20
32 bit. rs=bustage
2013-03-12core: Turn off rtdebug loggingBrian Anderson-2/+3
2013-03-12auto merge of #5332 : jdm/rust/transitivelink, r=graydonbors-1/+5
The original change bit Servo because rust-harfbuzz includes libharfbuzz.a in its link_args. This works fine in the rust-harfbuzz subdirectory where the static library resides, but when this is propagated to servo_gfx, the lirbrary can no longer be found since it's a relative path.
2013-03-12Increase tidy column limit to 100Brian Anderson-1/+1
2013-03-12auto merge of #5320 : apasel422/rust/metaderive, r=graydonbors-0/+134
This is the first in a series of patches I'm working on to clean up the code related to `deriving`. This patch allows ``` #[deriving_eq] #[deriving_iter_bytes] #[deriving_clone] struct Foo { bar: uint } ``` to be replaced with: ``` #[deriving(Eq, IterBytes, Clone)] struct Foo { bar: uint } ``` It leaves the old attributes alone for the time being. Eventually I'd like to incorporate the new closest-match-suggestion infrastructure for mistyped trait names, and also pass the sub-attributes to the deriving code, so that the following will be possible: ``` #[deriving(TotalOrd(qux, bar))] struct Foo { bar: uint, baz: char, qux: int } ``` This says to derive an `impl` in which the objects' `qux` fields are compared first, followed by `bar`, while `baz` is ignored in the comparison. If no fields are specified explicitly, all fields will be compared in the order they're defined in the `struct`. This might also be useful for `Eq`. Coming soon.
2013-03-12rustc: One Less Bad CopyTim Chevalier-6/+5
2013-03-12syntax: implement #[deriving] meta-attributeAndrew Paseltiner-0/+134
2013-03-12auto merge of #5329 : wanderview/rust/std-getopts-opts_present, r=graydonbors-4/+5
Currently the opts_present() function only checks to see if the option is configured in the match, but doesn't actually check to see if the option value has been set. This means that opt_present('h') may return false while opts_present([~'h']) returns true. Add a test case to catch this condition and fix opts_present() to check the value before returning true. Note, there is another API difference between these two functions that this does not address. Currently if you pass a non-configured option to opt_present() the program will fail!(), but opts_present() simply returns false. If it is acceptable to standardize on the fail!() then opts_present() should probably be implemented in terms of the opt_present() function.
2013-03-12auto merge of #5317 : luqmana/rust/inline-asm, r=graydonbors-11/+269
```Rust #[cfg(target_os = "macos")] fn helloworld() { unsafe { asm!(".pushsection __RODATA, __rodata msg: .asciz \"Hello World!\" .popsection movq msg@GOTPCREL(%rip), %rdi call _puts"); } } #[cfg(target_os = "linux")] fn helloworld() { unsafe { asm!(".pushsection .rodata msg: .asciz \"Hello World!\" .popsection movq msg@GOTPCREL(%rip), %rdi call puts"); } } fn main() { helloworld(); } ``` ``` % rustc foo.rs % ./foo Hello World! ```
2013-03-12regression patch libuv submoduleYoung-il Choi-0/+0
2013-03-12auto merge of #5335 : larryv/rust/local_stage0-libsyntax, r=luqmanabors-0/+1
The `local_stage0.sh` script was not updated after commit 7dcbaed renamed librustsyntax to libsyntax. Currently, `./configure --enable-local-rust --local-rust-root=FOO && make` will fail due to the missing libsyntax; this change corrects this.
2013-03-12auto merge of #5333 : brson/rust/context, r=brsonbors-31/+63
ARM definitely compiles
2013-03-12Add alignstack option for inline asm.Luqman Aden-10/+19
2013-03-12Keep everything tidy.Luqman Aden-11/+10
2013-03-12Parse operands properly and add a way to indicate volatile asm.Luqman Aden-18/+145
2013-03-12Stop parsing __asm__.Luqman Aden-10/+1
2013-03-12Create asm! syntax extension.Luqman Aden-1/+58
2013-03-12Require unsafe block for inline assembly.Luqman Aden-1/+4
2013-03-12Wrap llvm::InlineAsm::AsmDialectLuqman Aden-11/+19
2013-03-12Parse inline assembly.Luqman Aden-8/+72
2013-03-12auto merge of #5328 : bstrie/rust/optadd, r=graydonbors-0/+40
This will allow you to use the `+` operator to add together any two Options, assuming that the contents of each Option likewise implement `+`. So Some(4) + Some(1) == Some(5), and adding with None leaves the other value unchanged. This might be monoidic? I don't know what that word means!
2013-03-12Copy libsyntax from local Rust to stage0.Lawrence Velázquez-0/+1
The local_stage0 script was not updated after commit 7dcbaed renamed librustsyntax to libsyntax, so builds using local Rust fail due to missing libsyntax.
2013-03-11core: Add context switching for ARM and MIPSBrian Anderson-31/+63
ARM definitely compiles
2013-03-11Remove the log keyword (by renaming it to __log)Brian Anderson-24/+10
We can't quite remove logging from the language, but this hides the keyword.
2013-03-11core: Remove logging constantsBrian Anderson-24/+16
2013-03-11Remove uses of logBrian Anderson-890/+862
2013-03-11auto merge of #5310 : thestinger/rust/treeset, r=graydonbors-113/+94
2013-03-12Avoid propagating link_arg values that are unlikely to be resolveable under ↵Josh Matthews-1/+5
arbitrary directories.