summary refs log tree commit diff
path: root/src/libterm/terminfo/parser
AgeCommit message (Collapse)AuthorLines
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2016-03-22term: undo conversion of user defined try!sJorge Aparicio-15/+19
2016-03-22try! -> ?Jorge Aparicio-18/+14
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2015-12-03libterm: bring across changes from termBryce Van Dyk-125/+114
This brings across changes made to the term library to libterm. This includes removing instances or unwrap, fixing format string handling, and removing a TODO. This fix does not bring all changes across, as term now relies on cargo deps that cannot be brought into the rust build at this stage, but has attempted as best to cross port changes not relying on this. This notably limits extra functionality since implemented int he Terminal trait in Term. This is in partly in response to rust issue #29992.
2015-11-22Rustfmt libterm, skip long static in compiled.rsBryce Van Dyk-28/+31
2015-09-08some more clippy-based improvementsAndre Bogus-15/+15
2015-06-21Temp fix for all constants that are missing docs.Eljay-0/+6
2015-04-24Change name of unit test sub-module to "tests".Johannes Oertel-1/+1
Changes the style guidelines regarding unit tests to recommend using a sub-module named "tests" instead of "test" for unit tests as "test" might clash with imports of libtest.
2015-04-21Remove dead testTamir Duberstein-7/+0
This was moved to https://github.com/rust-lang/term/issues/12
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-15/+15
Now that support has been removed, all lingering use cases are renamed.
2015-03-25Add trivial cast lints.Nick Cameron-1/+1
This permits all coercions to be performed in casts, but adds lints to warn in those cases. Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference. [breaking change] * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed. * The unused casts lint has gone. * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are: - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_` - Casts do not influence inference of integer types. E.g., the following used to type check: ``` let x = 42; let y = &x as *const u32; ``` Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information: ``` let x: u32 = 42; let y = &x as *const u32; ```
2015-03-04std: Deprecate std::old_io::fsAlex Crichton-15/+35
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-1/+1
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-3/+3
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-26Fallout of io => old_ioAlex Crichton-3/+3
2015-01-19remove unnecessary parentheses from range notationJorge Aparicio-2/+2
2015-01-07use slicing sugarJorge Aparicio-3/+3
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-1/+1
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
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-07Replace full slice notation with index callsNick Cameron-3/+3
2015-01-05Modernize macro_rules! invocationsKeegan McAllister-2/+2
macro_rules! is like an item that defines a macro. Other items don't have a trailing semicolon, or use a paren-delimited body. If there's an argument for matching the invocation syntax, e.g. parentheses for an expr macro, then I think that applies more strongly to the *inner* delimiters on the LHS, wrapping the individual argument patterns.
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-1/+1
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-06libterm: remove unnecessary `as_slice()` callsJorge Aparicio-2/+1
2014-10-28Update code with new lint namesAaron Turon-1/+1
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-21Fix fallout from Vec stabilizationAlex Crichton-7/+6
2014-08-24Adjust the error messages to match the pattern "expected foo, found bar"Jonas Hietala-1/+1
Closes #8492
2014-07-15Fix errorsAdolfo OchagavĂ­a-1/+0
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-1/+1
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-4/+4
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-05Fallout from the libcollections movementAlex Crichton-1/+1
2014-05-28std: Remove format_strbuf!()Alex Crichton-5/+3
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-16/+16
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-1/+1
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-2/+2
[breaking-change]
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-1/+2
2014-05-14libterm: Remove all uses of `~str` from `libterm`Patrick Walton-20/+33
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-3/+3
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-2/+7
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-12/+12
2014-04-06De-~[] Reader and WriterSteven Fackler-2/+2
There's a little more allocation here and there now since from_utf8_owned can't be used with Vec.
2014-04-02Fix fallout of requiring uint indicesAlex Crichton-2/+2
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-1/+1
Closes #2569
2014-03-24Documentation sprint: TerminfoOlle Jonsson-1/+1
2014-03-22auto merge of #12907 : alexcrichton/rust/issue-12892, r=brsonbors-2/+2
These methods can be mistaken for general "read some bytes" utilities when they're actually only meant for reading an exact number of bytes. By renaming them it's much clearer about what they're doing without having to read the documentation. Closes #12892