Commit Graph

45945 Commits

Author SHA1 Message Date
Nathan Kleyn
9c0d2b2465 Add detailed diagnostics for E0383.
This adds detailed diagnostics for E0383, 'partial reinitialization of
uninitialized structure'.

This is part of rust-lang/rust#24407.
2015-08-13 09:06:29 +01:00
bors
ea3cd022ef Auto merge of #27762 - alexcrichton:fix-libc, r=aturon
The corrected signature of `ioctl` broke some crates on crates.io, and it's not
currently worth the major version bump of libc, so for now keep the old
signature around for crates.io builds only with a comment to remove it at a
future date.

This should allow libc on crates.io to update to the master version in-tree.
I've verified that this was the only breakage of substance between the version
libc is currently built with and today's master branch.
2015-08-13 07:07:34 +00:00
bors
2da80ef114 Auto merge of #27693 - nagisa:remutex-docs, r=alexcrichton
Initial version of PR had an DerefMut implementation, which was later removed
because it may cause mutable reference aliasing.

Suggest how to implement mutability with reentrant mutex and remove the claim we
implement DerefMut.
2015-08-13 05:30:13 +00:00
bors
b2aef9d58b Auto merge of #27789 - chriskrycho:remove_pandoc_references, r=steveklabnik
Per @steveklabnik's comment [here](https://github.com/rust-lang/cargo/issues/739#issuecomment-130085860), the Pandoc components of the Makefile are no longer used, and as such the corresponding components of the documentation are out of date.

  - I've removed the Pandoc (and therefore also LaTeX) elements of the makefile and confirmed that the build proceeds correctly.
  - I updated the documentation to reference `rustdoc` and  of Pandoc.

r? @steveklabnik
2015-08-13 03:52:10 +00:00
Chris Krycho
75f7a68ffa doc/readme: replace references to Pandoc with rustdoc. 2015-08-12 22:29:05 -04:00
bors
aed55dcd57 Auto merge of #27763 - wthrowe:debug-docs, r=alexcrichton
When --cfg ndebug changed to -C debug-assertions the documentation was
updated to reflect the new name, but not that the meaning was
reversed.
2015-08-13 02:10:28 +00:00
Niko Matsakis
33200a369a expr_use_visitor: Remove FIXME that is no longer needed (and in fact
causes errors, post rebase). Issue #27592 is still alive and well,
whatever it is.
2015-08-12 20:59:01 -04:00
Niko Matsakis
e1fa00bced add regression test for #27592. Fixes #27592. 2015-08-12 20:58:47 -04:00
bors
021389f6ad Auto merge of #27652 - alex-ozdemir:iter, r=bluss
Provides a custom implementation of Iterator methods `count`, `nth`, and `last` for the structures `slice::{Windows,Chunks,ChunksMut}` in the core module.

These implementations run in constant time as opposed to the default implementations which run in linear time.

Addresses Issue #24214 

r? @aturon
2015-08-13 00:26:29 +00:00
William Throwe
43f6c2fab7 Correct debug! documentation
When --cfg ndebug changed to -C debug-assertions the documentation was
updated to reflect the new name, but not that the meaning was
reversed.
2015-08-12 19:19:31 -04:00
William Throwe
904e428dba Whitelist .pp files in tidy-binaries
Pretty-printed files sometimes start with #![some_feature], which
looks like a shebang line and confuses Windows builds into thinking
they are executables.
2015-08-12 19:08:22 -04:00
bors
82169afba7 Auto merge of #27698 - arielb1:foreign-type-import, r=alexcrichton
Fixes #22968
Probably fixes #27602 (the issue needs a reproduction)

r? @alexcrichton
2015-08-12 22:42:12 +00:00
Alex Crichton
872f8c3234 libc: Fix backcompat with crates.io version
The corrected signature of `ioctl` broke some crates on crates.io, and it's not
currently worth the major version bump of libc, so for now keep the old
signature around for crates.io builds only with a comment to remove it at a
future date.

This should allow libc on crates.io to update to the master version in-tree.
I've verified that this was the only breakage of substance between the version
libc is currently built with and today's master branch.
2015-08-12 15:32:36 -07:00
Niko Matsakis
9f3f69efab regionck.rs: experimentally adopt a more conservative strategy for
projection outlives relations that prefers not to add extract edges to
region graph
2015-08-12 17:58:58 -04:00
Niko Matsakis
ad700abea4 ty.rs: document/cleanup required_region_bounds a bit 2015-08-12 17:58:58 -04:00
Niko Matsakis
fda9b83960 regionck.rs: add a delayed_span_bug call to validate an asserrtion 2015-08-12 17:58:58 -04:00
Niko Matsakis
213326cddd outlives.rs: correct typo 2015-08-12 17:58:58 -04:00
Niko Matsakis
c106dd449c traits/error_reporting.rs: always note obligation cause 2015-08-12 17:58:58 -04:00
Niko Matsakis
157422a0c7 Update test error messages based on changes to wfcheck; also, break
apart the tests that tested many things at once.
2015-08-12 17:58:58 -04:00
Niko Matsakis
2b2a113638 check/wf.rs: change to use correct span and older WF algorithm;
at the time I reinstituted the old code, I hadn't given up yet and
brought back the implicator.
2015-08-12 17:58:58 -04:00
Niko Matsakis
a7c9a15e0e outlives.rs: remove use of ty.walk and replace with recursive of
ty.walk_shallow, add add'l comments.
2015-08-12 17:58:58 -04:00
Niko Matsakis
a264440ab0 outlives: convert outlives to use an exhaustive match, for better
reliability.
2015-08-12 17:58:57 -04:00
Niko Matsakis
9c5cfea43d traits: consider whether origin is RFC1214 when caching, ensuring
that the test rfc1214-warn-and-error.rs reports an error
2015-08-12 17:58:57 -04:00
Niko Matsakis
fb1b6fca36 regionck.rs: correct misuse of ty.regions() rather than regions()
and add a test that was (incorrectly) failing to compile with
existing code
2015-08-12 17:58:57 -04:00
Niko Matsakis
c9a49f93ac regionck.rs: remove dead fn type_strictly_outlives 2015-08-12 17:58:57 -04:00
Niko Matsakis
9c3a8664b6 middle/outlives.rs: s/temp/subcomponents/ 2015-08-12 17:58:57 -04:00
Niko Matsakis
0582fed63f middle/outlives.rs: fix typo 2015-08-12 17:58:57 -04:00
Niko Matsakis
b7e849bf6a infer/mod.rs: add doc comment to RFC1214 variant 2015-08-12 17:58:57 -04:00
Niko Matsakis
ff39ee9a90 wip 082a011e2bd5c8254e6c1b2fdc97a6fcb2927a7f rm binary 2015-08-12 17:58:57 -04:00
Niko Matsakis
7ed39c6d9b Fallout in tests -- explain an interesting test failure having to
do with dropck and the new outlives rules
2015-08-12 17:58:57 -04:00
Niko Matsakis
dee8b54b71 Fallout in tests --- misc error message changes, WF fixes 2015-08-12 17:58:57 -04:00
Niko Matsakis
f4aaedb51e Fallout in tests -- break test into a run-pass and compile-fail component 2015-08-12 17:58:56 -04:00
Niko Matsakis
532fcb250f Fallout in tests -- break this test into three tests, since we later saw
staging differences in terms of when errors were reported
2015-08-12 17:58:56 -04:00
Niko Matsakis
92d16d961d Fallout in tests -- break the object safety part into a separate file because error
will be in future reported by wfcheck, which runs in a later stage than
coherence
2015-08-12 17:58:56 -04:00
Niko Matsakis
09bf2fef22 Fallout in tests -- we now report an error if you even reference a type
`&Foo` where `Foo` is a trait that is not object-safe
2015-08-12 17:58:56 -04:00
Niko Matsakis
d15d743fa8 Add FIXME for apparent stage0 regression 2015-08-12 17:58:56 -04:00
Niko Matsakis
91b3e9cac0 Fallout in libs -- misc missing bounds uncovered by WF checks. 2015-08-12 17:58:56 -04:00
Niko Matsakis
788a802dad New tests --- projection outlives relation 2015-08-12 17:58:22 -04:00
Niko Matsakis
d159977502 Generalize the outlives rule for projections to handle the new cases;
also, generalize VerifyBounds to include OR conditions.
2015-08-12 17:58:22 -04:00
Niko Matsakis
75ee8f1562 Introduce a "origin/cause" for new requirements (or bugfixes...) introduced by RFC 1214,
and issue a warning (and explanatory note) when we encounter such a
thing.
2015-08-12 17:58:22 -04:00
Niko Matsakis
39d164d042 New tests --- check that wf relation is being checked in various positions 2015-08-12 17:57:58 -04:00
Niko Matsakis
6bb1e22911 New WF condition requires checking that argument types are WF
on every call. This ensures that implies bounds are reasonable
(the older code only checked that the values provided had WF types, but
we also must know that the formal types of the arguments are WF.)
2015-08-12 17:57:58 -04:00
Niko Matsakis
8d98877112 Implement a new wfcheck to replace the old wf; this new code only issues
warnings. It also checks more conditions than the old code.  Keep the
old wf code around unchanged so that we can continue to issue errors for
the cases where we used to report errors.

As part of this, remove the where-clauses-must-reference-parameter rule,
which is easily circumvented.
2015-08-12 17:57:58 -04:00
Niko Matsakis
ad47bd8a0f Extend ParameterEnvironment to remember the free_id, and to be usable
on more kind of items
2015-08-12 17:57:57 -04:00
Niko Matsakis
b1963154a1 Add two new kinds of predicates, WellFormed and ObjectSafe. 2015-08-12 17:57:57 -04:00
Niko Matsakis
928955296e Define the wf and outlives relation separately, unlike the existing
`implicator`. These definitions are also in accordance with RFC 1214 (or
more so), and hence somewhat different from the implicator. This commit
also modifies the implicator to remove the older rules for projections,
which can easily trigger infinite loops.
2015-08-12 17:57:57 -04:00
Niko Matsakis
4561607403 Don't report a hard error if there are inference failures until
after we check casts, because sometimes casts can influence inference,
unfortunately. We do re-run `select_all_trait_obligations` during
regionck anyhow.
2015-08-12 17:57:57 -04:00
Alex Crichton
8d90d3f368 Remove all unstable deprecated functionality
This commit removes all unstable and deprecated functions in the standard
library. A release was recently cut (1.3) which makes this a good time for some
spring cleaning of the deprecated functions.
2015-08-12 14:55:17 -07:00
bors
6a5c4e77a8 Auto merge of #27691 - jonas-schievink:for-macro, r=alexcrichton
Closes #27004
2015-08-12 20:58:31 +00:00
Alisdair Owens
b7e009b386 Add long diagnostics for E0366 and E0367 2015-08-12 20:50:49 +01:00