about summary refs log tree commit diff
path: root/src/compiletest/errors.rs
AgeCommit message (Collapse)AuthorLines
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-1/+1
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-1/+1
2014-12-24Rename to_ascii_{lower,upper} to to_ascii_{lower,upper}case, per #14401Simon Sapin-1/+1
[breaking-change]
2014-12-14Modify `regex::Captures::{at,name}` to return `Option`Eric Kidd-4/+4
Closes #14602. As discussed in that issue, the existing `at` and `name` functions represent two different results with the empty string: 1. Matched the empty string. 2. Did not match anything. Consider the following example. This regex has two named matched groups, `key` and `value`. `value` is optional: ```rust // Matches "foo", "foo;v=bar" and "foo;v=". regex!(r"(?P<key>[a-z]+)(;v=(?P<value>[a-z]*))?"); ``` We can access `value` using `caps.name("value")`, but there's no way for us to distinguish between the `"foo"` and `"foo;v="` cases. Early this year, @BurntSushi recommended modifying the existing `at` and `name` functions to return `Option`, instead of adding new functions to the API. This is a [breaking-change], but the fix is easy: - `refs.at(1)` becomes `refs.at(1).unwrap_or("")`. - `refs.name(name)` becomes `refs.name(name).unwrap_or("")`.
2014-11-24compiletest: extend syntax with support for choosing same line as previous line.Felix S. Klock II-9/+56
2014-11-21libs: stabilize ascii moduleAaron Turon-1/+2
This is an initial API stabilization pass for `std::ascii`. Aside from some renaming to match conversion conventions, and deprecations in favor of using iterators directly, almost nothing is changed here. However, the static case conversion tables that were previously public are now private. The stabilization of the (rather large!) set of extension traits is left to a follow-up pass, because we hope to land some more general machinery that will provide the same functionality without custom traits. [breaking-change]
2014-10-15Renamed AsciiStr::to_lower and AsciiStr::to_upper=-1/+1
Now AsciiStr::to_lowercase and AsciiStr::to_uppercase to match Ascii trait. [breaking-change]
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-1/+1
[breaking-change]
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-1/+1
2014-05-27std: Rename strbuf operations to stringRicho Healey-2/+2
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-2/+2
[breaking-change]
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-1/+1
[breaking-change]
2014-05-20compiletest: Refactor compile-fail to regex.Kevin Butler-54/+22
2014-05-16compiletest: Remove all uses of `~str` from `compiletest`Patrick Walton-16/+26
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-1/+1
2014-03-31compiletest: Switch field privacy where necessaryAlex Crichton-1/+5
2014-03-22Remove outdated and unnecessary std::vec_ng::Vec imports.Huon Wilson-1/+0
(And fix some tests.)
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-6/+7
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-12Update io iterators to produce IoResultsPalmer Cox-1/+1
Most IO related functions return an IoResult so that the caller can handle failure in whatever way is appropriate. However, the `lines`, `bytes`, and `chars` iterators all supress errors. This means that code that needs to handle errors can't use any of these iterators. All three of these iterators were updated to produce IoResults. Fixes #12368
2014-01-17Tweak the interface of std::ioAlex Crichton-2/+1
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
2013-12-11std::io: Add Buffer.lines(), change .bytes() apiklutzy-4/+1
- `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-11-11Move std::rt::io to std::ioAlex Crichton-2/+2
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-03Fill out the remaining functionality in io::fileAlex Crichton-2/+2
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-4/+4
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-22Drop the '2' suffix from logging macrosAlex Crichton-1/+1
Who doesn't like a massive renaming?
2013-10-10Remove some users of io::file_readerAlex Crichton-5/+9
2013-10-10Migrate users of io::fd_t to io::native::file::fd_tAlex Crichton-0/+1
2013-09-30compiletest: Remove usage of fmt!Alex Crichton-1/+1
2013-07-17test: Fix tests.Patrick Walton-1/+1
2013-07-04Bring compiletest/rustpkg/driver up to date on std vs coreAlex Crichton-3/+1
2013-06-28librustc: Remove the broken overloaded assign-ops from the language.Patrick Walton-1/+1
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
2013-06-11fix tests, remove some warningsHuon Wilson-1/+0
2013-06-10std: replace str::find_str* with a methodHuon Wilson-1/+1
2013-06-10std: remove str::{len, slice, is_empty} in favour of methods.Huon Wilson-4/+4
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+3
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-04-27only use #[no_core] in libcoreDaniel Micay-6/+0
2013-04-24Fixed typo... And a billion other things.Marvin Löbel-3/+4
2013-04-24Removed ascii functions from other modulesMarvin Löbel-1/+4
Replaced str::to_lowercase and str::to_uppercase
2013-04-14test: remove unnecessary unsafe blocks/functionsAlex Crichton-27/+25
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-2/+2
slice_unique
2013-03-21renamed str::view -> slice_DBG_BRWDMarvin Löbel-2/+2
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
2013-03-04Remove unused imports throughout src/Alex Crichton-2/+0
2013-03-02librustc: Forbid chained imports and fix the logic for one-level renaming ↵Patrick Walton-3/+4
imports
2013-01-30librustdoc: De-export compiletest, combine-tests, libcargo, libfuzzer, and ↵Patrick Walton-5/+2
librustdoc. rs=deexporting
2013-01-28compiletest: Allow legacy recordsTim Chevalier-5/+6
But also remove most uses of structural records.
2013-01-23libsyntax: Remove `fn() unsafe { ... }`. r=graydonPatrick Walton-25/+27
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-0/+2
module scope. r=tjc
2013-01-08Revert "librustc: Make unqualified identifier searches terminate at the ↵Patrick Walton-2/+0
nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.