Commit Graph

41464 Commits

Author SHA1 Message Date
Michael Sproul
6d2b6d5a19 Enforce 80 char lines in extended errors. 2015-04-17 21:35:24 +10:00
Michael Sproul
c54f43a5d1 Update/add messages for E0{267,268,296,303}. 2015-04-17 21:35:24 +10:00
Michael Sproul
dd5eed4b81 Validate format of extended error descriptions. 2015-04-17 21:30:41 +10:00
bors
b7fb57529a Auto merge of #24512 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #23782, #24455, #24490, #24493, #24494, #24496, #24498, #24499, #24501, #24502, #24506, #24507, #24508, #24509, #24510
- Failed merges: #24488
2015-04-17 05:52:35 +00:00
Ryan Prichard
317eac3277 Call write_fmt directly to format an Arguments value.
It's just as convenient, but it's much faster. Using write! requires an
extra call to fmt::write and a extra dynamically dispatched call to
Arguments' Display format function.
2015-04-16 21:49:53 -07:00
bors
7fbedc58e3 Auto merge of #24422 - pnkfelix:typeck-highlevel-before-bodies, r=nikomatsakis
typeck: Do high-level structural/signature checks before function body checks.

This avoids various ICEs, e.g. premature calls to cat_expr that yield the dreaded "cat_expr Errd" ICE.

However, it also means that some early error feedback is now not provided.  This may be for the best, because the error feedback were were providing in some of those cases were false positives -- it was spurious feedback and a distraction from the real problem.

So it is not 100% clear whether we actually want to put this change in or not.  I think its a net win, but others might disagree.

(Kudos to @arielb1 for suggesting this modification.)
2015-04-17 03:50:30 +00:00
Florian Hartwig
a4be1ec140 Fix broken links in the docs 2015-04-16 23:50:16 -04:00
Steve Klabnik
525a1462b5 Descripe tuple indexing in TRPL
FIxes #23962
2015-04-16 23:50:16 -04:00
Steve Klabnik
dc4554a9b3 Make note of documentation tests and binaries
Fixes #24228
2015-04-16 23:50:16 -04:00
Steve Klabnik
a2ccc81f4b remove example usage of from_str in error docs
Fixes #24185
2015-04-16 23:50:16 -04:00
Steve Klabnik
3ca83a79bf Make note of possible XSS in Rustdoc
Fixes #24160
2015-04-16 23:50:12 -04:00
Steve Klabnik
d9515ad40f Link up some stuff in the vectors chapter
Fixes #24070

or rather, fixes it even though it's already been fixed: slices are before now. But the linking is nice anyway.
2015-04-16 23:17:36 -04:00
Krzysztof Drewniak
f64510d72b Suppress improper_ctypes warnings when compiling liballoc with external_features 2015-04-16 21:34:12 -05:00
Steve Klabnik
00a8d65ef3 document missing attributes in the reference
Fixes #24406
2015-04-16 22:23:37 -04:00
Corey Farwell
3908bae77b Indicate None is code-like in doc comments 2015-04-16 22:23:37 -04:00
Philip Munksgaard
35a4100af0 Add Debug to MethodCallee
This fixes #24497
2015-04-16 22:23:37 -04:00
Florian Hartwig
16b60cf003 Fix some broken links in the book 2015-04-16 22:23:37 -04:00
Aram Visser
ff1dcba342 Fixed typo in hash_map::Entry documentation 2015-04-16 22:23:37 -04:00
Mathijs van de Nes
32956cb565 Use BTreeMap in build_sidebar_items
This ensures that later when generating HTML, the JSON will be sorted aswell.
We now have a deterministic build of sidebar-items.js
2015-04-16 22:23:37 -04:00
Ting-Yu Lin
e12671b4d7 Fix link id for stackoverflow
The document does not display properly if the link id contains a space.
2015-04-16 22:23:36 -04:00
Luke Gallagher
6d36714633 Fix some documentation typos 2015-04-16 22:23:36 -04:00
Chris Wong
0e4a77bbfe rustc: Add long diagnostics for E0306 and E0307 2015-04-16 22:23:36 -04:00
Chris Wong
77e8ddfaf3 rustc: Add long diagnostics for E0170 2015-04-16 22:23:36 -04:00
Chris Wong
aaf92f04d1 rustc: Add long diagnostics for E0161 2015-04-16 22:23:36 -04:00
Chris Wong
c08facfcfd rustc: Add long diagnostics for E0158 2015-04-16 22:23:36 -04:00
Chris Wong
521ae488db rustc: Add long diagnostics for E0152 2015-04-16 22:23:36 -04:00
Mathijs van de Nes
0afdab11ec Omit 'obsolete' note for warning if -Awarning 2015-04-16 22:23:36 -04:00
bors
a52182ffde Auto merge of #24420 - pnkfelix:oflo-api, r=alexcrichton
Fill in missing parts of Integer overflow API 

See todo list at #22020
2015-04-17 00:28:48 +00:00
Felix S. Klock II
4f67850964 Fix test for 32-bit targets.
(The cast from the 64-bit value to isize was using the lower 32-bits,
which led to it being treated as a large positive value rather than a
smallish negative one. The fix was to use the same bits for the upper-
and lower- 32 bits.)
2015-04-17 02:03:38 +02:00
Nelo Onyiah
d04b2047a7 Update hello-cargo.md 2015-04-17 00:02:17 +01:00
kwantam
29d1252e4d deprecate Unicode functions that will be moved to crates.io
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-16 17:03:05 -04:00
bors
1014ac44f6 Auto merge of #24396 - alexcrichton:rustdoc2, r=aturon
A few final improvements to rustdoc for 1.0:

* Improve how rustdoc handles stability
* Fix cross-crate macro source links
* Improve experience of types inheriting methods through `Deref`

Some more details can be found in the commits.

[Preview](http://people.mozilla.org/~acrichton/doc/std/)
2015-04-16 20:34:55 +00:00
Alex Crichton
71c1b5b704 rustdoc: Inline methods inhereted through Deref
Whenever a type implements Deref, rustdoc will now add a section to the "methods
available" sections for "Methods from Deref<Target=Foo>", listing all the
inherent methods of the type `Foo`.

Closes #19190
2015-04-16 13:28:15 -07:00
Florian Hartwig
6ac836f229 Fix broken links in the docs 2015-04-16 22:15:36 +02:00
Steve Klabnik
dabc4864c0 Descripe tuple indexing in TRPL
FIxes #23962
2015-04-16 16:12:47 -04:00
Steve Klabnik
c776d02d5d Make note of documentation tests and binaries
Fixes #24228
2015-04-16 15:55:10 -04:00
Steve Klabnik
e6f1a4db5f remove example usage of from_str in error docs
Fixes #24185
2015-04-16 15:50:24 -04:00
Mathijs van de Nes
6de33c22e3 Omit 'obsolete' note for warning if -Awarning 2015-04-16 19:53:19 +02:00
Alex Crichton
8fb31f75c9 rustdoc: Fix cross-crate macro source links
The source filename for cross crate macros isn't quite right so the normal
generated links are invalid.

Closes #21311
2015-04-16 09:44:33 -07:00
Alex Crichton
0a46933c4d rustdoc: Overhaul stability displays
This commit is an overhaul to how rustdoc deals with stability of the standard
library. The handling has all been revisited with respect to Rust's current
approach to stability in terms of implementation as well as the state of the
standard library today. The high level changes made were:

* Stable items now have no marker by default
* Color-based small stability markers have been removed
* Module listings now fade out unstable/deprecated items slightly
* Trait methods have a separate background color based on stability and also
  list the reason that they are unstable.
* `impl` blocks with stability no longer render at all. This may be re-added
  once the compiler recognizes stability on `impl` blocks.
* `impl` blocks no longer have stability of the methods implemente indicated
* The stability summary has been removed

Closes #15468
Closes #21674
Closes #24201
2015-04-16 09:44:33 -07:00
Corey Farwell
1c6ccd96ac Indicate None is code-like in doc comments 2015-04-16 11:53:17 -04:00
bors
e9080ec39d Auto merge of #24181 - jgallagher:aarch64-hfa, r=pnkfelix
I doubt this PR is ready to merge as-is, for a couple reasons:

* There are no tests for this change. I'm not sure how to add tests for this change, as it modifies the C ABI for a cross-compilation target. Anecdotally, I have an iOS library I've been working on, and before this change, it crashes running on an arm64 device due to bad calling conventions (a simplified example is in #24154), and after this change, it runs correctly.
* This is my first foray into LLVM. I did my best to reimplement what Clang does for AArch64 codegen (https://github.com/llvm-mirror/clang/blob/master/lib/CodeGen/TargetInfo.cpp), particularly in `ABIInfo::isHomogeneousAggregate`, `AArch64ABIInfo::isHomogeneousAggregateBaseType`, and `AArch64ABIInfo::isHomogeneousAggregateSmallEnough`, but I'm not confident I got a complete translation, particularly because Clang includes a lot of checks that I don't believe are necessary for rustc.

Fixes #24154.
2015-04-16 15:33:54 +00:00
Philip Munksgaard
4436ade8ad Add Debug to MethodCallee
This fixes #24497
2015-04-16 16:00:47 +02:00
bors
5576b0558c Auto merge of #24448 - alexcrichton:issue-24445, r=huonw
One of the parameters to the magical "register a thread-local destructor"
function is called `__dso_handle` and largely just passed along (this seems to
be what other implementations do). Currently we pass the *value* of this symbol,
but apparently the correct piece of information to pass is the *address* of the
symbol.

In a PIE binary the symbol actually contains an address to itself which is why
we've gotten away with what we're doing as long as we have. In a non-PIE binary
the symbol contains the address `NULL`, causing a segfault in the runtime
library if it keeps going.

Closes #24445
2015-04-16 13:29:52 +00:00
Florian Hartwig
f20497ca85 Fix some broken links in the book 2015-04-16 15:13:47 +02:00
Thomas Jespersen
c0139cafcd Remove & from redirected output
This seems to fix the test
2015-04-16 14:57:31 +02:00
Aram Visser
d40e1cbfd8 Fixed typo in hash_map::Entry documentation 2015-04-16 19:21:11 +07:00
bors
ac2b6f6066 Auto merge of #24437 - fhahn:issue-24434, r=alexcrichton
closes #24434 

This PR changes executes `syntax::config::strip_unconfigured_items` before `syntax::feature_gate::check_crate_macros(sess.codemap()`. As far as I know, `strip_unconfigured_items` should be independent of `check_crate_macros`.
2015-04-16 11:27:52 +00:00
Mathijs van de Nes
61ad9fe1a3 Use BTreeMap in build_sidebar_items
This ensures that later when generating HTML, the JSON will be sorted aswell.
We now have a deterministic build of sidebar-items.js
2015-04-16 12:14:45 +02:00
Ting-Yu Lin
7d56fb2149 Fix link id for stackoverflow
The document does not display properly if the link id contains a space.
2015-04-16 17:42:03 +08:00