summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2016-08-14prohibit splitting literal patternsAriel Ben-Yehuda-0/+46
Before PR #32202, check_match tended to report bogus errors or ICE when encountering a pattern that split a literal, e.g. ```Rust match foo { "bar" => {}, &_ => {} } ``` That PR fixed these issues, but trans::_match generates bad code when it encounters these matches. MIR trans has that fixed, but it is waiting for 6 weeks in beta. Report an error when encountering these instead. Fixes issue #35044.
2016-08-08Avoid writing a temporary closure kindNiko Matsakis-0/+32
We used to write a temporary closure kind into the inference table, but this could lead to obligations being incorrectled resolved before inference had completed. This result could then be cached, leading to further trouble. This patch avoids writing any closure kind until the computation is complete. Fixes #34349.
2016-08-01Add regression test.Jeffrey Seyfried-0/+23
2016-08-01Add regression testJeffrey Seyfried-1/+7
2016-08-01Just pass in NodeId to FunctionContext::new instead of looking it up.Luqman Aden-0/+43
2016-07-26tyencode: Make sure that projection bounds are handled in stable order.Michael Woerister-0/+66
2016-07-21Backport fix for #34209 to betaVadim Petrochenkov-0/+23
2016-07-05Try to fix a test on betaAlex Crichton-1/+0
2016-07-04Auto merge of #34594 - willcrichton:master, r=nrcbors-0/+87
Move LLVM cleanup so modules are accessible during `after_llvm` phase Fix for #34432. Also added a new phase controller `after_compilation_done` that gets called at the very end (i.e. after linking) at the suggestion of @nrc. The added test will segfault if the modules get deallocated too early, so it ensures the LLVM is not prematurely cleaned up. r? @nrc
2016-07-04Auto merge of #34639 - dzamlo:master, r=michaelwoeristerbors-0/+77
Use lazy iterator in vec/slice gdb pretty printers
2016-07-04Use lazy iterator in vec/slice gdb pretty printersLoïc Damien-0/+77
2016-07-04Added new compilation phase and testWill Crichton-0/+87
2016-07-03Auto merge of #34550 - cynicaldevil:master, r=Manishearthbors-0/+7
Added a pretty printer for &mut slices Fixes #30232 I have added a test which checks for correctness in gdb, but I need some help to do the same for lldb. r? @Manishearth
2016-07-03Auto merge of #34480 - jseyfried:remove_entry_points, r=nrcbors-2/+3
Remove redundant `CompileController` entry points Remove the `after_expand` and `after_write_deps` `CompileController` entry points. The only things that separate these entry points from `after_hir_lowering` are dep-info generation and HIR map construction, neither of which is computationally intensive or has the potential to error. r? @nrc
2016-07-03Auto merge of #34530 - alexcrichton:stabilize-1.11, r=aturonbors-8/+2
std: Stabilize APIs for the 1.11.0 release Although the set of APIs being stabilized this release is relatively small, the trains keep going! Listed below are the APIs in the standard library which have either transitioned from unstable to stable or those from unstable to deprecated. Stable * `BTreeMap::{append, split_off}` * `BTreeSet::{append, split_off}` * `Cell::get_mut` * `RefCell::get_mut` * `BinaryHeap::append` * `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past libstd stabilizations * `Iterator::sum` * `Iterator::product` Deprecated * `{f32, f64}::next_after` * `{f32, f64}::integer_decode` * `{f32, f64}::ldexp` * `{f32, f64}::frexp` * `num::One` * `num::Zero` Added APIs (all unstable) * `iter::Sum` * `iter::Product` * `iter::Step` - a few methods were added to accomodate deprecation of One/Zero Removed APIs * `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is unstable Closes #27739 Closes #27752 Closes #32526 Closes #33444 Closes #34152 cc #34529 (new tracking issue)
2016-07-04Added a pretty printer for &mut slicesNikhil Shagrithaya-0/+7
2016-07-03std: Stabilize APIs for the 1.11.0 releaseAlex Crichton-8/+2
Although the set of APIs being stabilized this release is relatively small, the trains keep going! Listed below are the APIs in the standard library which have either transitioned from unstable to stable or those from unstable to deprecated. Stable * `BTreeMap::{append, split_off}` * `BTreeSet::{append, split_off}` * `Cell::get_mut` * `RefCell::get_mut` * `BinaryHeap::append` * `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past libstd stabilizations * `Iterator::sum` * `Iterator::product` Deprecated * `{f32, f64}::next_after` * `{f32, f64}::integer_decode` * `{f32, f64}::ldexp` * `{f32, f64}::frexp` * `num::One` * `num::Zero` Added APIs (all unstable) * `iter::Sum` * `iter::Product` * `iter::Step` - a few methods were added to accomodate deprecation of One/Zero Removed APIs * `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is unstable Closes #27739 Closes #27752 Closes #32526 Closes #33444 Closes #34152 cc #34529 (new tracking issue)
2016-07-02Auto merge of #34580 - eddyb:two-steps-forward-one-step-backwards, r=nagisabors-0/+67
Revert "Remove the return_address intrinsic." This reverts commit b30134dbc3c29cf62a4518090e1389ff26918c19. Servo might want this merged if they don't merge servo/servo#11872 soon. cc @pnkfelix @jdm
2016-07-02Auto merge of #34605 - arielb1:bug-in-the-jungle, r=eddybbors-0/+20
fail obligations that depend on erroring obligations Fix a bug where an obligation that depend on an erroring obligation would be regarded as successful, leading to global cache pollution and random lossage. Fixes #33723. Fixes #34503. r? @eddyb since @nikomatsakis is on vacation beta-nominating because of the massive lossage potential (e.g. with `Copy` this could lead to random memory leaks), plus this is a regression.
2016-07-02Auto merge of #34443 - eddyb:sized-matters, r=arielb1bors-0/+37
Disallow constants and statics from having unsized types. This is a `[breaking-change]` which fixes #34390 by banning unsized `const` and `static`, e.g.: ```rust const A: [i32] = *(&[0, 1, 2] as &[i32]); static B: str = *"foo"; ``` This was not intentionally allowed, and other than for `static` since some versions ago, it ICE'd. If you've been taking advantage of this with `static`, you should be able to just use references instead.
2016-07-02Auto merge of #34539 - arielb1:metadata-hash, r=alexcrichtonbors-9/+9
Make the metadata lock more robust Fixes #33778 and friends. I also needed to add a metadata encoding version to rlibs, as they did not have it before. To keep it backwards-compatible, I added 4 zeroes to the start of the metadata, which are treated as an empty length field by older rustcs. r? @alexcrichton
2016-07-02fix test falloutAriel Ben-Yehuda-9/+9
2016-07-02Rollup merge of #34531 - GuillaumeGomez:libsyntax_err_codes, r=jonathandturnerManish Goregaokar-24/+25
Add error codes in libsyntax r? @jonathandturner Fixes #34526
2016-07-02fail obligations that depend on erroring obligationsAriel Ben-Yehuda-0/+20
Fix a bug where an obligation that depend on an erroring obligation would be regarded as successful, leading to global cache pollution and random lossage. Fixes #33723. Fixes #34503.
2016-07-01Add the `after_expand` entry point between import resolution and the rest of ↵Jeffrey Seyfried-2/+3
name resolution
2016-06-30Revert "Remove the return_address intrinsic."Eduard Burtescu-0/+67
This reverts commit b30134dbc3c29cf62a4518090e1389ff26918c19.
2016-06-30Auto merge of #34541 - jseyfried:rollup, r=jseyfriedbors-1/+16
Rollup of 5 pull requests - Successful merges: #34105, #34305, #34512, ~~#34531,~~ #34547
2016-06-29Fix testsggomez-24/+25
2016-06-29Rollup merge of #34542 - jseyfried:fix_recursive_modules, r=nrcManish Goregaokar-0/+28
Fix non-termination on recursive module re-exports in extern crates Fixes #33776. r? @nrc
2016-06-29Rollup merge of #34536 - ollie27:rustdoc_module_impls, r=alexcrichtonManish Goregaokar-0/+15
rustdoc: Fix empty Implementations section on some module pages These are caused by `DefaultImpl`s. For example [`core::marker`](https://doc.rust-lang.org/nightly/core/marker/#impls).
2016-06-29Rollup merge of #34513 - ollie27:rustdoc_stripped, r=alexcrichtonManish Goregaokar-0/+66
rustdoc: Fix a few stripping issues We need to recurse into stripped modules to strip things like impl methods but when doing so we must not add any items to the `retained` set. For example this removes [`core::num::ParseFloatError::__description`](https://doc.rust-lang.org/nightly/core/num/struct.ParseFloatError.html#method.__description) and [`impl Clone for ThreadRng`](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html).
2016-06-29Rollup merge of #34497 - oli-obk:double_negation, r=eddybManish Goregaokar-0/+1
Revert "skip double negation in const eval" This reverts commit 735c018974e5570ea13fd887aa70a011a5b8e7b8. fixes #34395 The original commit was based on a mis-understanding of the overflowing literal lint. This needs to be ported to beta. r? @eddyb
2016-06-29Rollup merge of #34495 - jseyfried:only_ident_macro_invocations, r=eddybManish Goregaokar-3/+3
Forbid type parameters and global paths in macro invocations Fixes #28558. This is a [breaking-change]. For example, the following would break: ```rust macro_rules! m { () => { () } } fn main() { m::<T>!(); // Type parameters are no longer allowed in macro invocations ::m!(); // Global paths are no longer allowed in macro invocations } ``` Any breakage can be fixed by removing the type parameters or the leading `::` (respectively). r? @eddyb
2016-06-29Rollup merge of #34460 - dsprenkels:issue-33455, r=alexcrichtonManish Goregaokar-0/+11
Add regression test for #33455 Closes #33455.
2016-06-29Rollup merge of #34446 - jseyfried:refactor_decorators, r=nrcManish Goregaokar-6/+6
Treat `MultiDecorator`s as a special case of `MultiModifier`s This deals with #32950 by using @durka's [option 1](https://github.com/rust-lang/rust/pull/33769#issuecomment-221774136). r? @nrc
2016-06-29Fix pretty-printing of lifetime boundSeo Sanghyeon-1/+16
2016-06-29Disallow `derive` on items with type macrosJeffrey Seyfried-6/+6
2016-06-29Add regression testJeffrey Seyfried-0/+28
2016-06-28rustdoc: Fix empty Implementations section on some module pagesOliver Middleton-0/+15
These are caused by `DefaultImpl`s.
2016-06-28Rollup merge of #34479 - ollie27:rustdoc_renamed_reexport_list, r=GuillaumeGomezGuillaume Gomez-0/+22
rustdoc: Fix inlined renamed reexports in import lists Fixes #34473
2016-06-27Auto merge of #34424 - jseyfried:breaking_batch, r=Manishearthbors-33/+145
Batch up libsyntax breaking changes Batch of the following syntax-[breaking-change] changes: - #34213: Add a variant `Macro` to `TraitItemKind` - #34368: Merge the variant `QPath` of `PatKind` into the variant `PatKind::Path` - #34385: Move `syntax::ast::TokenTree` into a new module `syntax::tokenstream` - #33943: - Remove the type parameter from `visit::Visitor` - Remove `attr::WithAttrs` -- use `attr::HasAttrs` instead. - Change `fold_tt`/`fold_tts` to take token trees by value and avoid wrapping token trees in `Rc`. - Remove the field `ctxt` of `ast::Mac_` - Remove inherent method `attrs()` of types -- use the method `attrs` of `HasAttrs` instead. - #34316: - Remove `ast::Decl`/`ast::DeclKind` and add variants `Local` and `Item` to `StmtKind`. - Move the node id for statements from the `StmtKind` variants to a field of `Stmt` (making `Stmt` a struct instead of an alias for `Spanned<StmtKind>`) - Rename `ast::ExprKind::Again` to `Continue`. - #34339: Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>` - Use `.into()` in convert between `Vec<Attribute>` and `ThinVec<Attribute>` - Use autoderef instead of `.as_attr_slice()` - #34436: Remove the optional expression from `ast::Block` and instead use a `StmtKind::Expr` at the end of the statement list. - #34403: Move errors into a separate crate (unlikely to cause breakage)
2016-06-27rustdoc: Fix a few stripping issuesOliver Middleton-0/+66
We need to recurse into stripped modules to strip things like impl methods but when doing so we must not add any items to the `retained` set.
2016-06-27Revert "skip double negation in const eval"Oliver Schneider-0/+1
This reverts commit 735c018974e5570ea13fd887aa70a011a5b8e7b8.
2016-06-27Auto merge of #34453 - frewsxcv:regress, r=sanxiynbors-0/+18
Add regression test for #24424. Fixes https://github.com/rust-lang/rust/issues/24424.
2016-06-26Auto merge of #34419 - eddyb:virtually-inexistent, r=Aatchbors-0/+28
Don't translate vtable methods with Self: Sized bounds. Fixes #34416.
2016-06-27Add regression testJeffrey Seyfried-3/+3
2016-06-26Auto merge of #34491 - eddyb:return-in-peace, r=nagisabors-67/+0
Remove the return_address intrinsic. This intrinsic to get the return pointer was introduced in #16248 / #16081 by @pcwalton for Servo. However, as explained in #34227, it's impossible to ensure it's used correctly, and it broke with `-Zorbit`. Servo's usage is being replaced in servo/servo#11872, and I expect nobody else to have abused it. But I've also started a crater run, just in case this is a `[breaking-change]` for anyone else.
2016-06-27Remove the return_address intrinsic.Eduard Burtescu-67/+0
2016-06-26Auto merge of #34450 - jseyfried:fix_include_path, r=nrcbors-0/+34
Revert a change to the relative path for macro-expanded `include!`s Fixes #34431 (c.f. discussion in that issue). r? @nrc
2016-06-26Disallow constants and statics from having unsized types.Eduard Burtescu-0/+37