about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2015-04-17Auto merge of #24420 - pnkfelix:oflo-api, r=alexcrichtonbors-0/+236
Fill in missing parts of Integer overflow API See todo list at #22020
2015-04-17Fix test for 32-bit targets.Felix S. Klock II-2/+2
(The cast from the 64-bit value to isize was using the lower 32-bits, which led to it being treated as a large positive value rather than a smallish negative one. The fix was to use the same bits for the upper- and lower- 32 bits.)
2015-04-16rustdoc: Inline methods inhereted through DerefAlex Crichton-0/+113
Whenever a type implements Deref, rustdoc will now add a section to the "methods available" sections for "Methods from Deref<Target=Foo>", listing all the inherent methods of the type `Foo`. Closes #19190
2015-04-16Auto merge of #24448 - alexcrichton:issue-24445, r=huonwbors-0/+53
One of the parameters to the magical "register a thread-local destructor" function is called `__dso_handle` and largely just passed along (this seems to be what other implementations do). Currently we pass the *value* of this symbol, but apparently the correct piece of information to pass is the *address* of the symbol. In a PIE binary the symbol actually contains an address to itself which is why we've gotten away with what we're doing as long as we have. In a non-PIE binary the symbol contains the address `NULL`, causing a segfault in the runtime library if it keeps going. Closes #24445
2015-04-16Auto merge of #24437 - fhahn:issue-24434, r=alexcrichtonbors-0/+16
closes #24434 This PR changes executes `syntax::config::strip_unconfigured_items` before `syntax::feature_gate::check_crate_macros(sess.codemap()`. As far as I know, `strip_unconfigured_items` should be independent of `check_crate_macros`.
2015-04-16Auto merge of #24423 - tbelaire:include_bytes, r=alexcrichtonbors-0/+40
This is a little bit tricky, since with include_str!, we know that we are including utf-8 content, so it's safe to store the source as a String in a FileMap. We don't know that for include_bytes!, but I don't think we actually need to track the contents anyways, so I'm passing "". new_filemap does check for the zero length content, and it should be reasonable, howeven I'm not sure if it would be better to pass None instead of Some(Rc::new("")) as the src component of a FileMap. Fixes bug #24348
2015-04-16Auto merge of #23682 - tamird:DRY-is-empty, r=alexcrichtonbors-11/+11
r? @alexcrichton
2015-04-16Auto merge of #24485 - brson:is, r=alexcrichtonbors-9/+23
It was an oversight that this was not done in the great int upheaval. [breaking-change]
2015-04-15Forbid is/us suffixes. Fixes #22496Brian Anderson-9/+23
It was an oversight that this was not done in the great int upheaval. [breaking-change]
2015-04-15Auto merge of #24481 - steveklabnik:rollup, r=steveklabnikbors-1/+33
- Successful merges: #24425, #24435, #24438, #24440, #24449, #24457, #24460, #24465, #24467, #24468, #24471, #24476, #24480 - Failed merges:
2015-04-15Rollup merge of #24460 - bytewiseand:master, r=alexcrichtonSteve Klabnik-0/+32
Closes #24197 Closes #24375 These ICEs are fixed on nightly.
2015-04-15Auto merge of #24330 - pnkfelix:issue-24267, r=nikomatsakisbors-0/+29
Extend rustc::middle::dataflow to allow filtering kills from flow-exits. Fix borrowck analysis so that it will not treat a break that pops through an assignment ```rust x = { ... break; ... } ``` as a kill of the "moved-out" bit for `x`. Fix #24267. [breaking-change], but really, its only breaking code that was already buggy.
2015-04-15Regression test.Felix S. Klock II-0/+29
2015-04-15std: Fix thread_local! in non-PIE binariesAlex Crichton-0/+53
One of the parameters to the magical "register a thread-local destructor" function is called `__dso_handle` and largely just passed along (this seems to be what other implementations do). Currently we pass the *value* of this symbol, but apparently the correct piece of information to pass is the *address* of the symbol. In a PIE binary the symbol actually contains an address to itself which is why we've gotten away with what we're doing as long as we have. In a non-PIE binary the symbol contains the address `NULL`, causing a segfault in the runtime library if it keeps going. Closes #24445
2015-04-15Added a test for include_bytes! dep infoTheo Belaire-0/+40
This tests that both include_str! and include_bytes! mark their input file as a dependancy, and it's correctly outputted when you run `rustc --emit dep-info`.
2015-04-15Add tests for "ident only path should have been covered"-ICEAndreas Martens-0/+32
2015-04-15Fix some typos.Ms2ger-1/+1
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-5/+5
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-6/+6
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14Test fixes and rebase conflicts, round 2Alex Crichton-3/+2
2015-04-14Strip configuration before checking feature gates of macrosFlorian Hahn-0/+16
closes #24434
2015-04-14Test fixes and rebase conflictsAlex Crichton-381/+0
2015-04-14rollup merge of #24385: aturon/unstable-scopedAlex Crichton-74/+482
Conflicts: src/libstd/thread/mod.rs src/test/bench/shootout-mandelbrot.rs src/test/bench/shootout-reverse-complement.rs src/test/run-pass/capturing-logging.rs src/test/run-pass/issue-9396.rs src/test/run-pass/tcp-accept-stress.rs src/test/run-pass/tcp-connect-timeouts.rs src/test/run-pass/tempfile.rs
2015-04-14rollup merge of #24399: brson/stabAlex Crichton-0/+18
2015-04-14rollup merge of #24380: arielb1/no-enum-suggestAlex Crichton-0/+29
Fixes #24365
2015-04-14rollup merge of #24379: rkruppe/fmt-negative-zeroAlex Crichton-1/+7
Fixes #20596 by making `Debug` render negative zero with a `-` without affecting the behavior of `Display`. While I was at it, I also removed some dead code from `float_to_str_bytes_common` (the one from `libcore/fmt/float.rs`, not the function of the same name in `libstd/num/strconv.rs`). It had support for different bases, and for negative numbers, but the function is internal to core and the couple places that call it (all in `libcore/fmt/mod.rs`) never use those features: They pass in `num.abs()` and base 10.
2015-04-14rollup merge of #24371: dotdash/24353Alex Crichton-0/+16
Fixes #24353
2015-04-14More test fixesAlex Crichton-45/+27
2015-04-14bench: Fix fallout in benchmarksAlex Crichton-157/+100
2015-04-14test: Fixup many library unit testsAlex Crichton-40/+28
2015-04-14test: Fix fallout in run-pass testsAlex Crichton-721/+143
2015-04-14Regression tests for `wrapping_*` operations for integer types.Felix S. Klock II-0/+236
2015-04-14Fallout: move from scoped to spawnAaron Turon-81/+113
2015-04-14Auto merge of #24312 - rprichard:destabilize-format-args, r=alexcrichtonbors-13/+0
Fixes #22953.
2015-04-14Reviewer commentsNick Cameron-1/+1
2015-04-14RebasedNick Cameron-5/+7
2015-04-14eddyb's refactoring of coercions/adjustmentsEduard Burtescu-8/+11
2015-04-14Auto merge of #24295 - contradictioned:master, r=alexcrichtonbors-0/+18
As i proposed in #24262 (and found acceptance in the IRC channel), added a compiler warning for wrong escaping of curly braces.
2015-04-13Make use of the stability attributes issue a deprecation warning. #22830Brian Anderson-0/+18
2015-04-13Don't try to suggest fields of an enumAriel Ben-Yehuda-0/+29
Fixes #24365
2015-04-13Added a help span which informs the user about the escaping of curly braces ↵Manuel Hoffmann-0/+18
in a format string if a wrongly escaped one is detected in a string.
2015-04-13Auto merge of #24351 - michaelwoerister:named-tuple-fields, r=alexcrichtonbors-121/+123
This PR makes `rustc` emit field names for tuple fields in DWARF. Formerly there was no way of directly accessing the fields of a tuple in GDB and LLDB since there is no C/C++ equivalent to this. Now, the debugger sees the name `__{field-index}` for tuple fields. So you can type for example `some_tuple_val.__2` to get the third tuple component. When pretty printers are used (e.g. via `rust-gdb` or `rust-lldb`) these artificial field names will not clutter tuple rendering (which was the main motivation for not doing this in the past). Solves #21948.
2015-04-13Fix ICE when returning a variable whose declaration is unreachableBjörn Steinbrink-0/+16
Fixes #24353
2015-04-12Remove pretty-expanded from tests that use format_args!Ryan Prichard-13/+0
Now that the internals of `format_args!` are unstable, tests that use it don't compile after pretty-printing (unless they also declare the necessary feature).
2015-04-12Make Debug include the - in -0.0Robin Kruppe-1/+7
2015-04-12Add a name for tuple fields in debuginfo so that they can be accessed in ↵Michael Woerister-121/+123
debuggers.
2015-04-12Rollup merge of #24321 - lstat:16602-needstest, r=pnkfelixManish Goregaokar-0/+70
Closes #16602
2015-04-12Rollup merge of #24072 - ebfull:explain_closure_type_err, r=pnkfelixManish Goregaokar-0/+30
Also fixed bug calling .note() instead of .help() See #24036
2015-04-12Auto merge of #24003 - rprichard:span-fixes, r=huonwbors-0/+156
* In `noop_fold_expr`, call `new_span` in these cases: - `ExprMethodCall`'s identifier - `ExprField`'s identifier - `ExprTupField`'s integer Calling `new_span` for `ExprMethodCall`'s identifier is necessary to print an acceptable diagnostic for `write!(&2, "")`. We see this error: ``` <std macros>:2:20: 2:66 error: type `&mut _` does not implement any method in scope named `write_fmt` <std macros>:2 ( & mut * $ dst ) . write_fmt ( format_args ! ( $ ( $ arg ) * ) ) ) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` With this change, we also see a macro expansion backtrace leading to the `write!(&2, "")` call site. * After fully expanding a macro, we replace the expansion expression's span with the original span. Call `fld.new_span` to add a backtrace to this span. (Note that I'm call `new_span` after `bt.pop()`, so the macro just expanded isn't on the backtrace.) The motivating example for this change is `println!("{}")`. The format string literal is `concat!($fmt, "arg")` and is inside the libstd macro. We need to see the backtrace to find the `println!` call site. * Add a backtrace to the `format_args!` format expression span. r? alexcrichton Addresses #23459
2015-04-12Auto merge of #24109 - sanxiyn:diverging-closure, r=pnkfelixbors-0/+18
Fix #23896.