summary refs log tree commit diff
path: root/src/compiletest
AgeCommit message (Collapse)AuthorLines
2014-01-06Register new snapshotsAlex Crichton-1/+0
2014-01-04etc: licenseck: don't hardcode a specific yearAdrien Tétar-6/+6
2013-12-25Test fixes and rebase conflictsAlex Crichton-0/+1
* vec::raw::to_ptr is gone * Pausible => Pausable * Removing @ * Calling the main task "<main>" * Removing unused imports * Removing unused mut * Bringing some libextra tests up to date * Allowing compiletest to work at stage0 * Fixing the bootstrap-from-c rmake tests * assert => rtassert in a few cases * printing to stderr instead of stdout in fail!()
2013-12-24std: Stop reexporting the contents of 'mod consts'Alex Crichton-2/+2
This prevents usage of the win32 utf-16 helper functions from outside of libstd. Closes #9053
2013-12-24Test fixes and rebase problemsAlex Crichton-2/+2
Note that this removes a number of run-pass tests which are exercising behavior of the old runtime. This functionality no longer exists and is thoroughly tested inside of libgreen and libnative. There isn't really the notion of "starting the runtime" any more. The major notion now is "bootstrapping the initial task".
2013-12-18Make Android tests fail if no device is availableBrian Anderson-110/+90
2013-12-14Fix #10754 - `std::run` functions fail after io_errorCadence Marseille-30/+52
The problem was that std::run::Process::new() was unwrap()ing the result of std::io::process::Process::new(), which returns None in the case where the io_error condition is raised to signal failure to start the process. Have std::run::Process::new() similarly return an Option<run::Process> to reflect the fact that a subprocess might have failed to start. Update utility functions run::process_status() and run::process_output() to return Option<ProcessExit> and Option<ProcessOutput>, respectively. Various parts of librustc and librustpkg needed to be updated to reflect these API changes. closes #10754
2013-12-11std::io: Add Buffer.lines(), change .bytes() apiklutzy-9/+2
- `Buffer.lines()` returns `LineIterator` which yields line using `.read_line()`. - `Reader.bytes()` now takes `&mut self` instead of `self`. - `Reader.read_until()` swallows `EndOfFile`. This also affects `.read_line()`.
2013-12-10compiletest: Remove uses of `Cell`.Patrick Walton-8/+6
2013-12-08Remove dead codesKiet Tran-16/+5
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-10/+10
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-12-04std::str: s/from_utf8_slice/from_utf8/, to make the basic case shorter.Huon Wilson-1/+1
2013-12-04std::str: remove from_utf8.Huon Wilson-7/+5
This function had type &[u8] -> ~str, i.e. it allocates a string internally, even though the non-allocating version that take &[u8] -> &str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-10/+10
2013-11-28Register new snapshotsAlex Crichton-1/+1
2013-11-26librustc: Make `||` lambdas not infer to `proc`sPatrick Walton-2/+4
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-12/+12
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-26libsyntax: Remove the old-style borrowed closure type syntax from thePatrick Walton-6/+9
language.
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-10/+10
2013-11-11Move std::rt::io to std::ioAlex Crichton-20/+20
2013-11-12Implemented a ProcessExit enum and helper methods to std::rt::io::process ↵Matthew Iselin-27/+34
for getting process termination status, or the signal that terminated a process. A test has been added to rtio-processes.rs to ensure signal termination is picked up correctly.
2013-11-08std::ascii: Provide a copyless [Ascii] -> str method.Huon Wilson-3/+1
This renames to_str_ascii to as_str_ascii and makes it non-copying, which is possible now that strings no longer have a hidden extra byte/null terminator. Fixes #6120.
2013-11-06Add make check support(arm-linux-androideabi debuginfo)sh8281.kim-22/+148
2013-11-04Move io::file to io::fs and fns out of FileAlex Crichton-32/+7
This renames the `file` module to `fs` because that more accurately describes its current purpose (manipulating the filesystem, not just files). Additionally, this adds an UnstableFileStat structure as a nested structure of FileStat to signify that the fields should not be depended on. The structure is currently flagged with #[unstable], but it's unlikely that it has much meaning. Closes #10241
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-8/+9
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-20/+16
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-10-30auto merge of #9613 : jld/rust/enum-discrim-size.r0, r=alexcrichtonbors-2/+25
Allows an enum with a discriminant to use any of the primitive integer types to store it. By default the smallest usable type is chosen, but this can be overridden with an attribute: `#[repr(int)]` etc., or `#[repr(C)]` to match the target's C ABI for the equivalent C enum. Also adds a lint pass for using non-FFI safe enums in extern declarations, checks that specified discriminants can be stored in the specified type if any, and fixes assorted code that was assuming int.
2013-10-29librustc: Implement the `proc` type as sugar for `~once fn` and `proc`Patrick Walton-3/+3
notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil.
2013-10-29Unbreak the debuginfo tests.Jed Davis-2/+25
The variant used in debug-info/method-on-enum.rs had its layout changed by the smaller discriminant, so that the `u32` no longer overlaps both of the `u16`s, and thus the debugger is printing partially uninitialized data when it prints the wrong variant. Thus, the test runner is modified to accept wildcards (using a string that should be unlikely to occur literally), to allow for this.
2013-10-28Remove the extension traits for Readers/WritersAlex Crichton-1/+1
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits.
2013-10-24Remove even more of std::ioAlex Crichton-29/+26
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-22/+22
Who doesn't like a massive renaming?
2013-10-16path2: Update for latest masterKevin Ballard-3/+3
Also fix some issues that crept into earlier commits during the conflict resoution for the rebase.
2013-10-16path2: Remove some API functionsKevin Ballard-3/+11
Delete the following API functions: - set_dirname() - with_dirname() - set_filestem() - with_filestem() - add_extension() - file_path() Also change pop() to return a boolean instead of an owned copy of the old filename.
2013-10-16path2: Update based on more review feedbackKevin Ballard-3/+3
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
2013-10-15path2: Remove .with_display_str and friendsKevin Ballard-1/+1
Rewrite these methods as methods on Display and FilenameDisplay. This turns do path.with_display_str |s| { ... } into do path.display().with_str |s| { ... }
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-23/+23
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-73/+101
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-10-10Remove some users of io::file_readerAlex Crichton-12/+20
2013-10-10Migrate users of io::fd_t to io::native::file::fd_tAlex Crichton-0/+1
2013-10-09Implement io::native::processAlex Crichton-1/+1
2013-10-09option: rewrite the API to use compositionDaniel Micay-5/+5
2013-09-30rpass: Remove usage of fmt!Alex Crichton-1/+1
2013-09-30compiletest: Remove usage of fmt!Alex Crichton-87/+87
2013-09-19Turned extra::getopts functions into methodsMarvin Löbel-27/+25
Some minor api and doc adjustments
2013-09-18std: Remove {float,f64,f32}::from_str in favor of from_strblake2-ppc-2/+1
Like issue #9209, remove float::{from_str, from_str_radix} in favor of the two corresponding traits. The same for modules f64 and f32. New usage is from_str::<float>("1.2e34")
2013-09-12std: rename Option::unwrap_or_default() to unwrap_or()Erick Tryzelaar-1/+1
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-2/+2
2013-09-04Update clients of path.rs to use new API.Felix S. Klock II-3/+4
In most cases this involved removing a ~str allocations or clones (yay), or coercing a ~str to a slice. In a few places, I had to bind an intermediate Path (e.g. path.pop() return values), so that it would live long enough to support the borrowed &str. And in a few places, where the code was actively using the property that the old API returned ~str's, I had to put in to_owned() or clone(); but in those cases, we're trading an allocation within the path.rs code for one in the client code, so they neutralize each other.
2013-09-03auto merge of #8950 : sanxiyn/rust/cross-xfail, r=brsonbors-4/+23