summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2015-05-11Fallout to compile-fail tests.Felix S. Klock II-1/+13
This change is worrisome to me, both because: 1. I thought the rules in RFC 599 imply that the `Box<Trait>` without `'static` in the first case would expand to the second case, but their behaviors here differ. And, 2. The explicit handling of `'static` should mean `dropck` has no application here and thus we should have seen no change to the expected error messages. Nonetheless, the error messages changed.
2015-05-11fallout to run-pass tests.Felix S. Klock II-3/+3
2015-05-11Regression tests for Issue 25199 (dropck and `Box<Trait + 'a>`).Felix S. Klock II-0/+214
2015-05-12Fix the tests broken by replacing `task` with `thread`Barosl Lee-1/+1
2015-05-12Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-30/+30
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-05-07test: update run-pass tests to not use mutable transmutingSean McArthur-4/+4
2015-05-07lint: deny transmuting from immutable to mutable, since it's undefined behaviorSean McArthur-0/+20
[breaking-change] Technically breaking, since code that had been using these transmutes before will no longer compile. However, it was undefined behavior, so really, it's a good thing. Fixing your code would require some re-working to use an UnsafeCell instead. Closes #13146
2015-04-30tests for lint that warns about mixing #[repr(C)] with Drop.Felix S. Klock II-0/+59
THis includes tests for struct and enum. (I suspect the closure case is actually unreachable, but i see no harm in including it.)
2015-04-30Regression test for issue 24687.Felix S. Klock II-0/+78
use visible characters for the multibyte character filler.
2015-04-30regression test for Issue 24895.Felix S. Klock II-0/+38
2015-04-30Fix #20616York Xiang-0/+466
Conflicts: src/libsyntax/parse/parser.rs
2015-04-29Rather than storing the relations between free-regions in a globalNiko Matsakis-1/+81
table, introduce a `FreeRegionMap` data structure. regionck computes the `FreeRegionMap` for each fn and stores the result into the tcx so that borrowck can use it (this could perhaps be refactored to have borrowck recompute the map, but it's a bid tedious to recompute due to the interaction of closures and free fns). The main reason to do this is because of #22779 -- using a global table was incorrect because when validating impl method signatures, we want to use the free region relationships from the *trait*, not the impl. Fixes #22779. ---- This is cherry-pick of commit 6dfeda7 from PR #24553 Manually resolved conflicts in: src/librustc/lib.rs src/librustc/middle/infer/region_inference/mod.rs (both conflicts were related to changes to file structure.)
2015-04-23Augment the constrainted parameter check to ensure that all regionsNiko Matsakis-0/+59
which get mentioned in an associated type are constrained. Arguably we should just require that all regions are constrained, but that is more of a breaking change. Conflicts: src/librustc_typeck/collect.rs
2015-04-23Test fixes and rebase conflicts, round 1Alex Crichton-4/+1
Conflicts: src/test/run-pass/task-stderr.rs
2015-04-23Make stability attributes an error. #22830Brian Anderson-7/+3
Conflicts: src/librustc_data_structures/lib.rs
2015-04-23std: Bring back f32::from_str_radix as an unstable APIAlex Crichton-25/+9
This API was exercised in a few tests and mirrors the `from_str_radix` functionality of the integer types. Conflicts: src/doc/trpl/traits.md src/libstd/sys/windows/fs2.rs
2015-04-23test: Fix fallout in testsAlex Crichton-466/+205
2015-04-23std: Add Default/IntoIterator/ToOwned to the preludeAlex Crichton-3/+3
This is an implementation of [RFC 1030][rfc] which adds these traits to the prelude and additionally removes all inherent `into_iter` methods on collections in favor of the trait implementation (which is now accessible by default). [rfc]: https://github.com/rust-lang/rfcs/pull/1030 This is technically a breaking change due to the prelude additions and removal of inherent methods, but it is expected that essentially no code breaks in practice. [breaking-change] Closes #24538
2015-04-23unit test for checked overflow during signed negation.Felix S. Klock II-0/+19
2015-04-23Fallout from this change.Felix S. Klock II-54/+220
2015-04-23Regression tests for issues that led me to revise typeck.Felix S. Klock II-0/+126
Close #23729 Close #23827 Close #24356
2015-04-22add notes clarifying introduction of warnings for a pair of run-pass tests.Felix S. Klock II-0/+13
2015-04-22Tests for shadowing between lifetimes and loop labels within function bodies.Felix S. Klock II-3/+275
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