Now rustdoc_ng will be built as both a binary and a library (using the same
rules as all the other binaries that rust has). Furthermore, this will also
start building rustdoc_ng unit tests (and running them).
This module was removed a while ago, but the tasks tutorial wasn't
updated, and the old docs page for pipes was never deleted so the link
confusingly still worked!
A SendStr is a string that can hold either a ~str or a &'static str.
This can be useful as an optimization when an allocation is sometimes needed but the common case is statically known.
Possible use cases include Maps with both static and owned keys, or propagating error messages across task boundaries.
SendStr implements most basic traits in a way that hides the fact that it is an enum; in particular things like order and equality are only determined by the content of the wrapped strings.
This basically reimplements #7599 and has a use case for replacing an similar type in `std::rt::logging` ( Added in #9180).
A SendStr is a string that can hold either a ~str or a &'static str.
This can be useful as an optimization when an allocation is sometimes needed but the common case is statically known.
Possible use cases include Maps with both static and owned keys, or propagating error messages across task boundaries.
SendStr implements most basic traits in a way that hides the fact that it is an enum; in particular things like order and equality are only determined by the content of the wrapped strings.
Replaced std::rt:logging::SendableString with SendStr
Added tests for using an SendStr as key in Hash- and Treemaps
This doesn't enable it by default yet, or include the frontend. But the tool
is pretty much done, and it'd be nice to stave off bitrot.
I couldn't get it to actually build with the Makefile though. I don't really
understand what is going on in that makefile at all. Could @graydon or
@pnkfelix lend a hand?
While they may have the same name within various scopes, this changes static
names to use path_pretty_name to append some hash information at the end of the
symbol. We're then guaranteed that each static has a unique NodeId, so this
NodeId is as the "hash" of the pretty name.
Closes#9188
Beforehand it was assumed that the standard cdecl abi was used for all extern
fns of extern crates, but this reads the abi of the extern fn type and declares
the function in the local crate with the appropriate type.
I was trying to think of how to write a test for this, but I was just drawing up blanks :(. Are there standard functions in libc which are not of the cdecl abi? If so we could try linking to them and make sure that the cal completes successfully.
Otherwise, I manually verified that the function was declared correctly by looking at the llvm assembly.
cc #9055 (I'm not sure if this will fix that issue)
This module was removed a while ago, but the tasks tutorial wasn't
updated, and the old docs page for pipes was never deleted so the link
confusingly still worked!
Beforehand it was assumed that the standard cdecl abi was used for all extern
fns of extern crates, but this reads the abi of the extern fn type and declares
the function in the local crate with the appropriate type.
The arguments after `rust test filename.rs` should be passed through
to the test binary. This allows the `rust` command to be used to run a
subset of tests, to run ignored tests, and to run benchmarks.
The arguments after `rust test filename.rs` should be passed through
to the test binary. This allows the `rust` command to be used to run a
subset of tests, to run ignored tests, and to run benchmarks.
FormatMessageA may return non-ascii message,
which is encoded as system code page, not utf8.
This may cause `assert!(is_utf8(v))` failure on
some non-English machines.
This patch replaces it with FormatMessageW,
which returns utf-16 message.
Fixes `make check-stage2-std` failure on my machine. :)
Remove these in favor of the two traits themselves and the wrapper
function std::from_str::from_str.
Add the function std::num::from_str_radix in the corresponding role for
the FromStrRadix trait.
With `from_str` in the prelude, and `from_str_radix` in `std::num`, the feature is unfied under the type annotation of these functions instead of using the modules-named-as-types (std::uint and others):
What was before:
let n = std::uint::from_str("1");
let m = std::i32::from_str_radix("10", 16);
is now:
let n = from_str::<uint>("1");
let m = std::num::from_str_radix::<i32>("10", 16);
Remove these in favor of the two traits themselves and the wrapper
function std::from_str::from_str.
Add the function std::num::from_str_radix in the corresponding role for
the FromStrRadix trait.
Also fixed nasty bug caused by calling LLVMDIBuilderCreateStructType() with a null pointer where an empty array was expected (which would trigger an unintelligable assertion somewhere down the line).