varkor
838997236e
Add singleton patterns to test
2018-08-16 20:09:05 +01:00
varkor
7f72030421
Fix range splitting
2018-08-16 20:09:04 +01:00
varkor
a20cb1084a
Require just the Unicode Scalar Values to be matched for a char
2018-08-16 20:09:04 +01:00
varkor
7476ba4c8a
Add semi-exhaustive tests for exhaustiveness
2018-08-16 20:09:04 +01:00
varkor
b8702a0b1d
Add feature gate test
2018-08-16 20:09:04 +01:00
bors
5050349749
Auto merge of #53256 - ollie27:writeln, r=KodrAus
...
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-16 13:29:40 +00:00
bors
142bb27373
Auto merge of #53147 - ashtneoi:dont-suggest-ref, r=estebank
...
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-16 08:45:32 +00:00
bors
996e26c23f
Auto merge of #53295 - estebank:on-unimplemented, r=michaelwoerister
...
Various changes to `rustc_on_unimplemented`
- Add `from_method` and `from_desugaring` to formatting options
- Change wording of errors slightly
2018-08-16 06:34:13 +00:00
ashtneoi
0023dd9ba1
Split tests more and bless them again
2018-08-15 22:36:19 -07:00
ashtneoi
f335fb08c2
Move tests into their own directory
2018-08-15 22:35:56 -07:00
bors
fc323ba160
Auto merge of #53293 - petrochenkov:gramattr2, r=alexcrichton
...
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-16 04:16:12 +00:00
ashtneoi
f4229b81b5
Re-bless test
2018-08-15 15:25:53 -07:00
ashtneoi
4c4e1ef2c5
Add files I forgot to commit earlier
2018-08-15 15:14:21 -07:00
ashtneoi
bd2b54c23c
Bless tests
2018-08-15 15:14:21 -07:00
ashtneoi
a5b008c450
Test move-into-Fn/FnMut errors too
2018-08-15 15:14:21 -07:00
ashtneoi
81c27c6af7
Add another FIXME about suggestions
2018-08-15 15:14:21 -07:00
ashtneoi
9a0020a879
Bless UI tests
2018-08-15 15:14:21 -07:00
ashtneoi
0a82abc47b
Test patterns in tuples
2018-08-15 15:14:21 -07:00
ashtneoi
6cf4e14ac0
Coalesce var-is-not-Copy notes per move
2018-08-15 15:14:21 -07:00
ashtneoi
20ae08bda6
Dedup suggestions
2018-08-15 15:14:21 -07:00
ashtneoi
40b5118c8a
Remove unnecessary underscore
2018-08-15 15:14:21 -07:00
ashtneoi
8135372ed1
Change TODOs to FIXMEs
2018-08-15 15:14:21 -07:00
ashtneoi
10aaba8dbe
Make move errors more consistent with typeck errors
2018-08-15 15:14:21 -07:00
ashtneoi
701c74e067
Make move error suggestions clearer
2018-08-15 15:14:21 -07:00
ashtneoi
b05e9a7f77
Add backquotes around variable name
2018-08-15 15:14:21 -07:00
ashtneoi
8080bdf275
Fix move errors for index expressions
...
The suggestion logic gave up too early, which kept it from suggesting
borrowing index expressions.
2018-08-15 15:14:21 -07:00
ashtneoi
54ddb36ce7
Test move errors for index expressions
2018-08-15 15:14:21 -07:00
ashtneoi
3a5812bdd9
Add more TODOs
2018-08-15 15:14:21 -07:00
ashtneoi
a05f82fd2d
Suggest match ergonomics, not ref/ref mut
2018-08-15 15:14:21 -07:00
bors
d767ee1161
Auto merge of #53400 - GuillaumeGomez:rollup, r=GuillaumeGomez
...
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-15 19:39:54 +00:00
Guillaume Gomez
a9a67a3a76
Rollup merge of #53368 - matthewjasper:only-stage-2, r=varkor
...
Ignore test that fails on stage1
The error code is not emitted on stage1, so ignore this test there.
2018-08-15 19:20:26 +02:00
bors
d679b57a3a
Auto merge of #53164 - davidtwco:issue-52663-span-decl-captured-variables, r=nikomatsakis
...
Provide span for declaration of captured variables
Part of #52663 .
r? @nikomatsakis
2018-08-15 17:03:39 +00:00
Ralf Jung
2fd2f9cfaf
fix error for unsized packed struct field
2018-08-15 10:53:26 +02:00
Matthew Jasper
0e43e6fef2
Ignore test that fails on stage1
2018-08-14 22:42:16 +01:00
Vadim Petrochenkov
097c40cf6e
syntax: Enforce attribute grammar in the parser
2018-08-15 00:05:55 +03:00
David Wood
5532e9dec5
Improved how upvars are detected when presenting errors using prefixes.
2018-08-14 18:38:57 +02:00
kennytm
8e7f69af9c
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
...
Mark prior failure to avoid ICE
Fix #53251
2018-08-14 23:59:17 +08:00
David Wood
2c6b0e5cf7
Label definition of captured variables in errors.
2018-08-14 17:36:03 +02:00
David Wood
7b026568f7
Moved problematic tests on x86_64-gnu-nopt back to compile-fail.
2018-08-14 11:12:13 +02:00
David Wood
d775e6132c
Moved problematic tests on x86_64-pc-windows-gnu back to compile-fail.
2018-08-14 11:12:12 +02:00
David Wood
67ec37b608
Moved problematic tests on armhf-gnu back to compile-fail.
2018-08-14 11:12:12 +02:00
David Wood
4b2464592c
Moved problematic tests on wasm32-unknown back to compile-fail.
2018-08-14 11:12:12 +02:00
David Wood
f7f7c1eef3
Moved problematic tests on dist-x86_64-musl back to compile-fail.
2018-08-14 11:12:12 +02:00
David Wood
b8b7a3c30e
Moved problematic tests on i586-unknown-linux-gnu back to compile-fail.
2018-08-14 11:12:12 +02:00
David Wood
768998a8de
Normalize tests for i686 Windows.
2018-08-14 11:12:11 +02:00
David Wood
cd12c82210
Fixed 'no such file or directory' mismatch between Windows and Linux.
2018-08-14 11:12:11 +02:00
David Wood
0cfc17358a
Moved problematic tests on Windows back to compile-fail.
2018-08-14 11:12:11 +02:00
David Wood
a922642455
Moved tests back to compile-test if they don't work on ui.
2018-08-14 11:12:11 +02:00
David Wood
7c13eb42d4
Fix no-link-with-link-args by introducing another normalization.
2018-08-14 11:12:10 +02:00
David Wood
003b5a8b0f
Normalize crateresolve1.rs to support different candidate ordering between executions.
2018-08-14 11:12:10 +02:00