Commit Graph

48422 Commits

Author SHA1 Message Date
Bhargav Patel
968adb287a Merge pull request #1 from bhargavrpatel/master-stack-heap-verbiage-change
Change verbiage in Stack & Heap page
2015-11-29 22:18:34 -05:00
Bhargav Patel
7a93a3a821 Change verbiage in Stack & Heap page
Made a small change in the sentence. It seemed confusing to read the word "actual" twice in the sentence; I removed it completely.
2015-11-29 22:18:13 -05:00
bors
52d95e6448 Auto merge of #30101 - istankovic:fix-typos, r=steveklabnik
Fix some typos in the docs for Peekable.

r? @steveklabnik
2015-11-30 00:41:13 +00:00
bors
b22d7a5d2f Auto merge of #29976 - GuillaumeGomez:patch-5, r=Manishearth
r? @Manishearth
2015-11-29 22:54:43 +00:00
bors
15ad1d199b Auto merge of #30088 - sourcefrog:doc-casts, r=steveklabnik
Based on the description in 219eca11b0/src/librustc_typeck/check/cast.rs (L11) and https://doc.rust-lang.org/nightly/nomicon/casts.html
2015-11-29 21:10:36 +00:00
Martin Pool
797d5433c9 Rephrased description of casting 2015-11-29 12:00:07 -08:00
Martin Pool
34e6995aa3 Add information about numeric casts, from the nomicon 2015-11-29 11:54:29 -08:00
bors
4867df4a23 Auto merge of #30100 - jFransham:patch-1, r=steveklabnik
Fixes #30093 in the most trivial possible way.
2015-11-29 18:13:17 +00:00
bors
3db9bee903 Auto merge of #30059 - androm3da:master, r=bluss 2015-11-29 16:30:15 +00:00
Ivan Stankovic
0cd923ee06 libcore/iter: fix typos 2015-11-29 14:52:29 +01:00
Jack Fransham
6a56147a86 Fix #30093 2015-11-29 13:36:01 +00:00
bors
323781cdf7 Auto merge of #30075 - kyeah:mac-span, r=sanxiyn
Fixes #28424 (item macros), #30067 (impl item macros), and pattern macros.
2015-11-29 06:00:05 +00:00
Kevin Yeh
920120ed4c Use last_span for macro spans 2015-11-28 23:54:54 -06:00
Guillaume Gomez
483656b606 Add E0492 error explanation 2015-11-29 01:23:24 +01:00
bors
7499558dd0 Auto merge of #30092 - semarie:to_socket_addr_str_bad, r=alexcrichton
I don't reproduce it on severals hosts (virtual or real), so I can't
debug it. As Bitrig has disabled this test too, I will follow the same
here.

r? @alexcrichton
2015-11-28 19:57:45 +00:00
bors
0b3424321c Auto merge of #29651 - tshepang:misc, r=steveklabnik 2015-11-28 18:09:07 +00:00
bors
5ea65c03d9 Auto merge of #30074 - jonas-schievink:macro-doc, r=sanxiyn
Fixes #17616

New docs for `panic!`:
```rust
macro_rules! panic {
    () => { ... };
    ($msg:expr) => { ... };
    ($fmt:expr, $($arg:tt)+) => { ... };
}
```

New docs for `assert!`:
```rust
macro_rules! assert {
    ( $ cond : expr ) => { ... };
    (
$ cond : expr , $ ( $ arg : tt ) + ) => { ... };
}
```
<sup>not pretty, but at least it's not worse 😂
2015-11-28 16:22:27 +00:00
Jonas Schievink
ff339bd6f9 Add a test 2015-11-28 14:47:12 +01:00
bors
9e05951f1f Auto merge of #30091 - vyp:doc-typo, r=bluss 2015-11-28 13:39:21 +00:00
Sébastien Marie
6a7733a358 disable net::addr::to_socket_addr_str_bad test under openbsd
I don't reproduce it on severals hosts (virtual or real), so I can't
debug it. As Bitrig has disabled this test too, I will follow the same
here.
2015-11-28 09:10:48 +01:00
xd1le
fb5f3faa6b doc(book/ffi): remove duplicate link reference `[libc]' 2015-11-28 16:58:39 +11:00
Guillaume Gomez
1904b333eb Add E0498 error explanation 2015-11-28 06:19:47 +01:00
Martin Pool
d6952121e0 Attempted documentation of coercions
Trying to summarize here only the cases that will make sense at the
level of the rust book
2015-11-27 17:35:12 -08:00
Martin Pool
f34e6ff084 Copy in some documentation about which casts are legal 2015-11-27 17:15:05 -08:00
bors
e9ac44026d Auto merge of #29383 - petrochenkov:empstr, r=pnkfelix
Fixes https://github.com/rust-lang/rust/issues/28692
Fixes https://github.com/rust-lang/rust/issues/28992
Fixes some other similar issues (see the tests)

[breaking-change], needs crater run (cc @brson or @alexcrichton )

The pattern with parens `UnitVariant(..)` for unit variants seems to be popular in rustc (see the second commit), but mostly used by one person (@nikomatsakis), according to git blame. If it causes breakage on crates.io I'll add an exceptional case for it.
2015-11-28 00:45:34 +00:00
bors
bac2b13a5a Auto merge of #30085 - oli-obk:fix/pnkfelix_test, r=pnkfelix
for discussion see https://github.com/rust-lang/rust/pull/26848/files#r43151926

r? @pnkfelix
2015-11-27 20:39:28 +00:00
bors
5dc91a74b1 Auto merge of #30064 - fhartwig:macro-suggestions, r=sanxiyn
Fixes #13677
This does the same sort of suggestion for misspelt macros that we already do for misspelt identifiers.
Example. Compiling this program:

```rust
macro_rules! foo {
    ($e:expr) => ( $e )
}

fn main() {
    fob!("hello!");
}
```

gives the following error message:

```
/Users/mcp/temp/test.rs:7:5: 7:8 error: macro undefined: 'fob!'
/Users/mcp/temp/test.rs:7     fob!("hello!");
                              ^~~
/Users/mcp/temp/test.rs:7:5: 7:8 help: did you mean `foo`?
/Users/mcp/temp/test.rs:7     fob!("hello!");
```

I had to move the levenshtein distance function into libsyntax for this. Maybe this should live somewhere else (some utility crate?), but I couldn't find a crate to put it in that is imported by libsyntax and the other rustc crates.
2015-11-27 18:41:53 +00:00
Florian Hartwig
4bb7cf11dc Introduce max_suggestion_distance function to avoid duplicating the heuristic 2015-11-27 17:52:29 +01:00
ebadf
797a0bd1c1 Shifted focus of while-let example per review. 2015-11-27 10:23:58 -06:00
bors
ca6365037f Auto merge of #30082 - semarie:execve, r=alexcrichton
under OpenBSD and Bitrig, it is an error to pass an empty argv
argument to execve(2). It results the test fail as execve(2) don't exec
and set errno to EINVAL.

instead, make argv with two arguments (in order to differenciate the
initial call, from the execve call).

r? @alexcrichton
2015-11-27 15:55:05 +00:00
Oliver Schneider
5951418c66 revert test to check runtime evaluation instead of constant evaluation
see https://github.com/rust-lang/rust/pull/26848/files#r43151926
2015-11-27 16:46:11 +01:00
Sébastien Marie
efc17a598c pass at least one argument to execve
under OpenBSD and Bitrig, it is an error to pass an empty argv
argument to execve(2). It results the test fail as execve(2) don't exec
and set errno to EINVAL.

instead, make argv with two arguments (in order to differenciate the
initial call, from the execve call).
2015-11-27 13:48:07 +01:00
bors
e5aa92a0df Auto merge of #30071 - brson:netbsd, r=alexcrichton
Depends on https://github.com/rust-lang/rust/pull/30015 since this branch includes `#[staged_api]` changes.
2015-11-27 01:48:12 +00:00
Brian Anderson
a7cd514d80 Update libc. Fixes netbsd. 2015-11-26 17:47:13 -08:00
bors
1727dee167 Auto merge of #30077 - nrc:save-abs-crate, r=eddyb 2015-11-26 22:04:06 +00:00
Kevin Yeh
b4295b9fb0 Fix spans for macros 2015-11-26 14:38:45 -06:00
Jonas Schievink
0c8039f10b ; 2015-11-26 21:10:04 +01:00
bors
8baaf0ad07 Auto merge of #30068 - wthrowe:unsized-pointer-impls, r=alexcrichton
I'm pretty sure this code isn't actually used by the compiler, so this
is effectively a documentation change.
2015-11-26 20:07:05 +00:00
bors
6ef02eff89 Auto merge of #30043 - arielb1:split-metadata, r=nikomatsakis
This improves bootstrap times because of better parallelism - though I need to measure how much - and allows metadata to be modified without triggering a full recompile. This also ensures that metadata handling and the rest of rustc remain decoupled, which is a first step for switching to a new metadata format.

This is a [breaking-change] to all plugin authors because of the following renames:
 * `rustc::plugin` is now `rustc_plugin`
 * `rustc::metadata` is now `rustc_metadata`
 * Most data types from `rustc::metadata`, along with `LOCAL_CRATE`, are now in `rustc::middle::cstore`.
 * The CStore methods were split between the `rustc::middle::CrateStore` trait (and trait object) and the `rustc_metadata::cstore::CStore`, with an `Rc<CrateStore>` stored in the `Session`. The inner `CStore` can be accessed via the inner `Any` bound, but this is deprecated.

r? @nikomatsakis
2015-11-26 18:20:58 +00:00
Jonas Schievink
ce97479a15 rustdoc: only show macro arm's lhs 2015-11-26 19:14:36 +01:00
Ariel Ben-Yehuda
43a6deb95f fix rustc-test 2015-11-26 19:19:54 +02:00
Ariel Ben-Yehuda
4190dce3a7 fix tidy 2015-11-26 18:22:40 +02:00
Ariel Ben-Yehuda
52dd2b4c35 fix tests & rustdoc 2015-11-26 18:22:40 +02:00
Ariel Ben-Yehuda
0a8bb4c509 split the metadata code into rustc_metadata
tests & rustdoc still broken
2015-11-26 18:22:40 +02:00
Ariel Ben-Yehuda
1430a35000 move librustc/plugin to librustc_plugin
this is a [breaking-change] to all plugin authors - sorry
2015-11-26 18:22:39 +02:00
Ariel Ben-Yehuda
26b19206d3 make check works 2015-11-26 18:21:17 +02:00
Ariel Ben-Yehuda
d45dd9423e make CrateStore a trait object
rustdoc still broken
2015-11-26 18:21:17 +02:00
Ariel Ben-Yehuda
11dbb69bd1 remove csearch from the rest of rustc 2015-11-26 18:21:17 +02:00
Ariel Ben-Yehuda
f5fbefa3af remove csearch from resolve and typeck 2015-11-26 18:21:17 +02:00
Ariel Ben-Yehuda
3877664b56 stop using csearch in librustc and librustc_lint 2015-11-26 18:21:17 +02:00