summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-10-04Do not put noalias annotations by defaultSimonas Kazlauskas-3/+36
This will be re-enabled sooner or later depending on results of further investigation. Fixes #54462
2018-09-10[beta] rustdoc: disable blanket impl collectionQuietMisdreavus-25/+0
2018-09-09Fix compile-fail/cfg-empty-codemap.rs testPietro Albini-1/+1
2018-09-07Add license header to the new testsPietro Albini-9/+69
Beta still requires them.
2018-09-07Validate syntax of `--cfg` command line argumentsVadim Petrochenkov-26/+15
2018-09-07Validate syntax of `cfg` attributesVadim Petrochenkov-0/+92
2018-09-04Properly prevent the promotion of unstable const fnsOliver Schneider-1/+92
2018-09-01Add a test for reset expansion infoVadim Petrochenkov-0/+29
2018-08-26Auto merge of #53425 - oli-obk:validation, r=nikomatsakisbors-2/+23
[beta] Don't sanity check function pointers in vtables cc https://github.com/rust-lang/rust/issues/53401 There's no beta nomination because the full fix (https://github.com/rust-lang/rust/pull/53424) is not backportable
2018-08-25resolve: Continue search in outer scopes after applying derive resolution ↵Vadim Petrochenkov-0/+26
fallback
2018-08-25Feature gate where clauses on associated type implsvarkor-4/+17
2018-08-25resolve: Reject some inaccessible candidates sooner during import resolutionVadim Petrochenkov-0/+21
This allows import resolution to progress in cases like #53140
2018-08-25fix testcasedylan_DPC-5/+18
2018-08-25add warning for missing docsdylan_DPC-4/+5
2018-08-25add testcase to existing macro testcasedylan_DPC-3/+22
2018-08-25Update testOliver Schneider-2/+2
2018-08-25Fix tidyOliver Schneider-1/+1
2018-08-25Remove an overly pedantic and wrong assertionOliver Schneider-0/+23
2018-08-25An attempt to fix NLL migration mode so that reports region errors when ↵Felix S. Klock II-5/+40
necessary. Namely, the code here was trying to be clever, and say "lets not report diagnostics when we 'know' NLL will report an error about them in the future." The problem is that in migration mode, when no error was reported here, the NLL error that we "knew" was coming was downgraded to a warning (!). This fixes that by only doing the "clever" skipping of region error reporting when we are not in migration mode. Rather than make a separate test for issue 53026, I just took the test that uncovered this in a first place, and extended it (via our revisions system) to explicitly show all three modes in action: ACT-borrowck, NLL, and NLL migration mode. (Tto be honest I hope not to have to add such revisions to many tests. Instead I hope to adopt some sort of new `compare-mode` for either borrowck=migrate or for the 2018 edition as a whole.)
2018-08-17Don't sanity check function pointers in vtablesOliver Schneider-0/+21
2018-07-31add regression test for #52057Niko Matsakis-0/+35
Fixes #52057
2018-07-30Auto merge of #52722 - alexcrichton:more-identifier-lints, r=oli-obkbors-0/+38
Tweak the raw_identifiers lints in 2018 * Enable the `raw_identifiers` feature automatically in the 2018 preview * Only emit lint warnings if the `raw_identifiers` feature is activated cc rust-lang/cargo#5783
2018-07-30Auto merge of #52823 - RalfJung:test, r=eddybbors-2/+21
invalid_const_promotion: check if we get the right signal r? @eddyb
2018-07-29dont hardcode vtable size in codegen testRalf Jung-2/+2
2018-07-29update codegen testsRalf Jung-2/+2
2018-07-29Move a test that depends on the arch bitwidth to compile-failOliver Schneider-43/+0
2018-07-29Sanity-check all constantsOliver Schneider-15/+550
2018-07-29Auto merge of #52620 - mikhail-m1:51351, r=nikomatsakisbors-46/+139
fix simple case of issue #51351 and #52133 r? @nikomatsakis
2018-07-29invalid_const_promotion: check if we get the right signalRalf Jung-2/+21
2018-07-29fix issues #51351 and #52133Mikhail Modin-46/+139
2018-07-28Auto merge of #52355 - pietroalbini:zfeature, r=eddybbors-0/+21
Add the -Zcrate-attr=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. cc https://github.com/rust-lang-nursery/crater/issues/282 @Mark-Simulacrum
2018-07-28Auto merge of #52585 - GuillaumeGomez:generic-impls, r=QuietMisdreavusbors-5/+29
[rustdoc] Generic impls Fixes #33772. r? @QuietMisdreavus
2018-07-28Auto merge of #52546 - nikomatsakis:issue-52050, r=pnkfelixbors-0/+42
do not overwrite child def-id in place but rather remove/insert When inserting a node N into the tree of impls, we sometimes find than an existing node C should be replaced with N. We used to overwrite C in place with the new def-id N -- but since the lists of def-ids are separated by simplified type, that could lead to N being inserted in the wrong place. This meant we might miss conflicts. We are now not trying to be so smart -- we remove C and then add N later. Fixes #52050 r? @aturon -- do you still remember this code at all? :)
2018-07-28Don't display full blanket implementation and put it into its own sectionGuillaume Gomez-4/+4
2018-07-28Auto merge of #52761 - toidiu:ak-static-infer-fg, r=nikomatsakisbors-0/+121
static infer feature gate https://github.com/rust-lang/rust/issues/44493 r? @nikomatsakis
2018-07-28Auto merge of #52802 - kennytm:rollup, r=kennytmbors-0/+46
Rollup of 11 pull requests Successful merges: - #52702 (Suggest fix when encountering different mutability from impl to trait) - #52703 (Improve a few vectors - calculate capacity or build from iterators) - #52740 (Suggest underscore when using dashes in crate namet push fork) - #52759 (Impl Send & Sync for JoinHandle) - #52760 (rustc_metadata: test loading atoi instead of cos) - #52763 (Omit the vendor component in Fuchsia triple) - #52765 (Remove unused "-Zenable_nonzeroing_move_hints" flag) - #52769 (Incorporate a stray test) - #52777 (Fix doc comment for 'ptr::copy_to' method) - #52779 (revert accidental atty downgrade) - #52781 (Use a slice where a vector is not necessary) Failed merges: r? @ghost
2018-07-28Rollup merge of #52740 - estebank:crate-name, r=petrochenkovkennytm-0/+34
Suggest underscore when using dashes in crate namet push fork Fix #48437.
2018-07-28Rollup merge of #52702 - csmoe:mut_diff, r=estebankkennytm-0/+12
Suggest fix when encountering different mutability from impl to trait Closes https://github.com/rust-lang/rust/issues/52412 r? @estebank
2018-07-28Auto merge of #52678 - matthewjasper:better-spans, r=nikomatsakisbors-134/+272
[NLL] Use better spans in some errors * Use the span of the discriminant and patterns for "fake" statements created to properly check matches. I plan to special case these soon, but this felt like a good first step * Use the span of the statement, rather than the initialization, when reporting move errors for `let x = ...`, which avoids giving an unhelpful suggestion to use `&{ }`. r? @nikomatsakis cc @pnkfelix
2018-07-27Add the -Zcrate-attr=foo nightly rustc flag to inject crate attributesPietro Albini-0/+21
2018-07-27Auto merge of #52648 - davidtwco:issue-52533, r=nikomatsakisbors-50/+162
[nll] improve the "fully elaborated type" case in region errors Fixes #52533. r? @nikomatsakis
2018-07-27Region inference error messages no longer start with 'free region'David Wood-8/+8
2018-07-27Auto merge of #52733 - ↵bors-0/+33
pnkfelix:issue-51348-make-temp-for-each-candidate-in-arm, r=nikomatsakis [NLL] make temp for each candidate in `match` arm In NLL, `ref mut` patterns leverage the two-phase borrow infrastructure to allow the shared borrows within a guard before the "activation" of the mutable borrow when we begin execution of the match arm's body. (There is further discussion of this on PR #50783.) To accommodate the restrictions we impose on two-phase borrows (namely that there is a one-to-one mapping between each activation and the original initialization), this PR is making separate temps for each candidate pattern. So in an arm like this: ```rust PatA(_, ref mut ident) | PatB(ref mut ident) | PatC(_, _, ref mut ident) | PatD(ref mut ident) if guard_stuff(ident) => ... ``` instead of 3 temps (two for the guard and one for the arm body), we now have 4 + 2 temps associated with `ident`: one for each candidate plus the actual temp that the guard uses directly, and then the sixth is the temp used in the arm body. Fix #51348
2018-07-27Improved mechanism for naming regions in non-annotated types.David Wood-10/+70
2018-07-27Change label from closure to function where appropriate.David Wood-34/+32
2018-07-27Fixed missing whitespace on some elaborated types.David Wood-3/+3
2018-07-27Update affected tests.David Wood-22/+22
2018-07-27Added fully elaborated type label for inferred arguments.David Wood-0/+54
2018-07-27Auto merge of #52681 - pnkfelix:z-borrowck-migrate, r=nikomatsakisbors-28/+155
Add `-Z borrowck=migrate` This adds `-Z borrowck=migrate`, which represents the way we want to migrate to NLL under Rust versions to come. It also hooks this new mode into `--edition 2018`, which means we're officially turning NLL on in the 2018 edition. The basic idea of `-Z borrowck=migrate` that there are cases where NLL is fixing old soundness bugs in the borrow-checker, but in order to avoid just breaking code by immediately rejecting the programs that hit those soundness bugs, we instead use the following strategy: If your code is accepted by NLL, then we accept it. If your code is rejected by both NLL and the old AST-borrowck, then we reject it. If your code is rejected by NLL but accepted by the old AST-borrowck, then we emit the new NLL errors as **warnings**. These warnings will be turned into hard errors in the future, and they say so in these diagnostics. Fix #46908
2018-07-27Auto merge of #52650 - oli-obk:associated_existential_types, r=nikomatsakisbors-0/+104
Implement associated existential types r? @nikomatsakis no idea if these work with generic traits. I'm going home for the day :rofl: