Commit Graph

31395 Commits

Author SHA1 Message Date
Daniel Hofstetter
c6c3f47f7c Guide: Fix imports (times_four instead of add_four) 2014-08-06 09:51:02 +02:00
nham
6df514b061 Use byte literals in libcore 2014-08-06 02:30:17 -04:00
nham
3fb78e29f4 Use byte literals in libstd 2014-08-06 02:02:50 -04:00
nham
dfdea3f116 Use byte literals in libsyntax 2014-08-06 01:31:48 -04:00
nham
20d1ad9b59 Use byte literal in libnum 2014-08-06 01:29:26 -04:00
Russell
f7aadee14e Add new tests for extern and foreign fns and name mangling. 2014-08-05 23:28:50 -06:00
Russell
e6e6ef24ab Allow generic foreign functions.
Generic extern functions written in Rust have their names mangled, as well as their internal clownshoe __rust_abi functions. This allows e.g. specific monomorphizations of these functions to be used as callbacks.

Closes #12502.
2014-08-05 23:28:50 -06:00
nham
daf432e8b6 Use byte literals in libterm 2014-08-06 01:25:48 -04:00
nham
30cfce3d92 Use a byte literal in libregex 2014-08-06 01:18:19 -04:00
nham
1c2c4942a6 Use byte literals in libdebug 2014-08-06 01:14:31 -04:00
nham
d45a569995 Use byte literals in libserialize 2014-08-06 01:07:10 -04:00
nham
f36ddf1d0e Use byte literals in libcollections tests 2014-08-06 00:57:49 -04:00
bors
223c043110 auto merge of #16254 : brson/rust/rustdocmeta, r=aturon
This teach rustdoc to add `<meta name="description">` and `<meta name="keywords">` tags to crate docs. Description is important for search engines because they display it as the page description. Keywords are less useful but still generally recommended.

This also changes the "stability dashboard" link to just say "stability", because the current link takes up a lot of space.

cc https://github.com/rust-lang/rust/issues/12466
2014-08-06 04:56:25 +00:00
Vadim Chugunov
881bfb1a18 Renamed record_stack_bounds for clarity.
For a good measure, implemented target_record_stack_bounds for 32-bit Windows as well.
2014-08-05 21:00:31 -07:00
Alex Crichton
cb8bd83888 rustdoc: Run all work in a separate task
There's a good long comment explaining why. The tl;dr; is that I have no idea
why this is necessary, but it gets --test to work on windows which is something,
right?

cc #13259
cc #16275
cc rust-lang/cargo#302
2014-08-05 20:20:54 -07:00
bors
2a47fa708c auto merge of #16252 : conradkleinespel/rust/master, r=alexcrichton
I found the current docs to be a little confusing. I believe this makes them straight to the point and less confusing.
2014-08-06 03:11:29 +00:00
Vadim Chugunov
cd2003ffd8 Added clarification regarding rust_try_inner. 2014-08-05 19:14:15 -07:00
Alex Crichton
74ae05ad90 syntax: Handle \r\n in byte string literals
This ended up passing through the lexer but dying later on in parsing when it
wasn't handled. The strategy taken was to copy the `str_lit` funciton, but adapt
it for bytes.

Closes #16278
2014-08-05 17:02:55 -07:00
nham
8650040b8a Remove references to ~[] in core::kinds::marker docs. 2014-08-05 15:23:23 -04:00
bors
f5ac41185a auto merge of #16247 : TimDumol/rust/patch-1, r=alexcrichton
The 30-minute intro had a comment mentioning that `+=` will be included in the future. It's already included, and this fixes it to use `+=`.
2014-08-05 19:06:23 +00:00
Steve Klabnik
057c9ae30a Guide: generics 2014-08-05 13:47:32 -04:00
bors
6da38890f1 auto merge of #15709 : hirschenberger/rust/issue-14269, r=cmr
Fixes missing overflow lint for i64 #14269

The `type_overflow` lint, doesn't catch the overflow for `i64` because the overflow happens earlier in the parse phase when the `u64` as biggest possible int gets casted to `i64` , without checking the for
overflows.
We can't lint in the parse phase, so we emit a compiler error, as we do for overflowing `u64`

Perhaps a consistent behaviour would be to emit a parse error for *all*  overflowing integer types.

See #14269
2014-08-05 17:21:23 +00:00
bors
ce83301f8c auto merge of #16246 : ruud-v-a/rust/patch-1, r=brson 2014-08-05 15:36:23 +00:00
bors
fd02916f0e auto merge of #16243 : alexcrichton/rust/fix-utime-for-windows, r=brson
Apparently the units are in milliseconds, not in seconds!
2014-08-05 13:11:20 +00:00
bors
cbdae97689 auto merge of #16234 : cakebaker/rust/rename_guessing_game_rs_to_main_rs, r=steveklabnik
Follow-up to #16215
2014-08-05 11:31:22 +00:00
bors
fde58d95af auto merge of #16231 : michaelsproul/rust/gedit-macro, r=alexcrichton
Gedit currently lacks syntax highlighting for macros.
2014-08-05 09:51:23 +00:00
bors
157459be59 auto merge of #16216 : omasanori/rust/nfkc, r=brson
The reference manual said that code is interpreted as UTF-8 text and a implementation will normalize it to NFKC. However, rustc doesn't do any normalization now.

We may want to do any normalization for symbols, but normalizing whole text seems harmful because doing so loses some sort of information even if we choose a non-K variant of normalization.

I'd suggest removing "normalized to Unicode normalization form NFKC" phrase for the present so that the manual represents the current state properly. When we address the problem (with a RFC?), then the manual should be updated.

Closes #12388.

Reference: https://github.com/rust-lang/rust/issues/2253
2014-08-05 08:06:25 +00:00
Falco Hirschenberger
0dc215741b Fixes missing overflow lint for i64 #14269
The `type_overflow` lint, doesn't catch the overflow for `i64` because
the overflow happens earlier in the parse phase when the `u64` as biggest
possible int gets casted to `i64` , without checking the for overflows.
We can't lint in the parse phase, so a refactoring of the `LitInt` type
was necessary.

The types `LitInt`, `LitUint` and `LitIntUnsuffixed` where merged to one
type `LitInt` which stores it's value as `u64`. An additional parameter was
added which indicate the signedness of the type and the sign of the value.
2014-08-05 09:59:03 +02:00
Brian Anderson
140825218d Remove obsolete stack growth tests 2014-08-04 21:52:57 -07:00
bors
ade92c6e35 auto merge of #16188 : nham/rust/immut_slice_split_at, r=brson
This operation seems common enough that it would be convenient for it to be a standard method.
2014-08-05 03:21:27 +00:00
bors
4b54110c33 auto merge of #16187 : steveklabnik/rust/gh15830, r=alexcrichton
Fixes #15830.
2014-08-05 01:41:25 +00:00
Vadim Chugunov
cb55279f23 Fix tests. 2014-08-04 18:27:24 -07:00
Vadim Chugunov
5a24ee8a9e Implement unwinding for Win64.
The original trick used to trigger unwinds would not work with GCC's implementation of SEH, so I had to invent a new one: rust_try now consists of two routines: the outer one, whose handler triggers unwinds, and the inner one, that stops unwinds by having a landing pad that swallows exceptions and passes them on to the outer routine via a normal return.
2014-08-04 18:27:23 -07:00
Vadim Chugunov
a12b23521f Update LLVM 2014-08-04 17:43:56 -07:00
Vadim Chugunov
081991e7e1 Fix crash in OsRng when compiling with -O. 2014-08-04 17:43:49 -07:00
Vadim Chugunov
9bdaf0b5da Use gcc for cross-build linking, not g++. 2014-08-04 17:43:48 -07:00
Vadim Chugunov
ad2f67f1c3 Use mingw64 target spelling. 2014-08-04 17:43:48 -07:00
Vadim Chugunov
bf76e00231 libnative should not mess with stack limits in the TIB. Only libgreen has a legitimate need to set them. 2014-08-04 17:43:47 -07:00
Vadim Chugunov
bf420e58c2 Ensure that Registers struct is 16-byte aligned on x86_64.
This is important when building with --disable-jemalloc: unlike jemalloc,  msvcrt does not align on 16 bytes unless asked to.
2014-08-04 17:43:47 -07:00
Vadim Chugunov
862ba430c5 Fix valgrind.h for Win64.
_WIN32 is defined for 64-bit builds as well, so test for _WIN64 first.
2014-08-04 17:42:36 -07:00
bors
6bb72600cc auto merge of #16179 : SimonPersson/rust/master, r=brson
This should solve issue 14848 for ARM.
2014-08-05 00:01:28 +00:00
Aaron Turon
68bde0a073 stabilize atomics (now atomic)
This commit stabilizes the `std::sync::atomics` module, renaming it to
`std::sync::atomic` to match library precedent elsewhere, and tightening
up behavior around incorrect memory ordering annotations.

The vast majority of the module is now `stable`. However, the
`AtomicOption` type has been deprecated, since it is essentially unused
and is not truly a primitive atomic type. It will eventually be replaced
by a higher-level abstraction like MVars.

Due to deprecations, this is a:

[breaking-change]
2014-08-04 16:03:21 -07:00
bors
463d6680d1 auto merge of #16110 : alexcrichton/rust/issue-15460, r=brson
As discovered in #15460, a particular #[link(kind = "static", ...)] line is not
actually guaranteed to link the library at all. The reason for this is that if
the external library doesn't have any referenced symbols in the object generated
by rustc, the entire library is dropped by the linker.

For dynamic native libraries, this is solved by passing -lfoo for all downstream
compilations unconditionally. For static libraries in rlibs this is solved
because the entire archive is bundled in the rlib. The only situation in which
this was a problem was when a static native library was linked to a rust dynamic
library.

This commit brings the behavior of dylibs in line with rlibs by passing the
--whole-archive flag to the linker when linking native libraries. On OSX, this
uses the -force_load flag. This flag ensures that the entire archive is
considered candidate for being linked into the final dynamic library.

This is a breaking change because if any static library is included twice in the
same compilation unit then the linker will start emitting errors about duplicate
definitions now. The fix for this would involve only statically linking to a
library once.

Closes #15460
[breaking-change]
2014-08-04 22:21:25 +00:00
Steve Klabnik
acf66b1027 Clarify Argument docs.
Fixes #15830.
2014-08-04 18:05:10 -04:00
Brian Anderson
bcdc8fb812 rustdoc: Just "stability" instead of "stability dashboard"
The words "stability dashboard" take up too much space on small screens.
2014-08-04 14:37:07 -07:00
Brian Anderson
57e53d5c2f rustdoc: Emit keywords for all crate pages
cc #12466
2014-08-04 14:37:07 -07:00
Brian Anderson
2b0a15494a rustdoc: Put field instantiation in declaration order.
cc #12466
2014-08-04 14:37:06 -07:00
Brian Anderson
08d44f5512 rustdoc: Use more descriptive description metadata.
This text appears in and improves search results.

cc #12466
2014-08-04 14:37:06 -07:00
Conrad Kleinespel
c74d320662 libgetopts: tweak HasHarg/Occur docs. 2014-08-04 23:20:49 +02:00
bors
9de20198ae auto merge of #16251 : apoelstra/rust/tcp-fix, r=alexcrichton
Replacement for PR #16208 (make sockaddr* struct padding explicit) to make PR #15763 (fix nested returns) merge without breaking TCP code.
2014-08-04 20:41:25 +00:00