Commit Graph

33 Commits

Author SHA1 Message Date
Vadim Petrochenkov
73c73e4a95 Stabilize unions with Copy fields and no destructor 2017-05-27 00:52:20 +03:00
gaurikholkar
5436f859e4 Disable ref hint for pattern in let and adding ui-tests. 2017-04-28 01:31:42 -07:00
Esteban Küber
1ca1483113 Point at variable moved by closure 2017-04-25 22:03:05 -07:00
Niko Matsakis
14f1e3459f fix a bug in compiletest JSON parsing for duplicate errors
In some cases, we give multiple primary spans, in which case we would
report one `//~` annotation per primary span. That was very confusing
because these things are reported to the user as a single error.

UI tests would be better here.
2017-04-11 20:32:47 -04:00
Ariel Ben-Yehuda
50728e5245 borrowck: consolidate mut suggestions
This converts all of borrowck's `mut` suggestions to a new
`mc::ImmutabilityBlame` API instead of the current mix of various hacks.

Fixes #35937.
Fixes #40823.
2017-03-27 01:37:42 +03:00
Niko Matsakis
085d71c3ef remove special-case code for statics and just use borrowck_fn
Fixes #38520
2017-02-28 08:43:47 -05:00
Wesley Wiser
94687aaf58 Removes FIXMEs related to #22405 2017-01-31 21:27:13 -05:00
Vadim Petrochenkov
ffba0cea62 Merge ty::TyBox into ty::TyAdt 2017-01-30 23:14:15 +03:00
Mikhail Modin
67a24c2e18 add hint to fix error for immutable ref in arg 2016-11-29 00:32:34 +03:00
Eduard Burtescu
9aaf26e7aa rustc: rework stability to be on-demand for type-directed lookup. 2016-11-28 04:18:11 +02:00
Mikhail Modin
a0e7e357a7 Improve "Doesn't live long enough" error
case with different lifetime with spans
2016-11-01 19:39:28 +03:00
iirelu
e593c3b893 Changed most vec! invocations to use square braces
Most of the Rust community agrees that the vec! macro is clearer when
called using square brackets [] instead of regular brackets (). Most of
these ocurrences are from before macros allowed using different types of
brackets.

There is one left unchanged in a pretty-print test, as the pretty
printer still wants it to have regular brackets.
2016-10-31 22:51:40 +00:00
Mikhail Modin
e85277596e improve "Doesn't live long enough" error 2016-10-20 22:51:51 +03:00
Vadim Petrochenkov
4a91a80b26 Fix some pretty printing tests 2016-10-18 23:23:40 +03:00
Ariel Ben-Yehuda
5c5f75223c fix test fallout 2016-09-16 16:02:43 +03:00
Vadim Petrochenkov
2a2c9d38c7 Improve shallow Clone deriving 2016-09-10 18:43:27 +03:00
Vadim Petrochenkov
93067ca089 Address comments and add requested tests 2016-09-03 13:39:35 +03:00
Jonathan Turner
439afcd974 Update error message for lifetime of borrowed values 2016-08-31 17:48:26 -07:00
Wesley Wiser
9bb8b65bdd Update E0503 to the new format
Fixes #35703
Part of #35233
2016-08-20 21:07:19 -04:00
Jonathan Turner
70ce90c320 Move 'doesn't live long enough' errors to labels 2016-08-17 15:24:42 -07:00
trixnz
7eca647e5a Update error format for E0373 2016-08-05 19:53:14 +02:00
Vadim Petrochenkov
a80d329b68 Don't gate methods Fn(Mut,Once)::call(mut,once) with feature unboxed_closures
They are already gated with feature `fn_traits`
2016-07-31 17:48:20 +03:00
Ariel Ben-Yehuda
5c717a6fc2 implement RFC495 semantics for slice patterns
non-MIR translation is still not supported for these and will happily ICE.

This is a [breaking-change] for many uses of slice_patterns.
2016-06-09 00:38:38 +03:00
Ariel Ben-Yehuda
c209d44c34 refactor autoderef to avoid registering obligations
Refactor `FnCtxt::autoderef` to use an external iterator and to not
register any obligation from the main autoderef loop, but rather to
register them after (and if) the loop successfully completes.

Fixes #24819
Fixes #25801
Fixes #27631
Fixes #31258
Fixes #31964
Fixes #32320
Fixes #33515
Fixes #33755
2016-05-25 00:03:33 +03:00
Guillaume Gomez
f22c5aab1e Rollup merge of #33676 - rkruppe:e0509-exact-words, r=sanxiyn
Reword the short diagnostic for E0509

Saying that a type *implements* a trait is much more idiomatic than saying it *defines* the trait.
2016-05-20 15:49:52 +02:00
Manish Goregaokar
8b4b3a8b09 Rollup merge of #33712 - jseyfried:fix_expanded_expr_span_bug, r=nrc
Fix bug in macro expression spans

Fix a bug in macro expression spans.
r? @nrc
2016-05-19 21:21:07 +05:30
Robin Kruppe
e575d19acc Reword the short diagnostic for E0509
Saying that a type *implements* a trait is much more idiomatic than saying it *defines* the trait.
2016-05-19 11:02:41 +02:00
Jeffrey Seyfried
f630419351 Fix bug in macro expression spans 2016-05-18 11:46:08 +00:00
Jonathan Turner
175ecfefd5 Improve a few errors and fix #33366 2016-05-17 06:46:08 -04:00
Jonathan Turner
1b6afd1e42 Update errors to use new error format 2016-05-12 16:48:59 -07:00
Niko Matsakis
e416518e68 update test cases to reflect new messages 2016-05-02 11:47:10 -04:00
Corey Farwell
abd1cea145 Stop ignoring expected note/help messages in compiletest suite.
Original issue: https://github.com/rust-lang/rust/issues/21195

Relevant PR: https://github.com/rust-lang/rust/pull/30778

Prior to this commit, if a compiletest testcase included the text
"HELP:" or "NOTE:" (note the colons), then it would indicate to the
compiletest suite that we should verify "help" and "note" expected
messages.

This commit updates this check to also check "HELP" and "NOTE" (not the
absense of colons) so that we always verify "help" and "note" expected
messages.
2016-03-16 21:53:58 -04:00
Niko Matsakis
6660ad6f8d Move the borrowck run-pass/compile-fail tests into their own directories
as a test.
2016-02-24 18:40:39 -05:00