about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-02-24Auto merge of #58232 - ljedrz:HirIdification_continued, r=Zoxcbors-3/+3
HirId-ify intravisit A big step towards https://github.com/rust-lang/rust/pull/57578. This affects mostly `hir::{collector, intravisit}` and `rustc::lint`.
2019-02-23Rollup merge of #58658 - pmccarter:align_msg, r=matthewjasperMazdak Farrokhzad-6/+8
Add expected/provided byte alignments to validation error message Fixes #58617
2019-02-23Rollup merge of #58648 - pnkfelix:issue-23926-update-tests, r=nikomatsakisMazdak Farrokhzad-12/+24
Update tests to account for cross-platform testing and miri. Fix #23926
2019-02-23Rollup merge of #58526 - pmccarter:master, r=estebankMazdak Farrokhzad-0/+19
Special suggestion for illegal unicode curly quote pairs Fixes #58436 Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark. The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).
2019-02-23Rollup merge of #58353 - matthewjasper:typeck-pattern-constants, r=arielb1Mazdak Farrokhzad-20/+58
Check the Self-type of inherent associated constants r? @arielb1
2019-02-23Rollup merge of #58199 - clintfred:partial-move-err-msg, r=estebankMazdak Farrokhzad-10/+10
Add better error message for partial move closes #56657 r? @davidtwco
2019-02-22#58658 bless after line split for tidyPatrick McCarter-5/+5
2019-02-22tidy line length override #58617Patrick McCarter-0/+1
2019-02-22Change byte align message wording #58617Patrick McCarter-2/+2
2019-02-22Invalid byte alignment expected/provided in message #58617Patrick McCarter-5/+6
2019-02-22Switch from error patterns to `//~ ERROR` markers.Felix S. Klock II-8/+11
AFAICT, we do not have the same const-eval issues that we used to when rust-lang/rust#23926 was filed. (Probably because of the switch to miri for const-evaluation.)
2019-02-22Make target pointer-width specific variants of (very old) ↵Felix S. Klock II-4/+13
huge-array-simple.rs test. (and now unignore the test since it shouldn't break tests of cross-compiles anymore.)
2019-02-22Rollup merge of #58555 - scottmcm:try-2015, r=CentrilMazdak Farrokhzad-0/+2
Add a note about 2018e if someone uses `try {` in 2015e Inspired by https://github.com/rust-lang/rust/issues/58491, where a `try_blocks` example was accidentally run in 2015, which of course produces a bunch of errors. What's the philosophy about gating for this? The keyword is stably a keyword in 2018, so I haven't gated it for now but am not mentioning what the keyword _does_. Let me know if I should do differently. Resolves #53672
2019-02-22Rollup merge of #58198 - ↵Mazdak Farrokhzad-4/+4
igorsdv:suggest-removing-parentheses-surrounding-lifetimes, r=estebank Suggest removing parentheses surrounding lifetimes Fixes #57386. r? @estebank
2019-02-22Rollup merge of #58059 - RalfJung:before_exec, r=alexcrichtonMazdak Farrokhzad-83/+115
deprecate before_exec in favor of unsafe pre_exec Fixes https://github.com/rust-lang/rust/issues/39575 As per the [lang team decision](https://github.com/rust-lang/rust/issues/39575#issuecomment-442993358): > The language team agreed that before_exec should be unsafe, and leaves the details of a transition plan to the libs team. Cc @alexcrichton @rust-lang/libs how would you like to proceed?
2019-02-22Auto merge of #56113 - spastorino:erroneous-loop-diagnostic-in-nll, r=pnkfelixbors-17/+82
Erroneous loop diagnostic in nll Closes #53773 r? @nikomatsakis
2019-02-21partially revert 904a0bde93f0348f69914ee90b1f8b6e4e0d7cbcNiko Matsakis-5/+19
This preserves the error you currently get on stable for the old-lub-glb-object.rs test.
2019-02-21update test files to reflect new outputNiko Matsakis-300/+834
One surprise: old-lub-glb-object.rs, may indicate a bug
2019-02-21restore the actual leak-checkNiko Matsakis-0/+84
2019-02-20Auto merge of #58056 - nikomatsakis:issue-57843-universe-leak, r=pnkfelixbors-24/+60
make generalization code create new variables in correct universe In our type inference system, when we "generalize" a type T to become a suitable value for a type variable V, we sometimes wind up creating new inference variables. So, for example, if we are making V be some subtype of `&'X u32`, then we might instantiate V with `&'Y u32`. This generalized type is then related `&'Y u32 <: &'X u32`, resulting in a region constriant `'Y: 'X`. Previously, however, we were making these fresh variables like `'Y` in the "current universe", but they should be created in the universe of V. Moreover, we sometimes cheat in an invariant context and avoid creating fresh variables if we know the result must be equal -- we can only do that when the universes work out. Fixes #57843 r? @pnkfelix
2019-02-20./x.py test src/test/ui --stage 1 --bless -i --compare-mode=nllClint Frederickson-8/+8
2019-02-20Fix erroneous loop diagnostic in nllSantiago Pastorino-17/+82
This commit fixes the logic of detecting when a use happen in a later iteration of where a borrow was defined Fixes #53773
2019-02-20Auto merge of #58578 - kennytm:rollup, r=kennytmbors-0/+103
Rollup of 24 pull requests Successful merges: - #56470 (Modify doctest's auto-`fn main()` to allow `Result`s) - #58044 (Make overflowing and wrapping negation const) - #58303 (Improve stability tags display) - #58336 (Fix search results interactions) - #58384 (Fix tables display) - #58392 (Use less explicit shifting in std::net::ip) - #58409 (rustdoc: respect alternate flag when formatting impl trait) - #58456 (Remove no longer accurate diagnostic code about NLL) - #58528 (Don't use an allocation for ItemId in StmtKind) - #58530 (Monomorphize less code in fs::{read|write}) - #58534 (Mention capping forbid lints) - #58536 (Remove UB in pointer tests) - #58538 (Add missing fmt structs examples) - #58539 (Add alias methods to PathBuf for underlying OsString (#58234)) - #58544 (Fix doc for rustc "-g" flag) - #58545 (Add regression test for a specialization-related ICE (#39448)) - #58546 (librustc_codegen_llvm => 2018) - #58551 (Explain a panic in test case net::tcp::tests::double_bind) - #58553 (Use more impl header lifetime elision) - #58562 (Fix style nits) - #58565 (Fix typo in std::future::Future docs) - #58568 (Fix a transposition in driver.rs.) - #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`) - #58576 (Stabilize iter::successors and iter::from_fn)
2019-02-20hir: HirId-ify intravisitljedrz-3/+3
2019-02-20Rollup merge of #58044 - Lokathor:lokathor, r=alexcrichtonkennytm-0/+12
Make overflowing and wrapping negation const Remember that the signed and unsigned versions are slightly different here, so there's four functions made const instead of just two.
2019-02-20Rollup merge of #58545 - emlai:regression-test-for-39448, r=Centrilkennytm-0/+62
Add regression test for a specialization-related ICE (#39448) Closes #39448. This is my first time contributing, I hope I got everything right. :)
2019-02-20Rollup merge of #58409 - euclio:impl-trait-wrapping, r=QuietMisdreavuskennytm-0/+5
rustdoc: respect alternate flag when formatting impl trait Fixes #58226. Before: <img width="963" alt="screen shot 2019-02-12 at 3 23 30 pm" src="https://user-images.githubusercontent.com/1372438/52665732-4496ea00-2eda-11e9-9e29-efffe43b2abf.png"> After: <img width="964" alt="screen shot 2019-02-12 at 3 23 51 pm" src="https://user-images.githubusercontent.com/1372438/52665733-452f8080-2eda-11e9-999a-dd1fb28dee16.png">
2019-02-20Rollup merge of #56470 - llogiq:process-termination-doctest, r=GuillaumeGomezkennytm-0/+24
Modify doctest's auto-`fn main()` to allow `Result`s This lets the default `fn main()` ~~return `impl Termination`~~ unwrap Results, which allows the use of `?` in most tests without adding it manually. This fixes #56260 ~~Blocked on `std::process::Termination` stabilization.~~ Using `Termination` would have been cleaner, but this should work OK.
2019-02-19Auto merge of #57896 - oli-obk:permissive_existence, r=cramertjbors-59/+417
Be more permissive with required bounds on existential types fixes #54184 r? @pnkfelix
2019-02-19Auto merge of #56514 - ollie27:rustdoc_test_libdir, r=QuietMisdreavusbors-2/+2
rustdoc: Don't modify library path for doctests It shouldn't be needed anymore because doctests are no longer compiled with `prefer-dynamic` (since #54939). r? @QuietMisdreavus
2019-02-19Auto merge of #58503 - varkor:const-generics-hir, r=petrochenkovbors-14/+55
Add const generics to the HIR Split out from https://github.com/rust-lang/rust/pull/53645. cc @yodaldevoid r? @eddyb
2019-02-18re-blessing error output: ./x.py test src/test/ui --stage 1 --blessClint Frederickson-37/+37
2019-02-17Add a note about 2018e if someone uses `try {` in 2015eScott McMurray-0/+2
2019-02-17Add regression test for a specialization-related ICE (#39448)emlai-0/+62
2019-02-17Modify doctest's auto-`fn main()` to allow `Result`sAndre Bogus-0/+24
This lets the default `fn main()` unwrap any `Result`s, which allows the use of `?` in most tests without adding it manually.
2019-02-17Rollup merge of #58509 - phansch:add_myself_to_clippy_toolstate_maintainers, ↵kennytm-14/+14
r=oli-obk Notify myself when Clippy toolstate changes
2019-02-17Rollup merge of #57929 - GuillaumeGomez:rustodc-remove-old-style-files, ↵kennytm-7/+17
r=ollie27 Rustdoc remove old style files Reopening of #56577 (which I can't seem to reopen...). I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
2019-02-17Rollup merge of #58479 - saleemjaffer:test_promote_evaluation_unused_result, ↵kennytm-0/+8
r=oli-obk compile-pass test for #53606 fixes #53606
2019-02-16ui test for directed quote help suggestion #58436Patrick McCarter-0/+19
2019-02-16Add a test for const parameter uppercase lintvarkor-0/+27
2019-02-16Don't abort early when collecting const genericsvarkor-2/+16
2019-02-16Rollup merge of #58196 - varkor:const-fn-feature-gate-error, r=oli-obkkennytm-102/+310
Add specific feature gate error for const-unstable features Before: ``` error: `impl Trait` in const fn is unstable --> src/lib.rs:7:19 | 7 | const fn foo() -> impl T { | ^^^^^^ error: aborting due to previous error ``` After: ``` error[E0723]: `impl Trait` in const fn is unstable (see issue #57563) --> src/lib.rs:7:19 | 7 | const fn foo() -> impl T { | ^^^^^^ = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to previous error ``` This improves the situation with https://github.com/rust-lang/rust/issues/57563. Fixes https://github.com/rust-lang/rust/issues/57544. Fixes https://github.com/rust-lang/rust/issues/54469. r? @oli-obk
2019-02-16Rollup merge of #57981 - Zoxc:fix-57979, r=nikomatsakiskennytm-0/+59
Fix #57730 cc https://github.com/rust-lang/rust/pull/57730 r? @cramertj
2019-02-15Update testsvarkor-12/+12
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Auto merge of #57880 - Zoxc:error-on-cycle, r=michaelwoeristerbors-14/+14
Always emit an error for a query cycle r? @michaelwoerister cc @nikomatsakis @wesleywiser
2019-02-15fix tests post-rebaseFelix S. Klock II-14/+14
2019-02-15make generalization code create new variables in correct universeNiko Matsakis-10/+46
In our type inference system, when we "generalize" a type T to become a suitable value for a type variable V, we sometimes wind up creating new inference variables. So, for example, if we are making V be some subtype of `&'X u32`, then we might instantiate V with `&'Y u32`. This generalized type is then related `&'Y u32 <: &'X u32`, resulting in a region constriant `'Y: 'X`. Previously, however, we were making these fresh variables like `'Y` in the "current universe", but they should be created in the universe of V. Moreover, we sometimes cheat in an invariant context and avoid creating fresh variables if we know the result must be equal -- we can only do that when the universes work out.
2019-02-15Auto merge of #58403 - eddyb:requalify, r=oli-obkbors-20/+20
rustc_mir: split qualify_consts' "value qualification" bitflags into separate computations. Prerequisite for computing those bits through a dataflow algorithm ~~(which I might do in this PR later)~~. This PR should not change behavior overall, other than treating `simd_shuffle*` identically to `#[rustc_args_required_const]` (maybe we should just have `#[rustc_args_required_const]` on the intrinsic imports of `simd_shuffle*`? cc @gnzlbg) cc @oli-obk @alexreg
2019-02-15compile-pass test for #53606Saleem Jaffer-0/+8
2019-02-15Always emit an error for a query cycleJohn Kåre Alsaker-14/+14