about summary refs log tree commit diff
path: root/src/libterm/terminfo
AgeCommit message (Collapse)AuthorLines
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+5
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-17Fix fallout from coercion removalNick Cameron-29/+29
2014-11-01Remove unnecessary allocationsJorge Aparicio-1/+1
2014-10-31DSTify HashJorge Aparicio-10/+10
- The signature of the `*_equiv` methods of `HashMap` and similar structures have changed, and now require one less level of indirection. Change your code from: ``` hashmap.find_equiv(&"Hello"); hashmap.find_equiv(&&[0u8, 1, 2]); ``` to: ``` hashmap.find_equiv("Hello"); hashmap.find_equiv(&[0u8, 1, 2]); ``` - The generic parameter `T` of the `Hasher::hash<T>` method have become `Sized?`. Downstream code must add `Sized?` to that method in their implementations. For example: ``` impl Hasher<FnvState> for FnvHasher { fn hash<T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ } } ``` must be changed to: ``` impl Hasher<FnvState> for FnvHasher { fn hash<Sized? T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ } // ^^^^^^ } ``` [breaking-change]
2014-10-30rollup merge of #18398 : aturon/lint-conventions-2Alex Crichton-2/+2
Conflicts: src/libcollections/slice.rs src/libcore/failure.rs src/libsyntax/parse/token.rs src/test/debuginfo/basic-types-mut-globals.rs src/test/debuginfo/simple-struct.rs src/test/debuginfo/trait-pointers.rs
2014-10-30changes to libsNick Cameron-41/+50
2014-10-29Rename fail! to panic!Steve Klabnik-1/+1
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-28Update code with new lint namesAaron Turon-2/+2
2014-10-16auto merge of #17947 : lukemetz/rust/master, r=aturonbors-1/+1
AsciiStr::to_lower is now AsciiStr::to_lowercase and AsciiStr::to_upper is AsciiStr::to_uppercase to match Ascii trait. Part of issue #17790. This is my first pull request so let me know if anything is incorrect. Thanks! [breaking-changes]
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-10-13Clean up rustc warnings.NODA, Kai-22/+21
compiletest: compact "linux" "macos" etc.as "unix". liballoc: remove a superfluous "use". libcollections: remove invocations of deprecated methods in favor of their suggested replacements and use "_" for a loop counter. libcoretest: remove invocations of deprecated methods; also add "allow(deprecated)" for testing a deprecated method itself. libglob: use "cfg_attr". libgraphviz: add a test for one of data constructors. libgreen: remove a superfluous "use". libnum: "allow(type_overflow)" for type cast into u8 in a test code. librustc: names of static variables should be in upper case. libserialize: v[i] instead of get(). libstd/ascii: to_lowercase() instead of to_lower(). libstd/bitflags: modify AnotherSetOfFlags to use i8 as its backend. It will serve better for testing various aspects of bitflags!. libstd/collections: "allow(deprecated)" for testing a deprecated method itself. libstd/io: remove invocations of deprecated methods and superfluous "use". Also add #[test] where it was missing. libstd/num: introduce a helper function to effectively remove invocations of a deprecated method. libstd/path and rand: remove invocations of deprecated methods and superfluous "use". libstd/task and libsync/comm: "allow(deprecated)" for testing a deprecated method itself. libsync/deque: remove superfluous "unsafe". libsync/mutex and once: names of static variables should be in upper case. libterm: introduce a helper function to effectively remove invocations of a deprecated method. We still see a few warnings about using obsoleted native::task::spawn() in the test modules for libsync. I'm not sure how I should replace them with std::task::TaksBuilder and native::task::NativeTaskBuilder (dependency to libstd?) Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-3/+3
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-3/+3
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-3/+3
2014-09-30librustc: Forbid `..` in range patterns.Patrick Walton-6/+6
This breaks code that looks like: match foo { 1..3 => { ... } } Instead, write: match foo { 1...3 => { ... } } Closes #17295. [breaking-change]
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-15/+14
2014-09-19Add enum variants to the type namespaceNick Cameron-11/+11
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-16Fallout from renamingAaron Turon-3/+3
2014-09-13librustc: Forbid inherent implementations that aren't adjacent to thePatrick Walton-0/+1
type they provide an implementation for. This breaks code like: mod foo { struct Foo { ... } } impl foo::Foo { ... } Change this code to: mod foo { struct Foo { ... } impl Foo { ... } } Additionally, if you used the I/O path extension methods `stat`, `lstat`, `exists`, `is_file`, or `is_dir`, note that these methods have been moved to the the `std::io::fs::PathExtensions` trait. This breaks code like: fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Change this code to: use std::io::fs::PathExtensions; fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Closes #17059. RFC #155. [breaking-change]
2014-08-24Adjust the error messages to match the pattern "expected foo, found bar"Jonas Hietala-1/+1
Closes #8492
2014-08-06Use byte literals in libtermnham-17/+16
2014-07-23collections: Deprecate shift/unshiftBrian Anderson-2/+2
Use insert/remove instead.
2014-07-17librustc: Remove cross-borrowing of `Box<T>` to `&T` from the language,Patrick Walton-1/+1
except where trait objects are involved. Part of issue #15349, though I'm leaving it open for trait objects. Cross borrowing for trait objects remains because it is needed until we have DST. This will break code like: fn foo(x: &int) { ... } let a = box 3i; foo(a); Change this code to: fn foo(x: &int) { ... } let a = box 3i; foo(&*a); [breaking-change]
2014-07-17deprecate Vec::getNick Cameron-3/+3
2014-07-15Fix errorsAdolfo Ochagavía-3/+2
2014-07-15Deprecate `str::from_char`Adolfo Ochagavía-1/+1
Use `String::from_char` or `.to_str` instead [breaking-change]
2014-07-15Deprecate `str::from_utf8_owned`Adolfo Ochagavía-3/+3
Use `String::from_utf8` instead [breaking-change]
2014-07-04librustc: Remove the `&LIFETIME EXPR` production from the language.Patrick Walton-6/+6
This was parsed by the parser but completely ignored; not even stored in the AST! This breaks code that looks like: static X: &'static [u8] = &'static [1, 2, 3]; Change this code to the shorter: static X: &'static [u8] = &[1, 2, 3]; Closes #15312. [breaking-change]
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-2/+8
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-18Deprecate the bytes!() macro.Simon Sapin-32/+30
Replace its usage with byte string literals, except in `bytes!()` tests. Also add a new snapshot, to be able to use the new b"foo" syntax. The src/etc/2014-06-rewrite-bytes-macros.py script automatically rewrites `bytes!()` invocations into byte string literals. Pass it filenames as arguments to generate a diff that you can inspect, or `--apply` followed by filenames to apply the changes in place. Diffs can be piped into `tip` or `pygmentize -l diff` for coloring.
2014-06-13Fix all violations of stronger guarantees for mutable borrowsCameron Zwarich-1/+2
Fix all violations in the Rust source tree of the stronger guarantee of a unique access path for mutable borrows as described in #12624.
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-3/+3
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-06-05Fallout from the libcollections movementAlex Crichton-2/+2
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-3/+3
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-12/+8
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-77/+77
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-1/+1
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-11/+11
[breaking-change]
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-1/+2
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-4/+6
2014-05-16Some fixesCorey Richardson-1/+1
2014-05-16Update for BoxCorey Richardson-1/+1
2014-05-16Update for masterCorey Richardson-2/+3
2014-05-16term: add docs and windows supportCorey Richardson-0/+186
Closes #2807
2014-05-14libterm: Remove all uses of `~str` from `libterm`Patrick Walton-90/+114
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-4/+4
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-05-04Remove two useless comparisonsVirgile Andreani-3/+1
according to the updated type_limits lint.
2014-05-02Replace most ~exprs with 'box'. #11779Brian Anderson-4/+9
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-67/+75