about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2015-05-19Auto merge of #24333 - arielb1:implement-rfc401, r=nrcbors-60/+398
2015-05-19Make float -> int casts actually workAriel Ben-Yehuda-1/+0
2015-05-19Address review commetsAriel Ben-Yehuda-16/+22
I think I didn't run tests properly - my second call to select_all_obligations_or_error has made 3 tests fail. However, this is just an error message change - integer fallback never worked with casts.
2015-05-19fix conflictsAriel Ben-Yehuda-6/+11
2015-05-19Fix test fallout, and add some rather comprehensive tests.Ariel Ben-Yehuda-35/+359
2015-05-19Overhaul cast semantics and make them follow RFC401Ariel Ben-Yehuda-7/+11
This should hopefully fix all cast-related ICEs once and for all. I managed to make diagnostics hate me and give me spurious "decoder error" - removing $build/tmp/extended-errors seems to fix it.
2015-05-19Auto merge of #25550 - sfackler:derive-debug-unsized, r=alexcrichtonbors-0/+14
Closes #25394
2015-05-19Auto merge of #25441 - alexcrichton:debug-panic-neg, r=aturonbors-0/+21
Debug overflow checks for arithmetic negation landed in #24500, at which time the `abs` method on signed integers was changed to using `wrapping_neg` to ensure that the function never panicked. This implied that `abs` of `INT_MIN` would return `INT_MIN`, another negative value. When this change was back-ported to beta, however, in #24708, the `wrapping_neg` function had not yet been backported, so the implementation was changed in #24785 to `!self + 1`. This change had the unintended side effect of enabling debug overflow checks for the `abs` function. Consequently, the current state of affairs is that the beta branch checks for overflow in debug mode for `abs` and the nightly branch does not. This commit alters the behavior of nightly to have `abs` always check for overflow in debug mode. This change is more consistent with the way the standard library treats overflow as well, and it is also not a breaking change as it's what the beta branch currently does (albeit if by accident). cc #25378
2015-05-18std: Make abs() panic on overflow in debug modeAlex Crichton-0/+21
Debug overflow checks for arithmetic negation landed in #24500, at which time the `abs` method on signed integers was changed to using `wrapping_neg` to ensure that the function never panicked. This implied that `abs` of `INT_MIN` would return `INT_MIN`, another negative value. When this change was back-ported to beta, however, in #24708, the `wrapping_neg` function had not yet been backported, so the implementation was changed in #24785 to `!self + 1`. This change had the unintended side effect of enabling debug overflow checks for the `abs` function. Consequently, the current state of affairs is that the beta branch checks for overflow in debug mode for `abs` and the nightly branch does not. This commit alters the behavior of nightly to have `abs` always check for overflow in debug mode. This change is more consistent with the way the standard library treats overflow as well, and it is also not a breaking change as it's what the beta branch currently does (albeit if by accident). cc #25378
2015-05-18Auto merge of #25501 - nham:E0072_E0073, r=alexcrichtonbors-2/+2
cc #24407
2015-05-17Auto merge of #25527 - inrustwetrust:const-not-overflow, r=alexcrichtonbors-0/+21
Fixes #23968. Since the values are stored in a u64 internally, we need to be mask away the high bits after applying the ! operator. Otherwise, these bits will be set to one, causing overflow.
2015-05-17Make #[derive(Debug)] work with unsized fieldsSteven Fackler-0/+14
Closes #25394
2015-05-17Add error explanations for E0072, E0073, E0121, E0178, E0371, E0372.Nick Hamann-2/+2
2015-05-17Auto merge of #25524 - Manishearth:unsafe_derive, r=cmrbors-0/+2
2015-05-17Allow #[derive()] to generate unsafe methodsManish Goregaokar-0/+2
2015-05-17Fix compile-time integer overflow when using ! on unsigned valuesinrustwetrust-0/+21
Since the values are stored in a u64 internally, we need to be mask away the high bits after applying the ! operator. Otherwise, these bits will be set to one, causing overflow.
2015-05-17Rollup merge of #25503 - brson:betafix, r=cmrManish Goregaokar-2/+0
2015-05-17Rollup merge of #25476 - rpjohnst:master, r=huonwManish Goregaokar-0/+21
Closes #18173
2015-05-17Auto merge of #25387 - eddyb:syn-file-loader, r=nikomatsakisbors-4/+4
This allows compiling entire crates from memory or preprocessing source files before they are tokenized. Minor API refactoring included, which is a [breaking-change] for libsyntax users: * `ParseSess::{next_node_id, reserve_node_ids}` moved to rustc's `Session` * `new_parse_sess` -> `ParseSess::new` * `new_parse_sess_special_handler` -> `ParseSess::with_span_handler` * `mk_span_handler` -> `SpanHandler::new` * `default_handler` -> `Handler::new` * `mk_handler` -> `Handler::with_emitter` * `string_to_filemap(sess source, path)` -> `sess.codemap().new_filemap(path, source)`
2015-05-17test/compile-fail: fix expected error message for non-UTF8 source.Eduard Burtescu-1/+1
2015-05-16Make a test compatible with the beta channelBrian Anderson-2/+0
2015-05-16Auto merge of #25485 - XuefengWu:24968_err_msg_parse_self_type_2, r=nrcbors-1/+16
fix #24968 report more friendly error message for Self when fn args copy from https://github.com/rust-lang/rust/pull/25096 r? @nrc @arielb1
2015-05-16fix error message in testXuefeng Wu-1/+1
2015-05-16Auto merge of #25444 - nikomatsakis:macro-tt-fix, r=pnkfelixbors-0/+95
Permit token trees, identifiers, and blocks to be following by sequences. Fixes #25436. r? @pnkfelix
2015-05-16Add test for two sequence repetitions in a rowNiko Matsakis-0/+18
2015-05-16Auto merge of #25487 - P1start:extern-crate-unexpected-error, r=huonwbors-1/+12
Closes #25468.
2015-05-16Clarify the error message for malformed `extern crate` statementsP1start-1/+12
Closes #25468.
2015-05-16fix trait capitalise typo in test fileXuefeng Wu-1/+1
2015-05-16fix typo for copyright year and trait capitaliseXuefeng Wu-0/+15
2015-05-15Test that associated types are not required as type parametersRussell Johnston-0/+21
Closes #18173
2015-05-16Fix the spans of `move` closuresP1start-0/+17
Closes #24986.
2015-05-15Permit token trees, identifiers, and blocks to be following byNiko Matsakis-0/+77
sequences. Fixes #25436.
2015-05-15syntax: Unquoting some statements requires trailing semicolonsErick Tryzelaar-0/+6
2015-05-15Auto merge of #25400 - nrc:save-api, r=huonwbors-43/+96
Also start factoring out an API for compiler tools to use and fix a bug that was preventing DXR indexing Rust properly. r? @huonw
2015-05-15Auto merge of #25399 - kballard:crate-attributes-cfg_attr, r=alexcrichtonbors-0/+31
Stripping unconfigured items prior to collecting crate metadata means we can say things like `#![cfg_attr(foo, crate_type="lib")]`. Fixes #25347.
2015-05-14Auto merge of #25403 - Manishearth:rollup, r=Manishearthbors-2/+2
- Successful merges: #25354, #25381, #25391, #25395, #25397, #25398, #25401 - Failed merges:
2015-05-14Auto merge of #24920 - alexcrichton:duration, r=aturonbors-32/+32
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
2015-05-14Move configuration 1 phase before crate metadata collectionKevin Ballard-0/+31
Stripping unconfigured items prior to collecting crate metadata means we can say things like `#![cfg_attr(foo, crate_type="lib")]`. Fixes #25347.
2015-05-14Rollup merge of #25398 - nham:E0066_E0069, r=huonwManish Goregaokar-2/+2
Adds explanations for E0053, E0066, E0069, E0251, E0252, E0255, E0256, E0368. cc #24407
2015-05-14save-analysis: fix a bracket counting bugNick Cameron-0/+12
2015-05-14save-analysis: update the smoke testNick Cameron-43/+84
2015-05-14Auto merge of #25338 - tamird:unignore-stage-tests, r=alexcrichtonbors-28/+0
We don't have any pending snapshot-requiring changes. Closes #20184. Works toward #3965.
2015-05-13Add error explanations for E0066 and E0069.Nick Hamann-2/+2
This also updates the error messages for both. For E0066, it removes mention of "managed heap", which was removed in 8a91d33. For E0069, I just tweaked the wording to make it a bit more explicit.
2015-05-13std: Redesign Duration, implementing RFC 1040Alex Crichton-32/+32
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
2015-05-13Fix ICE that occurs when an associated const is ambiguous.Sean Patrick Santos-74/+106
Also change several error messages to refer to "items" rather than "methods", since associated items that require resolution during type checking are not always methods.
2015-05-13Unignore some tests in stage1Tamir Duberstein-26/+0
We don't have any pending snapshot-requiring changes. Tests which continue to be ignored are those that are broken by codegen changes.
2015-05-13Allow `T::C` syntax in match patterns to refer to trait-assosociated constants.Sean Patrick Santos-0/+4
2015-05-14syntax: refactor (Span)Handler and ParseSess constructors to be methods.Eduard Burtescu-3/+3
2015-05-13Remove errant lineTamir Duberstein-2/+0
2015-05-13Auto merge of #25344 - arielb1:fresh-float, r=nikomatsakisbors-0/+74
There is no subtyping relationship between the types (or their non-freshened variants), so they can not be merged. Fixes #22645 Fixes #24352 Fixes #23825 Should fix #25235 (no test in issue). Should fix #19976 (test is outdated).