about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2014-05-27auto merge of #14414 : richo/rust/features/nerf_unused_string_fns, ↵bors-566/+566
r=alexcrichton This should block on #14323
2014-05-27auto merge of #14444 : huonw/rust/nice-for-errors, r=alexcrichtonbors-0/+48
Change `for` desugaring & make refutable pattern errors more precise This changes for to desugar to the `let`-based pattern match as described in #14390, and adjusts the compiler to use this information for error messages that even mention that it's in a `for` loop. Also, it makes the compiler record the exact positions of refutable parts of a pattern, to point to exactly them in error messages.
2014-05-27std: Rename strbuf operations to stringRicho Healey-404/+404
[breaking-change]
2014-05-27auto merge of #14428 : alexcrichton/rust/issue-14422, r=pcwaltonbors-0/+111
This ensures that a public typedef to a private item is ensured to be public in terms of linkage. This affects both the visibility of the library's symbols as well as other lints based on privacy (dead_code for example). Closes #14421 Closes #14422
2014-05-27std: Remove String's to_ownedRicho Healey-162/+162
2014-05-27rustc: Account for typedefs in privacyAlex Crichton-0/+111
This ensures that a public typedef to a private item is ensured to be public in terms of linkage. This affects both the visibility of the library's symbols as well as other lints based on privacy (dead_code for example). Closes #14421 Closes #14422
2014-05-27rustc: provide more precise information about refutable patterns.Huon Wilson-0/+32
The compiler now points exactly which part(s) of a pattern are refutable, rather than just highlighting the whole pattern.
2014-05-27syntax: desugar a `for` loop to a let binding to get better errorHuon Wilson-0/+16
messages when the pattern is refutable. This means the compiler points directly to the pattern and said that the problem is the pattern being refutable (rather than just saying that some value isn't covered in the `match` as it did previously). Fixes #14390.
2014-05-26auto merge of #14300 : cmr/rust/enum-size-lint, r=kballardbors-0/+42
See commits for details.
2014-05-25Allow $foo:block nonterminals in expression positionKevin Ballard-0/+21
Fixes #13678.
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-364/+364
[breaking-change]
2014-05-24Get "make check" to work with unused-attributeSteven Fackler-17/+15
There's a fair number of attributes that have to be whitelisted since they're either looked for by rustdoc, in trans, or as needed. These can be cleaned up in the future.
2014-05-24auto merge of #14392 : alexcrichton/rust/mem-updates, r=sfacklerbors-3/+3
* All of the *_val functions have gone from #[unstable] to #[stable] * The overwrite and zeroed functions have gone from #[unstable] to #[stable] * The uninit function is now deprecated, replaced by its stable counterpart, uninitialized [breaking-change]
2014-05-24auto merge of #14389 : Ryman/rust/14303, r=alexcrichtonbors-0/+94
Closes #14303.
2014-05-24auto merge of #14388 : kballard/rust/nonfatal_lexer_errors, r=alexcrichtonbors-68/+44
Most errors that arise in the lexer can be recovered from. This allows for more than one syntax error to be reported at a time.
2014-05-23core: Finish stabilizing the `mem` module.Alex Crichton-3/+3
* All of the *_val functions have gone from #[unstable] to #[stable] * The overwrite and zeroed functions have gone from #[unstable] to #[stable] * The uninit function is now deprecated, replaced by its stable counterpart, uninitialized [breaking-change]
2014-05-23Make most lexer errors non-fatalKevin Ballard-68/+44
Most errors that arise in the lexer can be recovered from. This allows for more than one syntax error to be reported at a time.
2014-05-23auto merge of #14379 : brson/rust/simd, r=alexcrichtonbors-13/+13
Followup to https://github.com/mozilla/rust/pull/14331 and https://github.com/mozilla/rust/pull/12524
2014-05-23auto merge of #14317 : P1start/rust/lifetime-formatting, r=alexcrichtonbors-0/+19
This changes certain error messages about lifetimes so that they display lifetimes without an `&`. Fixes #10291.
2014-05-23std: Move unstable::finally to std::finally. #1457Brian Anderson-1/+1
[breaking-change]
2014-05-23std: Move simd to core::simd and reexport. #1457Brian Anderson-12/+12
[breaking-change]
2014-05-23Improve error message for lifetimes after type params.Kevin Butler-0/+94
Closes #14303.
2014-05-23auto merge of #14313 : kballard/rust/tuple_dotdot_match_ice, r=cmrbors-0/+32
Fixes #14308.
2014-05-23auto merge of #14360 : alexcrichton/rust/remove-deprecated, r=kballardbors-34/+5
These have all been deprecated for awhile now, so it's likely time to start removing them.
2014-05-23syntax: Clean out obsolete syntax parsingAlex Crichton-34/+5
All of these features have been obsolete since February 2014, where most have been obsolete since 2013. There shouldn't be any more need to keep around the parser hacks after this length of time.
2014-05-23Fix lifetime error to print `'a` instead of `&'a`P1start-0/+19
This changes certain error messages about lifetimes so that they display lifetimes without an `&`. Fixes #10291.
2014-05-22rustc: add a lint for large enum variantsCorey Richardson-0/+42
It can be easy to accidentally bloat the size of an enum by making one variant larger than the others. When this happens, it usually goes unnoticed. This commit adds a lint that can warn when the largest variant in an enum is more than 3 times larger than the second-largest variant. This requires a little bit of rejiggering, because size information is only available in trans, but lint levels are only available in the lint context. It is allow by default because it's pretty noisy, and isn't really *that* undesirable. Closes #10362
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-141/+91
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-64/+55
2014-05-22auto merge of #14350 : zwarich/rust/let-suggestion, r=pcwaltonbors-0/+20
2014-05-21auto merge of #14321 : alexcrichton/rust/ices, r=pcwaltonbors-0/+272
Also adding tests for fixed ICEs
2014-05-21Add a suggestion to use a `let` binding on some borrowck errors.Cameron Zwarich-0/+20
2014-05-21rustc: Fix an ICE with box-placement syntaxAlex Crichton-0/+14
Closes #14084
2014-05-21rustc: Turn a Box ICE into an errorAlex Crichton-0/+14
Closes #14092
2014-05-20auto merge of #14259 : alexcrichton/rust/core-mem, r=brsonbors-1/+1
Excluding the functions inherited from the cast module last week (with marked stability levels), these functions received the following treatment. * size_of - this method has become #[stable] * nonzero_size_of/nonzero_size_of_val - these methods have been removed * min_align_of - this method is now #[stable] * pref_align_of - this method has been renamed without the `pref_` prefix, and it is the "default alignment" now. This decision is in line with what clang does (see url linked in comment on function). This function is now #[stable]. * init - renamed to zeroed and marked #[stable] * uninit - marked #[stable] * move_val_init - renamed to overwrite and marked #[stable] * {from,to}_{be,le}{16,32,64} - all functions marked #[stable] * swap/replace/drop - marked #[stable] * size_of_val/min_align_of_val/align_of_val - these functions are marked #[unstable], but will continue to exist in some form. Concerns have been raised about their `_val` prefix.
2014-05-20core: Stabilize the mem moduleAlex Crichton-1/+1
Excluding the functions inherited from the cast module last week (with marked stability levels), these functions received the following treatment. * size_of - this method has become #[stable] * nonzero_size_of/nonzero_size_of_val - these methods have been removed * min_align_of - this method is now #[stable] * pref_align_of - this method has been renamed without the `pref_` prefix, and it is the "default alignment" now. This decision is in line with what clang does (see url linked in comment on function). This function is now #[stable]. * init - renamed to zeroed and marked #[stable] * uninit - marked #[stable] * move_val_init - renamed to overwrite and marked #[stable] * {from,to}_{be,le}{16,32,64} - all functions marked #[stable] * swap/replace/drop - marked #[stable] * size_of_val/min_align_of_val/align_of_val - these functions are marked #[unstable], but will continue to exist in some form. Concerns have been raised about their `_val` prefix. [breaking-change]
2014-05-20test: Add test for fixed issue #12796Alex Crichton-0/+20
Doesn't close #12796 because the error message is awful.
2014-05-20test: Add a test for fixed issue #12567Alex Crichton-0/+23
Closes #12567
2014-05-20rustc: Avoid an unwrap() in check_matchAlex Crichton-0/+19
Closes #12369
2014-05-20auto merge of #14293 : alexcrichton/rust/weak-lang-items, r=brsonbors-4/+84
This commit is part of the ongoing libstd facade efforts (cc #13851). The compiler now recognizes some language items as "extern { fn foo(...); }" and will automatically perform the following actions: 1. The foreign function has a pre-defined name. 2. The crate and downstream crates can only be built as rlibs until a crate defines the lang item itself. 3. The actual lang item has a pre-defined name. This is essentially nicer compiler support for the hokey core-depends-on-std-failure scheme today, but it is implemented the same way. The details are a little more hidden under the covers. In addition to failure, this commit promotes the eh_personality and rust_stack_exhausted functions to official lang items. The compiler can generate calls to these functions, causing linkage errors if they are left undefined. The checking for these items is not as precise as it could be. Crates compiling with `-Z no-landing-pads` will not need the eh_personality lang item, and crates compiling with no split stacks won't need the stack exhausted lang item. For ease, however, these items are checked for presence in all final outputs of the compiler. It is quite easy to define dummy versions of the functions necessary: #[lang = "stack_exhausted"] extern fn stack_exhausted() { /* ... */ } #[lang = "eh_personality"] extern fn eh_personality() { /* ... */ } cc #11922, rust_stack_exhausted is now a lang item cc #13851, libcollections is blocked on eh_personality becoming weak
2014-05-20rustc: Avoid out of bounds in check_matchAlex Crichton-0/+25
Closes #12116
2014-05-20test: Add a test for fixed issue #11844Alex Crichton-0/+19
Closes #11844
2014-05-20test: Add test for fixed issue #11736Alex Crichton-0/+35
Closes #11736
2014-05-20test: Add a test for fixed issue #10763Alex Crichton-0/+13
Closes #10763
2014-05-20rustc: Fix a dynamic borrow error in resolveAlex Crichton-0/+17
Closes #8208 Closes #10980
2014-05-20rustc: Prevant an out of bounds access in typeckAlex Crichton-0/+22
Closes #7092
2014-05-20syntax: Parse global paths in patternsAlex Crichton-0/+51
Closes #6449
2014-05-20Add run-pass case for issue #14308Kevin Ballard-0/+32
Enum wildcard patterns in match behave wrong when applied to tuple structs. They either ICE or cause an LLVM error.
2014-05-20auto merge of #13975 : ↵bors-0/+60
nikomatsakis/rust/issue-13794-fn-subtyping-and-static, r=pnkfelix Tweak region inference to ignore constraints like `'a <= 'static`, since they have no value. This also ensures that we can handle some obscure cases of fn subtyping with bound regions that we didn't used to handle correctly. Fixes #13974.
2014-05-20rustc: Better resolve errors for &T, &mut T, remove failure condition.Kevin Butler-0/+213