For now we are preferring free functions for primitive ctors,
so they are marked 'unstable' pending final decision. The
methods on `Char` are 'deprecated'.
'Numeric' is the proper name of the unicode character class,
and this frees up the word 'digit' for ascii use in libcore.
Since I'm going to rename `Char::is_digit_radix` to
`is_digit`, I am not leaving a deprecated method in place,
because that would just cause name clashes, as both
`Char` and `UnicodeChar` are in the prelude.
[breaking-change]
Changed `rustdoc` so that if we do not have the `strip-private` pass
enabled private modules will be included in the generated documentation
I added this because it is useful to be able to read the documentation in the very nice `rustdoc` web interface when doing internal work on a project. In this case we want the `rustdoc` to include modules that are hidden from consumers. Since this is not currently possible I added it here.
These functions allow you to see how many weak and strong references
there are to an `Arc`, `Rc`, or an `rc::Weak`. Due to the design of
`Arc` it is not possible to get the number of weak references of an
arbitrary `arc::Weak`. Look in `arc.rs` for a more in-depth explanation.
On `arc::Arc` and `arc::Weak` these operations are wait-free and atomic.
Vim plugins shouldn't override user settings unless they ask!
Stops the plugin from modifying the users settings by default
instead makes them opt-in with `g:rust_recommended_style`
Fixies #11671
This commit changes default relative libdir 'lib' to a relative libdir calculated using LIBDIR provided by --libdir configuration option. In case if no option was provided behavior does not change.
This PR completes the removal of the runtime system and green-threaded abstractions as part of implementing [RFC 230](https://github.com/rust-lang/rfcs/pull/230).
Specifically:
* It removes the `Runtime` trait, welding the scheduling infrastructure directly to native threads.
* It removes `libgreen` and `libnative` entirely.
* It rewrites `sync::mutex` as a trivial layer on top of native mutexes. Eventually, the two modules will be merged.
* It hides the vast majority of `std::rt`.
This completes the basic task of removing the runtime system (I/O and scheduling) and components that depend on it.
After this lands, a follow-up PR will pull the `rustrt` crate back into `std`, turn `std::task` into `std::thread` (with API changes to go along with it), and completely cut out the remaining startup/teardown sequence. Other changes, including new [TLS](https://github.com/rust-lang/rfcs/pull/461) and synchronization are in the RFC or pre-RFC phase.
Closes#17325Closes#18687
[breaking-change]
r? @alexcrichton
Previously, the entire runtime API surface was publicly exposed, but
that is neither necessary nor desirable. This commit hides most of the
module, using librustrt directly as needed. The arrangement will need to
be revisited when rustrt is pulled into std.
[breaking-change]
Previously, sync::mutex had to split between green and native runtime
systems and thus could not simply use the native mutex facility.
This commit rewrites sync::mutex to link directly to native mutexes; in
the future, the two will probably be coalesced into a single
module (once librustrt is pulled into libstd wholesale).
This commit removes most of the remaining runtime infrastructure related
to the green/native split. In particular, it removes the `Runtime` trait
and instead inlines the native implementation.
Closes#17325
[breaking-change]
Closes#18415
This links [`std::str`](http://doc.rust-lang.org/std/str/index.html) documentation to [literals](http://doc.rust-lang.org/reference.html#literals) in the reference guide and collects examples of literals into one group at the beginning of the section. ~~The new tables are not exhaustive (some escapes were skipped) and so I try to link back to the respective sections where more detail is located.~~ The tables are are mostly exhaustive. I misunderstood some of the whitespace codes.
I don't think the tables actually look that nice if that's important and I'm not sure how it could be improved. I think it does do a good job of collecting available options together. I think listing the escapes together is particularly helpful because they vary with type and are embedded in paragraphs.
[EDIT]
The [ascii table](http://man-ascii.com/) is here and may be useful.
We add CFG_LLVM_TARGET_$(target) (which can be defined in any of the
mk/cfg/* files) and supply a default to the plain target name
CFG_LLVM_TARGET mirrors the value of llvm_target (aka llvm-target) in
the librustc_back runtime target specification.
We have a default value for this ('/usr/local'), so this warning is
printed ALL the time unless one does --enable-local-rust. As a result,
it doesn't really help at all.
Without this, if we we're using a non-standard host libdir, the target
bindir would not exist (and rustc would fail to write to the
non-existent directory).
If the expected rustc snapshot is not where we expect it to be,
complain and fail at that point rather than creating a empty rustc file
and continuing until we try to run it.
This commit makes `Cow` more usable by allowing it to be applied to
unsized types (as was intended) and providing some basic `ToOwned`
implementations on slice types. It also corrects the documentation for
`Cow` to no longer mention `DerefMut`, and adds an example.
In the general case, at least, it is not possible to make an object out of an unsized type. This is because the object type would have to store the fat pointer information for the `self` value *and* the vtable -- meaning it'd have to be a fat pointer with three words -- but for the compiler to know that the object requires three words, it would have to know the self-type of the object (is `self` a thin or fat pointer?), which of course it doesn't.
Fixes#18333.
r? @nick29581