about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-10-04dont run these tests on targets that default to panic=abort.Felix S. Klock II-0/+2
2019-10-04[const-prop] Fix ICE when trying to eval polymorphic promoted MIRWesley Wiser-11/+22
2019-10-04Regression test for #63154.Felix S. Klock II-0/+34
2019-10-04make is_power_of_two a const functionTrevor Spiteri-0/+11
2019-10-04Fix ABI, run and fix more tests, re-enable CI for PRsThomas Lively-101/+113
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-76/+63
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-10-04Rollup merge of #65073 - ecstatic-morse:issue-65071, r=petrochenkovMazdak Farrokhzad-2/+1
Remove `borrowck_graphviz_postflow` from test Resolves #65071. r? @petrochenkov
2019-10-04Rollup merge of #65026 - petrochenkov:ice1, r=eddybMazdak Farrokhzad-2/+2
metadata: Some crate loading cleanup So, my goal was to fix caching of loaded crates which is broken and causes ICEs like #56935 or #64450. While investigating I found that the code is pretty messy and likes to confuse various things that look similar but are actually different. This PR does some initial cleanup in that area, I hope to get to the caching itself a bit later.
2019-10-04Rollup merge of #64874 - matthewjasper:simplify-euv, r=eddybMazdak Farrokhzad-24/+18
Simplify ExprUseVisitor * Remove HIR const qualification * Remove parts of ExprUseVisitor that aren't being used r? @eddyb
2019-10-04Rollup merge of #64749 - matthewjasper:liveness-opt, r=nikomatsakisMazdak Farrokhzad-478/+24
Fix most remaining Polonius test differences This fixes most of the Polonius test differences and also avoids overflow in issue-38591.rs. r? @nikomatsakis
2019-10-03Rollup merge of #65057 - mathstuf:fix-warning-typo, r=CentrilTyler Mandry-20/+20
typo: fix typo in E0392 See #64931. --- Cc: @Centril @estebank
2019-10-03Rollup merge of #65055 - GuillaumeGomez:long-err-explanation-E0556, ↵Tyler Mandry-1/+2
r=petrochenkov Add long error explanation for E0556 Part of #61137
2019-10-03Rollup merge of #65018 - Aaron1011:fix/backtrace-stderr, r=nikomatsakisTyler Mandry-4/+8
Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr This removes the implicit dependency on the environment variables set when running `./x.py test`
2019-10-03Rollup merge of #64842 - ↵Tyler Mandry-0/+116
pnkfelix:fix-issue-61631-self-in-type-param-default, r=alexreg Disallow Self in type param defaults of ADTs Fix #61631 (also includes a drive-by fix to a typo in some related diagnostic output.)
2019-10-03Rollup merge of #64741 - GuillaumeGomez:prevent-rustdoc-feature-doctests, ↵Tyler Mandry-0/+20
r=QuietMisdreavus Prevent rustdoc feature doctests Part of https://github.com/rust-lang/rust/pull/61351 cc @ollie27
2019-10-03Rollup merge of #64706 - nikomatsakis:issue-60218-test-case, r=centrilTyler Mandry-0/+34
add regression test for #60218 Fixes #60218
2019-10-03Rollup merge of #64690 - petrochenkov:mixed, r=dtolnayTyler Mandry-35/+152
proc_macro API: Expose `macro_rules` hygiene Proc macros do not have direct access to our oldest and most stable hygiene kind - `macro_rules` hygiene. To emulate it macro authors have to go through two steps - first generate a temporary `macro_rules` item (using a derive, at least until https://github.com/rust-lang/rust/pull/64035 is merged), then generate a macro call to that item. Popular crates like [proc_macro_hack](https://crates.io/crates/proc-macro-hack) use this trick to generate hygienic identifiers from proc macros. I'd say that these workarounds with nested macro definitions have more chances to hit some corner cases in our hygiene system, in which we don't have full confidence. So, let's provide a direct access to `macro_rules` hygiene instead. This PR does that by adding a new method `Span::mixed_site` (bikeshedding is welcome) in addition to existing `Span::call_site` (stable) and `Span::def_site` (unstable). Identifiers with this span resolve at def-site in for local variables, labels and `$crate`, and resolve at call-site for everything else, i.e. exactly like identifiers produced by `macro_rules`. This API addition opens the way to stabilizing proc macros in expression positions (https://github.com/rust-lang/rust/issues/54727), for which use of call-site hygiene or workarounds with temporary items would be quite unfortunate. (`macro_rules` expanded in expression position, on the other hand, are stable since 1.0 and widely used.) r? @dtolnay @alexcrichton
2019-10-03Rollup merge of #64675 - Centril:deprecate-plugin, r=oli-obkTyler Mandry-240/+562
Deprecate `#![plugin]` & `#[plugin_registrar]` This PR deprecates `#![plugin]` and `#[plugin_registrar]`. ~A removal deadline is set: 1.44.0. This will be in 9 months from now and should give everyone who is still relying on the feature ample time to rid themselves of this dependency.~ cc https://github.com/rust-lang/rust/issues/29597 r? @Mark-Simulacrum
2019-10-03Bless testDylan MacKenzie-1/+1
2019-10-04metadata: Remove `locator::Context::ident`Vadim Petrochenkov-2/+2
It's a crate name after renaming, so it's entirely irrelevant to crate loading
2019-10-03Remove `borrowck_graphviz_postflow` from testDylan MacKenzie-1/+0
2019-10-03review commentsEsteban Küber-9/+9
2019-10-03review commentsEsteban Küber-12/+27
2019-10-03Prove bad turbofish parser recovery in testEsteban Küber-11/+3
2019-10-03Account for missing turbofish in paths tooEsteban Küber-2/+3
2019-10-03When encountering chained operators use heuristics to recover from bad turbofishEsteban Küber-14/+30
2019-10-03Regression tests.Felix S. Klock II-0/+116
Update: incorporate review feedback.
2019-10-03Auto merge of #64938 - estebank:ice-ice-baby, r=matthewjasperbors-0/+22
Avoid ICE on ReFree region on where clause Fix #64855.
2019-10-03typo: fix typo in E0392Ben Boeckel-20/+20
See #64931.
2019-10-03Auto merge of #64999 - nikomatsakis:issue-60424-async-return-inference, ↵bors-475/+549
r=cramertj extract expected return type for async fn generators Fixes #60424 cc @Centril, I know you've been eager to see this fixed. r? @cramertj
2019-10-03update ui testsGuillaume Gomez-1/+2
2019-10-03add regression test for #60218Niko Matsakis-0/+34
2019-10-03Update issue-64655-extern-rust-must-allow-unwind.rsFelix S Klock II-1/+0
placate tidy
2019-10-03Apply suggestions from code reviewFelix S Klock II-4/+4
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com> Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-10-03proc_macro: Add `Span::mixed_site` exposing `macro_rules` hygieneVadim Petrochenkov-35/+152
2019-10-03./x.py test --bless --compare-mode=nllNiko Matsakis-288/+258
2019-10-03--bless ui-fulldeps testsMazdak Farrokhzad-24/+210
2019-10-03plugin_registrary: use normal deprecation instead of hard coded warning.Mazdak Farrokhzad-259/+303
2019-10-03Deprecate `#![plugin]` and `#[plugin_registrar]`.Mazdak Farrokhzad-15/+107
2019-10-03Rollup merge of #64959 - davidtwco:issue-64252-self-type-help, ↵Mazdak Farrokhzad-0/+68
r=Centril,estebank syntax: improve parameter without type suggestions Fixes #64252. This PR improves the suggestions provided when function parameters do not have types: - A new suggestion is added for arbitrary self types, which suggests adding `self: ` before the type. - Existing suggestions are now provided when a `<` is found where a `:` was expected (previously only `,` and `)` or trait items), this gives suggestions in the case where the unnamed parameter type is generic in a free function. - The suggestion that a type name be provided (e.g. `fn foo(HashMap<u32>)` -> `fn foo(HashMap: TypeName<u32>)`) will no longer occur when a `<` was found instead of `:`. - The ident will not be used for recovery when a `<` was found instead of `:`. r? @Centril cc @estebank @yoshuawuyts
2019-10-03Rollup merge of #64931 - estebank:missing-param-ref, r=matthewjasper,CentrilMazdak Farrokhzad-20/+20
Reword E0392 slightly Make it clearer that a type or lifetime argument not being used can be fixed by referencing it in a struct's fields, not just using `PhathomData`. CC #53589.
2019-10-03Rollup merge of #63678 - Aaron1011:fix/hrtb-leak, r=nikomatsakisMazdak Farrokhzad-4/+54
Improve HRTB error span when -Zno-leak-check is used As described in #57374, NLL currently produces unhelpful higher-ranked trait bound (HRTB) errors when '-Zno-leak-check' is enabled. This PR tackles one half of this issue - making the error message point at the proper span. The error message itself is still the very generic "higher-ranked subtype error", but this can be improved in a follow-up PR. The root cause of the bad spans lies in how NLL attempts to compute the 'blamed' region, for which it will retrieve a span for. Consider the following code, which (correctly) does not compile: ```rust let my_val: u8 = 25; let a: &u8 = &my_val; let b = a; let c = b; let d: &'static u8 = c; ``` This will cause NLL to generate the following subtype constraints: d :< c c :< b b <: a Since normal Rust lifetimes are covariant, this results in the following region constraints (I'm using 'd to denote the lifetime of 'd', 'c to denote the lifetime of 'c, etc.): 'c: 'd 'b: 'c 'a: 'b From this, we can derive that 'a: 'd holds, which implies that 'a: 'static must hold. However, this is not the case, since 'a refers to 'my_val', which does not outlive the current function. When NLL attempts to infer regions for this code, it will see that the region 'a has grown 'too large' - it will be inferred to outlive 'static, despite the fact that is not declared as outliving 'static We can find the region responsible, 'd, by starting at the *end* of the 'constraint chain' we generated above. This works because for normal (non-higher-ranked) lifetimes, we generally build up a 'chain' of lifetime constraints *away* from the original variable/lifetime. That is, our original lifetime 'a is required to outlive progressively more regions. If it ends up living for too long, we can look at the 'end' of this chain to determine the 'most recent' usage that caused the lifetime to grow too large. However, this logic does not work correctly when higher-ranked trait bounds (HRTBs) come into play. This is because HRTBs have *contravariance* with respect to their bound regions. For example, this code snippet compiles: ```rust let a: for<'a> fn(&'a ()) = |_| {}; let b: fn(&'static ()) = a; ``` Here, we require that 'a' is a subtype of 'b'. Because of contravariance, we end up with the region constraint 'static: 'a, *not* 'a: 'static This means that our 'constraint chains' grow in the opposite direction of 'normal lifetime' constraint chains. As we introduce subtypes, our lifetime ends up being outlived by other lifetimes, rather than outliving other lifetimes. Therefore, starting at the end of the 'constraint chain' will cause us to 'blame' a lifetime close to the original definition of a variable, instead of close to where the bad lifetime constraint is introduced. This PR improves how we select the region to blame for 'too large' universal lifetimes, when bound lifetimes are involved. If the region we're checking is a 'placeholder' region (e.g. the region 'a' in for<'a>, or the implicit region in fn(&())), we start traversing the constraint chain from the beginning, rather than the end. There are two (maybe more) different ways we generate region constraints for NLL: requirements generated from trait queries, and requirements generated from MIR subtype constraints. While the former always use explicit placeholder regions, the latter is more tricky. In order to implement contravariance for HRTBs, TypeRelating replaces placeholder regions with existential regions. This requires us to keep track of whether or not an existential region was originally a placeholder region. When we look for a region to blame, we check if our starting region is either a placeholder region or is an existential region created from a placeholder region. If so, we start iterating from the beginning of the constraint chain, rather than the end.
2019-10-02Revert changes to `src/test/ui/reify-intrinsic.stderr`Aaron Hill-2/+2
For some reason, I'm getting different output for this locally.
2019-10-02review commentsEsteban Küber-0/+5
2019-10-02fix example (le sigh)Niko Matsakis-2/+2
2019-10-02add unsize slice-str coercionNiko Matsakis-0/+11
2019-10-02review commentEsteban Küber-20/+20
2019-10-02fix typoFelix S Klock II-1/+1
2019-10-02Do not mark unitinitialized locals as requiring storageMatthew Jasper-5/+109
2019-10-02Regression tests for issue 64655.Felix S. Klock II-0/+145