about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-08-16make the test only deal with edition flagsDouglas Campos-3/+4
2018-08-16bless outputDouglas Campos-1/+1
2018-08-16add missing license headerDouglas Campos-0/+10
2018-08-16resolve suggestions should use `create::` when enabledDouglas Campos-0/+24
fixes #51212
2018-08-16Auto merge of #53256 - ollie27:writeln, r=KodrAusbors-0/+53
Don't accept non-string literals for the format string in writeln This is to improve diagnostics. `println` and `eprintln` were already fixed by #52394. Fixes #30143
2018-08-16Auto merge of #53147 - ashtneoi:dont-suggest-ref, r=estebankbors-162/+2942
For move errors, suggest match ergonomics instead of `ref` Partially fixes issue #52423. Also makes errors and suggestions more consistent between move-from-place and move-from-value errors. Limitations: - Only the first pattern in a match arm can have a "consider removing this borrow operator" suggestion. - Suggestions don't always compile as-is (see the TODOs in the test for details). Sorry for the really long test. I wanted to make sure I handled every case I could think of, and it turned out there were a lot of them. Questions: - Is there any particular applicability I should set on those suggestions? - Are the notes about the `Copy` trait excessive?
2018-08-16Auto merge of #53295 - estebank:on-unimplemented, r=michaelwoeristerbors-10/+10
Various changes to `rustc_on_unimplemented` - Add `from_method` and `from_desugaring` to formatting options - Change wording of errors slightly
2018-08-15Split tests more and bless them againashtneoi-602/+653
2018-08-15Move tests into their own directoryashtneoi-0/+0
2018-08-16Auto merge of #53293 - petrochenkov:gramattr2, r=alexcrichtonbors-28/+75
syntax: Enforce attribute grammar in the parser Also fix feature-gating for `unrestricted_attribute_tokens` that was introduced in https://github.com/rust-lang/rust/pull/53270, but was actually broken. cc https://github.com/rust-lang/rust/pull/50911
2018-08-15Re-bless testashtneoi-0/+63
2018-08-15Add files I forgot to commit earlierashtneoi-0/+99
2018-08-15Bless testsashtneoi-62/+178
2018-08-15Test move-into-Fn/FnMut errors tooashtneoi-2/+530
2018-08-15Add another FIXME about suggestionsashtneoi-81/+83
2018-08-15Bless UI testsashtneoi-121/+231
2018-08-15Test patterns in tuplesashtneoi-71/+249
2018-08-15Coalesce var-is-not-Copy notes per moveashtneoi-141/+40
2018-08-15Dedup suggestionsashtneoi-102/+643
2018-08-15Remove unnecessary underscoreashtneoi-7/+7
2018-08-15Change TODOs to FIXMEsashtneoi-9/+9
2018-08-15Make move errors more consistent with typeck errorsashtneoi-22/+22
2018-08-15Make move error suggestions clearerashtneoi-80/+80
2018-08-15Add backquotes around variable nameashtneoi-51/+51
2018-08-15Fix move errors for index expressionsashtneoi-17/+44
The suggestion logic gave up too early, which kept it from suggesting borrowing index expressions.
2018-08-15Test move errors for index expressionsashtneoi-80/+313
2018-08-15Add more TODOsashtneoi-3/+3
2018-08-15Suggest match ergonomics, not `ref`/`ref mut`ashtneoi-0/+933
2018-08-15Auto merge of #53400 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-16/+17
Rollup of 8 pull requests Successful merges: - #52453 (improve diagnostics for tests with custom return values) - #53271 (use ? to simplify `TransitiveRelation.maybe_map`) - #53279 (Extend documentation of `rustc_on_unimplemented`) - #53342 (fix error for unsized packed struct field) - #53344 (Add doc examples for std::alloc::{alloc,alloc_zeroed}.) - #53368 (Ignore test that fails on stage1) - #53388 (Fix links' color) - #53396 (Fix since of Iterator::flatten to be a proper semver) Failed merges: r? @ghost
2018-08-15Rollup merge of #53368 - matthewjasper:only-stage-2, r=varkorGuillaume Gomez-15/+16
Ignore test that fails on stage1 The error code is not emitted on stage1, so ignore this test there.
2018-08-15Rollup merge of #53342 - RalfJung:unsized-packed, r=cramertjGuillaume Gomez-1/+1
fix error for unsized packed struct field It was really confusing to be told "only the last field of a struct may have a dynamically sized type" when only the last field *was* unsized.
2018-08-15Auto merge of #53164 - davidtwco:issue-52663-span-decl-captured-variables, ↵bors-0/+57
r=nikomatsakis Provide span for declaration of captured variables Part of #52663. r? @nikomatsakis
2018-08-15Auto merge of #53133 - Zoxc:gen-int, r=eddybbors-0/+35
Record adjustments and original type for expressions in the generator interior Fixes https://github.com/rust-lang/rust/issues/50878 and https://github.com/rust-lang/rust/issues/52398. r? @eddyb
2018-08-15fix error for unsized packed struct fieldRalf Jung-1/+1
2018-08-15Auto merge of #53212 - sunjay:nll-raw-cast, r=nikomatsakisbors-0/+35
NLL - Prevent where clauses from extending the lifetime of bindings Fixes https://github.com/rust-lang/rust/issues/53123 r? @nikomatsakis
2018-08-14Ignore test that fails on stage1Matthew Jasper-15/+16
2018-08-15syntax: Enforce attribute grammar in the parserVadim Petrochenkov-28/+75
2018-08-14Auto merge of #53354 - kennytm:rollup, r=kennytmbors-0/+148
Rollup of 11 pull requests Successful merges: - #53112 (pretty print BTreeSet) - #53208 (Don't panic on std::env::vars() when env is null.) - #53226 (driver: set the syntax edition in phase 1) - #53229 (Make sure rlimit is only ever increased) - #53233 (targets: aarch64: Add bare-metal aarch64 target) - #53239 (rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.) - #53246 (A few cleanups) - #53257 (Idiomatic improvements to IP method) - #53274 (Remove statics field from CodegenCx) - #53290 (Make LLVM emit assembly comments with -Z asm-comments) - #53317 (Mark prior failure to avoid ICE)
2018-08-14Improved how upvars are detected when presenting errors using prefixes.David Wood-0/+49
2018-08-14Rollup merge of #53317 - estebank:abolish-ice, r=oli-obkkennytm-0/+45
Mark prior failure to avoid ICE Fix #53251
2018-08-14Rollup merge of #53226 - QuietMisdreavus:editions-for-all, r=estebankkennytm-0/+24
driver: set the syntax edition in phase 1 Fixes https://github.com/rust-lang/rust/issues/53203 It seems the way libsyntax handles the desired edition is to use a global, set via `syntax_pos::hygiene::set_default_edition`. Right now, this is set in the driver in `run_compiler`, which is the entry point for running the compiler all the way through to emitting files. Since rustdoc doesn't use this function, it wasn't properly setting this global. (When initially setting up editions in rustdoc, i'd assumed that setting `sessopts.edition` would have done this... `>_>`) This was "fixed" for doctests in https://github.com/rust-lang/rust/pull/52385, but rather than patching in a call to `set_default_edition` in all the places rustdoc sets up the compiler, i've instead moved the call in the driver to be farther in the process. This means that any use of `phase_1_parse_input` with the right session options will have the edition properly set without having to also remember to set libsyntax up separately. r? @rust-lang/compiler
2018-08-14Rollup merge of #53208 - BurntPizza:protect-the-environment, r=alexcrichtonkennytm-0/+29
Don't panic on std::env::vars() when env is null. Fixes #53200. Reviewer(s): * Do I need to do any `#[cfg()]` here? * Is this use of libc ok for a dev-dependency?
2018-08-14Rollup merge of #53112 - fukatani:pretty-print-btreeset, r=michaelwoeristerkennytm-0/+50
pretty print BTreeSet I want pretty printing for BTreeSet. ```rust use std::collections::*; fn main() { let mut s = BTreeSet::new(); s.insert(5); s.insert(3); s.insert(7); s.remove(&3); println!("{:?}", s); } ``` ``` (gdb) b 9 (gdb) p s $1 = BTreeSet<i32> with 2 elements = {[0] = 5, [1] = 7} ``` This is analogy of pretty printing for C++ std::set.
2018-08-14Label definition of captured variables in errors.David Wood-0/+8
2018-08-14Auto merge of #53085 - ljedrz:cleanup_syntax_structures, r=ljedrzbors-4/+5
Move SmallVector and ThinVec out of libsyntax - move `libsyntax::util::SmallVector` tests to `librustc_data_structures::small_vec` - remove `libsyntax::util::SmallVector` - move `libsyntax::util::thin_vec` to `librustc_data_structures::thin_vec` Other than moving these data structures where they belong it allows modules using `SmallVector<T>` (`SmallVec<[T; 1]>`) to specify their own length (e.g. 8 or 32) independently from `libsyntax`.
2018-08-14Auto merge of #53196 - davidtwco:compile-fail-to-ui, r=nikomatsakisbors-43/+59488
Move `compile-fail` tests to `ui` Fixes #46841, #52531, #44844. r? @nikomatsakis
2018-08-14Auto merge of #53335 - eddyb:issue-53333, r=petrochenkovbors-0/+17
rustc_resolve: crates only exist in the type namespace. Fixes #53333 by resolving `::crate_name` in `TypeNS` alone, which was overlooked in #52923 and didn't break tests, since having `use crate_name;` and a `crate_name` value in the same scope is rare.
2018-08-14Moved problematic tests on x86_64-gnu-nopt back to compile-fail.David Wood-32/+0
2018-08-14Moved problematic tests on x86_64-pc-windows-gnu back to compile-fail.David Wood-37/+54
2018-08-14Moved problematic tests on armhf-gnu back to compile-fail.David Wood-22/+0