Auto merge of #27688 - alexcrichton:rollup, r=alexcrichton
This commit is contained in:
commit
8b5948d5bf
@ -17,8 +17,8 @@ hop on [#rust-internals][pound-rust-internals].
|
||||
As a reminder, all contributors are expected to follow our [Code of Conduct][coc].
|
||||
|
||||
[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
|
||||
[internals]: http://internals.rust-lang.org
|
||||
[coc]: http://www.rust-lang.org/conduct.html
|
||||
[internals]: https://internals.rust-lang.org
|
||||
[coc]: https://www.rust-lang.org/conduct.html
|
||||
|
||||
## Feature Requests
|
||||
|
||||
@ -207,6 +207,6 @@ it to [Crates.io](http://crates.io). Easier said than done, but very, very
|
||||
valuable!
|
||||
|
||||
[pound-rust]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
|
||||
[users]: http://users.rust-lang.org/
|
||||
[users]: https://users.rust-lang.org/
|
||||
[so]: http://stackoverflow.com/questions/tagged/rust
|
||||
[community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library
|
||||
|
@ -13,8 +13,8 @@ as standard libraries, tools and documentation for Rust.
|
||||
|
||||
Read ["Installing Rust"] from [The Book].
|
||||
|
||||
["Installing Rust"]: http://doc.rust-lang.org/book/installing-rust.html
|
||||
[The Book]: http://doc.rust-lang.org/book/index.html
|
||||
["Installing Rust"]: https://doc.rust-lang.org/book/installing-rust.html
|
||||
[The Book]: https://doc.rust-lang.org/book/index.html
|
||||
|
||||
## Building from Source
|
||||
|
||||
@ -117,7 +117,7 @@ The Rust community congregates in a few places:
|
||||
|
||||
[Stack Overflow]: http://stackoverflow.com/questions/tagged/rust
|
||||
[/r/rust]: http://reddit.com/r/rust
|
||||
[users.rust-lang.org]: http://users.rust-lang.org/
|
||||
[users.rust-lang.org]: https://users.rust-lang.org/
|
||||
|
||||
## Contributing
|
||||
|
||||
|
110
RELEASES.md
110
RELEASES.md
@ -102,51 +102,51 @@ Misc
|
||||
* Fat pointers are now [passed in pairs of immediate arguments][fat],
|
||||
resulting in faster compile times and smaller code.
|
||||
|
||||
[`Extend`]: http://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
|
||||
[`Extend`]: https://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
|
||||
[extend-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
|
||||
[`iter::once`]: http://doc.rust-lang.org/nightly/std/iter/fn.once.html
|
||||
[`iter::empty`]: http://doc.rust-lang.org/nightly/std/iter/fn.empty.html
|
||||
[`matches`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
|
||||
[`rmatches`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
|
||||
[`Cell`]: http://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
|
||||
[`RefCell`]: http://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
|
||||
[`wrapping_add`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
|
||||
[`wrapping_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
|
||||
[`wrapping_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
|
||||
[`wrapping_div`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
|
||||
[`wrapping_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
|
||||
[`wrapping_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
|
||||
[`wrapping_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
|
||||
[`wrapping_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
|
||||
[`Wrapping`]: http://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
|
||||
[`fmt::Formatter`]: http://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
|
||||
[`fmt::Write`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
|
||||
[`io::Write`]: http://doc.rust-lang.org/nightly/std/io/trait.Write.html
|
||||
[`debug_struct`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
|
||||
[`debug_tuple`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
|
||||
[`debug_list`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
|
||||
[`debug_set`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
|
||||
[`debug_map`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
|
||||
[`Debug`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
|
||||
[strup]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
|
||||
[strlow]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
|
||||
[`to_uppercase`]: http://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
|
||||
[`to_lowercase`]: http://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
|
||||
[`PoisonError`]: http://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
|
||||
[`RwLock`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
|
||||
[`Mutex`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
|
||||
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
|
||||
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
|
||||
[`Stdio`]: http://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
|
||||
[`ChildStdin`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
|
||||
[`ChildStdout`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
|
||||
[`ChildStderr`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
|
||||
[`io::ErrorKind`]: http://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
|
||||
[`iter::once`]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
|
||||
[`iter::empty`]: https://doc.rust-lang.org/nightly/std/iter/fn.empty.html
|
||||
[`matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
|
||||
[`rmatches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
|
||||
[`Cell`]: https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
|
||||
[`RefCell`]: https://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
|
||||
[`wrapping_add`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
|
||||
[`wrapping_sub`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
|
||||
[`wrapping_mul`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
|
||||
[`wrapping_div`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
|
||||
[`wrapping_rem`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
|
||||
[`wrapping_neg`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
|
||||
[`wrapping_shl`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
|
||||
[`wrapping_shr`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
|
||||
[`Wrapping`]: https://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
|
||||
[`fmt::Formatter`]: https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
|
||||
[`fmt::Write`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
|
||||
[`io::Write`]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
|
||||
[`debug_struct`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
|
||||
[`debug_tuple`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
|
||||
[`debug_list`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
|
||||
[`debug_set`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
|
||||
[`debug_map`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
|
||||
[`Debug`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
|
||||
[strup]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
|
||||
[strlow]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
|
||||
[`to_uppercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
|
||||
[`to_lowercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
|
||||
[`PoisonError`]: https://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
|
||||
[`RwLock`]: https://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
|
||||
[`Mutex`]: https://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
|
||||
[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
|
||||
[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
|
||||
[`Stdio`]: https://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
|
||||
[`ChildStdin`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
|
||||
[`ChildStdout`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
|
||||
[`ChildStderr`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
|
||||
[`io::ErrorKind`]: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
|
||||
[debugfmt]: https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/
|
||||
[`DerefMut`]: http://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
|
||||
[`mem::align_of`]: http://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
|
||||
[`DerefMut`]: https://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
|
||||
[`mem::align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
|
||||
[align]: https://github.com/rust-lang/rust/pull/25646
|
||||
[`mem::min_align_of`]: http://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
|
||||
[`mem::min_align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
|
||||
[typos]: https://github.com/rust-lang/rust/pull/26087
|
||||
[nop]: https://github.com/rust-lang/rust/pull/26336
|
||||
[fat]: https://github.com/rust-lang/rust/pull/26411
|
||||
@ -237,14 +237,14 @@ Misc
|
||||
* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
|
||||
with `Drop`][drop].
|
||||
|
||||
[`str::split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
|
||||
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
|
||||
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
|
||||
[`std::os::unix::symlink`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
|
||||
[`IntoIterator`]: http://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
|
||||
[`From`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html
|
||||
[`str::split_whitespace`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
|
||||
[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
|
||||
[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
|
||||
[`std::os::unix::symlink`]: https://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
|
||||
[`IntoIterator`]: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
|
||||
[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
|
||||
[rf]: https://github.com/rust-lang/rust/pull/24491
|
||||
[err-index]: http://doc.rust-lang.org/error-index.html
|
||||
[err-index]: https://doc.rust-lang.org/error-index.html
|
||||
[sk]: https://github.com/rust-lang/rust/pull/24615
|
||||
[pre]: https://github.com/rust-lang/rust/pull/25323
|
||||
[file]: https://github.com/rust-lang/rust/pull/24598
|
||||
@ -258,13 +258,13 @@ Misc
|
||||
[pie]: https://github.com/rust-lang/rust/pull/24953
|
||||
[abs]: https://github.com/rust-lang/rust/pull/25441
|
||||
[c]: https://github.com/rust-lang/rust/pull/25496
|
||||
[`Cloned`]: http://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
|
||||
[`Incoming`]: http://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
|
||||
[`Cloned`]: https://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
|
||||
[`Incoming`]: https://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
|
||||
[inc]: https://github.com/rust-lang/rust/pull/25522
|
||||
[bh]: https://github.com/rust-lang/rust/pull/25856
|
||||
[`BinaryHeap`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
|
||||
[`BinaryHeap`]: https://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
|
||||
[ll]: https://github.com/rust-lang/rust/pull/26022
|
||||
[`split_off`]: http://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
|
||||
[`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
|
||||
[drop]: https://github.com/rust-lang/rust/pull/24935
|
||||
|
||||
Version 1.0.0 (May 2015)
|
||||
@ -508,7 +508,7 @@ Version 1.0.0-alpha.2 (February 2015)
|
||||
[drop]: https://github.com/rust-lang/rust/pull/21972
|
||||
[drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
|
||||
[feat]: https://github.com/rust-lang/rust/pull/21248
|
||||
[feat-forum]: http://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
|
||||
[feat-forum]: https://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
|
||||
[feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
|
||||
[fmt]: https://github.com/rust-lang/rust/pull/21457
|
||||
[into]: https://github.com/rust-lang/rust/pull/20790
|
||||
@ -709,7 +709,7 @@ Version 1.0.0-alpha (January 2015)
|
||||
[objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
|
||||
[assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
|
||||
[ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
|
||||
[trpl]: http://doc.rust-lang.org/book/index.html
|
||||
[trpl]: https://doc.rust-lang.org/book/index.html
|
||||
[rbe]: http://rustbyexample.com/
|
||||
|
||||
|
||||
|
@ -22,8 +22,3 @@ CFG_LDPATH_i686-pc-windows-msvc :=
|
||||
CFG_RUN_i686-pc-windows-msvc=$(2)
|
||||
CFG_RUN_TARG_i686-pc-windows-msvc=$(call CFG_RUN_i686-pc-windows-msvc,,$(2))
|
||||
CFG_GNU_TRIPLE_i686-pc-windows-msvc := i686-pc-win32
|
||||
|
||||
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
|
||||
# bootstrapping from itself. This is relevant during stage0, and other parts of
|
||||
# the build system take this into account.
|
||||
BOOTSTRAP_FROM_i686-pc-windows-msvc := i686-pc-windows-gnu
|
||||
|
@ -22,8 +22,3 @@ CFG_LDPATH_x86_64-pc-windows-msvc :=
|
||||
CFG_RUN_x86_64-pc-windows-msvc=$(2)
|
||||
CFG_RUN_TARG_x86_64-pc-windows-msvc=$(call CFG_RUN_x86_64-pc-windows-msvc,,$(2))
|
||||
CFG_GNU_TRIPLE_x86_64-pc-windows-msvc := x86_64-pc-win32
|
||||
|
||||
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
|
||||
# bootstrapping from itself. This is relevant during stage0, and other parts of
|
||||
# the build system take this into account.
|
||||
BOOTSTRAP_FROM_x86_64-pc-windows-msvc := x86_64-pc-windows-gnu
|
||||
|
@ -48,7 +48,7 @@ L10N_LANGS := ja
|
||||
RUSTDOC_HTML_OPTS_NO_CSS = --html-before-content=doc/version_info.html \
|
||||
--html-in-header=doc/favicon.inc \
|
||||
--html-after-content=doc/footer.inc \
|
||||
--markdown-playground-url='http://play.rust-lang.org/'
|
||||
--markdown-playground-url='https://play.rust-lang.org/'
|
||||
|
||||
RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css
|
||||
|
||||
@ -169,7 +169,7 @@ doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
|
||||
@$(call E, rustdoc: $@)
|
||||
$(Q)$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) \
|
||||
--markdown-no-toc \
|
||||
--markdown-css http://doc.rust-lang.org/rust.css $<
|
||||
--markdown-css https://doc.rust-lang.org/rust.css $<
|
||||
|
||||
define DEF_DOC
|
||||
|
||||
|
@ -400,11 +400,6 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
|
||||
$$(foreach obj,$$(INSTALLED_OBJECTS_$(2)),\
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(obj))
|
||||
|
||||
ifeq ($(1),0)
|
||||
TSREQ$(1)_T_$(2)_H_$(3) += \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(call CFG_STATIC_LIB_NAME_$(2),morestack)
|
||||
endif
|
||||
|
||||
# Prerequisites for a working stageN compiler and libraries, for a specific
|
||||
# target
|
||||
SREQ$(1)_T_$(2)_H_$(3) = \
|
||||
|
@ -237,64 +237,3 @@ endef
|
||||
|
||||
$(foreach target,$(CFG_TARGET), \
|
||||
$(eval $(call CFG_MAKE_TOOLCHAIN,$(target))))
|
||||
|
||||
# There are more comments about this available in the target specification for
|
||||
# Windows MSVC in the compiler, but the gist of it is that we use `llvm-ar.exe`
|
||||
# instead of `lib.exe` for assembling archives, so we need to inject this custom
|
||||
# dependency here.
|
||||
#
|
||||
# FIXME(stage0): remove this and all other relevant support in the makefiles
|
||||
# after a snapshot is made
|
||||
define ADD_LLVM_AR_TO_MSVC_DEPS
|
||||
ifeq ($$(findstring msvc,$(1)),msvc)
|
||||
NATIVE_TOOL_DEPS_core_T_$(1) += llvm-ar.exe
|
||||
INSTALLED_BINS_$(1) += llvm-ar.exe
|
||||
endif
|
||||
endef
|
||||
|
||||
$(foreach target,$(CFG_TARGET), \
|
||||
$(eval $(call ADD_LLVM_AR_TO_MSVC_DEPS,$(target))))
|
||||
|
||||
# When working with MSVC on windows, each DLL needs to explicitly declare its
|
||||
# interface to the outside world through some means. The options for doing so
|
||||
# include:
|
||||
#
|
||||
# 1. A custom attribute on each function itself
|
||||
# 2. A linker argument saying what to export
|
||||
# 3. A file which lists all symbols that need to be exported
|
||||
#
|
||||
# The Rust compiler takes care (1) for us for all Rust code by annotating all
|
||||
# public-facing functions with dllexport, but we have a few native dependencies
|
||||
# which need to cross the DLL boundary. The most important of these dependencies
|
||||
# is LLVM which is linked into `rustc_llvm.dll` but primarily used from
|
||||
# `rustc_trans.dll`. This means that many of LLVM's C API functions need to be
|
||||
# exposed from `rustc_llvm.dll` to be forwarded over the boundary.
|
||||
#
|
||||
# Unfortunately, at this time, LLVM does not handle this sort of exportation on
|
||||
# Windows for us, so we're forced to do it ourselves if we want it (which seems
|
||||
# like the path of least resistance right now). To do this we generate a `.DEF`
|
||||
# file [1] which we then custom-pass to the linker when building the rustc_llvm
|
||||
# crate. This DEF file list all symbols that are exported from
|
||||
# `src/librustc_llvm/lib.rs` and is generated by a small python script.
|
||||
#
|
||||
# Fun times!
|
||||
#
|
||||
# [1]: https://msdn.microsoft.com/en-us/library/28d6s79h.aspx
|
||||
#
|
||||
# FIXME(stage0): remove this macro and the usage below (and the commments above)
|
||||
# when a new snapshot is available. Also remove the
|
||||
# RUSTFLAGS$(1)_.._T_ variable in mk/target.mk along with
|
||||
# CUSTOM_DEPS (as they were only added for this)
|
||||
define ADD_RUSTC_LLVM_DEF_TO_MSVC
|
||||
ifeq ($$(findstring msvc,$(1)),msvc)
|
||||
RUSTFLAGS0_rustc_llvm_T_$(1) += -C link-args="-DEF:$(1)/rt/rustc_llvm.def"
|
||||
CUSTOM_DEPS0_rustc_llvm_T_$(1) += $(1)/rt/rustc_llvm.def
|
||||
|
||||
$(1)/rt/rustc_llvm.def: $$(S)src/etc/mklldef.py $$(S)src/librustc_llvm/lib.rs
|
||||
$$(CFG_PYTHON) $$^ $$@ rustc_llvm-$$(CFG_FILENAME_EXTRA)
|
||||
endif
|
||||
endef
|
||||
|
||||
$(foreach target,$(CFG_TARGET), \
|
||||
$(eval $(call ADD_RUSTC_LLVM_DEF_TO_MSVC,$(target))))
|
||||
|
||||
|
4
mk/rt.mk
4
mk/rt.mk
@ -35,8 +35,7 @@
|
||||
# that's per-target so you're allowed to conditionally add files based on the
|
||||
# target.
|
||||
################################################################################
|
||||
NATIVE_LIBS := rust_builtin hoedown miniz \
|
||||
rust_test_helpers morestack
|
||||
NATIVE_LIBS := rust_builtin hoedown miniz rust_test_helpers
|
||||
|
||||
# $(1) is the target triple
|
||||
define NATIVE_LIBRARIES
|
||||
@ -54,7 +53,6 @@ NATIVE_DEPS_miniz_$(1) = miniz.c
|
||||
NATIVE_DEPS_rust_builtin_$(1) := rust_builtin.c \
|
||||
rust_android_dummy.c
|
||||
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
|
||||
NATIVE_DEPS_morestack_$(1) := empty.c
|
||||
|
||||
################################################################################
|
||||
# You shouldn't find it that necessary to edit anything below this line.
|
||||
|
93
mk/target.mk
93
mk/target.mk
@ -37,10 +37,7 @@ CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4) := \
|
||||
$$(foreach dep,$$(NATIVE_DEPS_$(4)), \
|
||||
$$(RT_OUTPUT_DIR_$(2))/$$(call CFG_STATIC_LIB_NAME_$(2),$$(dep))) \
|
||||
$$(foreach dep,$$(NATIVE_DEPS_$(4)_T_$(2)), \
|
||||
$$(RT_OUTPUT_DIR_$(2))/$$(dep)) \
|
||||
$$(foreach dep,$$(NATIVE_TOOL_DEPS_$(4)_T_$(2)), \
|
||||
$$(TBIN$(1)_T_$(3)_H_$(3))/$$(dep)) \
|
||||
$$(CUSTOM_DEPS$(1)_$(4)_T_$(2))
|
||||
$$(RT_OUTPUT_DIR_$(2))/$$(dep))
|
||||
endef
|
||||
|
||||
$(foreach host,$(CFG_HOST), \
|
||||
@ -142,9 +139,6 @@ SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD))
|
||||
|
||||
define TARGET_HOST_RULES
|
||||
|
||||
$$(TBIN$(1)_T_$(2)_H_$(3))/:
|
||||
mkdir -p $$@
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/:
|
||||
mkdir -p $$@
|
||||
|
||||
@ -152,11 +146,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/%: $$(RT_OUTPUT_DIR_$(2))/% \
|
||||
| $$(TLIB$(1)_T_$(2)_H_$(3))/ $$(SNAPSHOT_RUSTC_POST_CLEANUP)
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(2)_H_$(3))/%: $$(CFG_LLVM_INST_DIR_$(2))/bin/% \
|
||||
| $$(TBIN$(1)_T_$(2)_H_$(3))/ $$(SNAPSHOT_RUSTC_POST_CLEANUP)
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
endef
|
||||
|
||||
$(foreach source,$(CFG_HOST), \
|
||||
@ -180,83 +169,3 @@ $(foreach host,$(CFG_HOST), \
|
||||
$(foreach stage,$(STAGES), \
|
||||
$(foreach tool,$(TOOLS), \
|
||||
$(eval $(call TARGET_TOOL,$(stage),$(target),$(host),$(tool)))))))
|
||||
|
||||
# We have some triples which are bootstrapped from other triples, and this means
|
||||
# that we need to fixup some of the native tools that a triple depends on.
|
||||
#
|
||||
# For example, MSVC requires the llvm-ar.exe executable to manage archives, but
|
||||
# it bootstraps from the GNU Windows triple. This means that the compiler will
|
||||
# add this directory to PATH when executing new processes:
|
||||
#
|
||||
# $SYSROOT/rustlib/x86_64-pc-windows-gnu/bin
|
||||
#
|
||||
# Unfortunately, however, the GNU triple is not known about in stage0, so the
|
||||
# tools are actually located in:
|
||||
#
|
||||
# $SYSROOT/rustlib/x86_64-pc-windows-msvc/bin
|
||||
#
|
||||
# To remedy this problem, the rules below copy all native tool dependencies into
|
||||
# the bootstrap triple's location in stage 0 so the bootstrap compiler can find
|
||||
# the right sets of tools. Later stages (1+) will have the right host triple for
|
||||
# the compiler, so there's no need to worry there.
|
||||
#
|
||||
# $(1) - stage
|
||||
# $(2) - triple that's being used as host/target
|
||||
# $(3) - triple snapshot is built for
|
||||
# $(4) - crate
|
||||
# $(5) - tool
|
||||
#
|
||||
# FIXME(stage0): remove this and all other relevant support in the makefiles
|
||||
# after a snapshot is made
|
||||
define MOVE_TOOLS_TO_SNAPSHOT_HOST_DIR
|
||||
ifneq (,$(3))
|
||||
$$(TLIB$(1)_T_$(2)_H_$(2))/stamp.$(4): $$(HLIB$(1)_H_$(2))/rustlib/$(3)/bin/$(5)
|
||||
|
||||
$$(HLIB$(1)_H_$(2))/rustlib/$(3)/bin/$(5): $$(TBIN$(1)_T_$(2)_H_$(2))/$(5)
|
||||
mkdir -p $$(@D)
|
||||
cp $$< $$@
|
||||
endif
|
||||
endef
|
||||
|
||||
$(foreach target,$(CFG_TARGET), \
|
||||
$(foreach crate,$(CRATES), \
|
||||
$(foreach tool,$(NATIVE_TOOL_DEPS_$(crate)_T_$(target)), \
|
||||
$(eval $(call MOVE_TOOLS_TO_SNAPSHOT_HOST_DIR,0,$(target),$(BOOTSTRAP_FROM_$(target)),$(crate),$(tool))))))
|
||||
|
||||
# For MSVC targets we need to set up some environment variables for the linker
|
||||
# to work correctly when building Rust crates. These two variables are:
|
||||
#
|
||||
# - LIB tells the linker the default search path for finding system libraries,
|
||||
# for example kernel32.dll
|
||||
# - PATH needs to be modified to ensure that MSVC's link.exe is first in the
|
||||
# path instead of MinGW's /usr/bin/link.exe (entirely unrelated)
|
||||
#
|
||||
# The values for these variables are detected by the configure script.
|
||||
#
|
||||
# FIXME(stage0): remove this and all other relevant support in the makefiles
|
||||
# after a snapshot is made
|
||||
define SETUP_LIB_MSVC_ENV_VARS
|
||||
ifeq ($$(findstring msvc,$(2)),msvc)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
|
||||
export LIB := $$(CFG_MSVC_LIB_PATH_$$(HOST_$(2)))
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
|
||||
export PATH := $$(CFG_MSVC_BINDIR_$$(HOST_$(2))):$$(PATH)
|
||||
endif
|
||||
endef
|
||||
define SETUP_TOOL_MSVC_ENV_VARS
|
||||
ifeq ($$(findstring msvc,$(2)),msvc)
|
||||
$$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
|
||||
export LIB := $$(CFG_MSVC_LIB_PATH_$$(HOST_$(2)))
|
||||
$$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
|
||||
export PATH := $$(CFG_MSVC_BINDIR_$$(HOST_$(2))):$$(PATH)
|
||||
endif
|
||||
endef
|
||||
|
||||
$(foreach host,$(CFG_HOST), \
|
||||
$(foreach target,$(CFG_TARGET), \
|
||||
$(foreach crate,$(CRATES), \
|
||||
$(eval $(call SETUP_LIB_MSVC_ENV_VARS,0,$(target),$(host),$(crate))))))
|
||||
$(foreach host,$(CFG_HOST), \
|
||||
$(foreach target,$(CFG_TARGET), \
|
||||
$(foreach tool,$(TOOLS), \
|
||||
$(eval $(call SETUP_TOOL_MSVC_ENV_VARS,0,$(target),$(host),$(tool))))))
|
||||
|
@ -597,6 +597,10 @@ CTEST_DISABLE_debuginfo-gdb =
|
||||
CTEST_DISABLE_debuginfo-lldb = "lldb tests are disabled on android"
|
||||
endif
|
||||
|
||||
ifeq ($(findstring msvc,$(CFG_TARGET)),msvc)
|
||||
CTEST_DISABLE_debuginfo-gdb = "gdb tests are disabled on MSVC"
|
||||
endif
|
||||
|
||||
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
|
||||
# test group to be disabled *unless* the target is able to build a
|
||||
# compiler (i.e. when the target triple is in the set of of host
|
||||
@ -1050,7 +1054,8 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
|
||||
$$(MAKE) \
|
||||
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
|
||||
$(3)/test/run-make/$$* \
|
||||
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
|
||||
$$(CC_$(3)) \
|
||||
"$$(CFG_GCCISH_CFLAGS_$(3))" \
|
||||
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
|
||||
"$$(TESTNAME)" \
|
||||
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3)) \
|
||||
|
@ -1 +1 @@
|
||||
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">
|
||||
|
@ -95,5 +95,4 @@ languages:
|
||||
- [Russian](https://github.com/kgv/rust_book_ru)
|
||||
- [Korean](https://github.com/rust-kr/doc.rust-kr.org)
|
||||
- [Chinese](https://github.com/KaiserY/rust-book-chinese)
|
||||
- [Spanish](https://github.com/goyox86/elpr)
|
||||
|
||||
- [Spanish](https://goyox86.github.io/elpr)
|
||||
|
@ -21,12 +21,12 @@ Some things that might be helpful to you though:
|
||||
|
||||
# Reference
|
||||
|
||||
* [The Rust official site](http://rust-lang.org)
|
||||
* [The Rust reference](http://doc.rust-lang.org/reference.html)
|
||||
* [The Rust official site](https://www.rust-lang.org)
|
||||
* [The Rust reference](https://doc.rust-lang.org/reference.html)
|
||||
|
||||
# Docs
|
||||
|
||||
* [The standard library](http://doc.rust-lang.org/std/)
|
||||
* [The standard library](https://doc.rust-lang.org/std/)
|
||||
|
||||
<script>
|
||||
function get_url_fragments() {
|
||||
@ -58,7 +58,7 @@ function populate_rust_search() {
|
||||
// #18540, use a single token
|
||||
|
||||
var a = document.createElement("a");
|
||||
a.href = "http://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
|
||||
a.href = "https://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
|
||||
a.textContent = lt;
|
||||
var search = document.getElementById('core-search');
|
||||
search.innerHTML = "";
|
||||
|
@ -26,7 +26,7 @@ Every guideline has a status:
|
||||
|
||||
One purpose of these guidelines is to reach decisions on a number of
|
||||
cross-cutting API and stylistic choices. Discussion and development of
|
||||
the guidelines will happen primarily on http://discuss.rust-lang.org/,
|
||||
the guidelines will happen primarily on https://internals.rust-lang.org/,
|
||||
using the Guidelines category. Discussion can also occur on the
|
||||
[guidelines issue tracker](https://github.com/rust-lang/rust-guidelines).
|
||||
|
||||
|
@ -57,7 +57,7 @@ fn write_info(info: &Info) -> Result<(), IoError> {
|
||||
```
|
||||
|
||||
See
|
||||
[the `result` module documentation](http://static.rust-lang.org/doc/master/std/result/index.html#the-try!-macro)
|
||||
[the `result` module documentation](https://doc.rust-lang.org/stable/std/result/index.html#the-try!-macro)
|
||||
for more details.
|
||||
|
||||
### The `Result`-`impl` pattern [FIXME]
|
||||
|
@ -94,7 +94,7 @@ aspects of the input that are not covered by the contract.
|
||||
### For obstructions, use `Result`
|
||||
|
||||
The
|
||||
[`Result<T,E>` type](http://static.rust-lang.org/doc/master/std/result/index.html)
|
||||
[`Result<T,E>` type](https://doc.rust-lang.org/stable/std/result/index.html)
|
||||
represents either a success (yielding `T`) or failure (yielding `E`). By
|
||||
returning a `Result`, a function allows its clients to discover and react to
|
||||
obstructions in a fine-grained way.
|
||||
|
@ -124,7 +124,7 @@ that the caller already owns, for example to re-use a buffer:
|
||||
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize>
|
||||
```
|
||||
|
||||
(From the [Reader trait](http://static.rust-lang.org/doc/master/std/io/trait.Reader.html#tymethod.read).)
|
||||
(From the [Read trait](https://doc.rust-lang.org/stable/std/io/trait.Read.html#tymethod.read).)
|
||||
|
||||
### Consider validating arguments, statically or dynamically. [FIXME: needs RFC]
|
||||
|
||||
@ -132,7 +132,7 @@ _Note: this material is closely related to
|
||||
[library-level guarantees](../../safety/lib-guarantees.md)._
|
||||
|
||||
Rust APIs do _not_ generally follow the
|
||||
[robustness principle](http://en.wikipedia.org/wiki/Robustness_principle): "be
|
||||
[robustness principle](https://en.wikipedia.org/wiki/Robustness_principle): "be
|
||||
conservative in what you send; be liberal in what you accept".
|
||||
|
||||
Instead, Rust code should _enforce_ the validity of input whenever practical.
|
||||
@ -147,24 +147,26 @@ Choose an argument type that rules out bad inputs.
|
||||
For example, prefer
|
||||
|
||||
```rust
|
||||
fn foo(a: ascii::Ascii) { ... }
|
||||
enum FooMode {
|
||||
Mode1,
|
||||
Mode2,
|
||||
Mode3,
|
||||
}
|
||||
fn foo(mode: FooMode) { ... }
|
||||
```
|
||||
|
||||
over
|
||||
|
||||
```rust
|
||||
fn foo(a: u8) { ... }
|
||||
fn foo(mode2: bool, mode3: bool) {
|
||||
assert!(!mode2 || !mode3);
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Note that
|
||||
[`ascii::Ascii`](http://static.rust-lang.org/doc/master/std/ascii/struct.Ascii.html)
|
||||
is a _wrapper_ around `u8` that guarantees the highest bit is zero; see
|
||||
[newtype patterns](../types/newtype.md) for more details on creating typesafe wrappers.
|
||||
|
||||
Static enforcement usually comes at little run-time cost: it pushes the
|
||||
costs to the boundaries (e.g. when a `u8` is first converted into an
|
||||
`Ascii`). It also catches bugs early, during compilation, rather than through
|
||||
run-time failures.
|
||||
costs to the boundaries. It also catches bugs early, during compilation,
|
||||
rather than through run-time failures.
|
||||
|
||||
On the other hand, some properties are difficult or impossible to
|
||||
express using types.
|
||||
@ -177,7 +179,7 @@ downsides:
|
||||
|
||||
1. Runtime overhead (unless checking can be done as part of processing the input).
|
||||
2. Delayed detection of bugs.
|
||||
3. Introduces failure cases, either via `fail!` or `Result`/`Option` types (see
|
||||
3. Introduces failure cases, either via `panic!` or `Result`/`Option` types (see
|
||||
the [error handling guidelines](../../errors/README.md)), which must then be
|
||||
dealt with by client code.
|
||||
|
||||
|
@ -58,13 +58,13 @@ For modules that themselves have submodules, place the module in a separate
|
||||
directory (e.g., `bar/mod.rs` for a module `bar`) rather than the same directory.
|
||||
|
||||
Note the structure of
|
||||
[`std::io`](http://doc.rust-lang.org/std/io/). Many of the submodules lack
|
||||
[`std::io`](https://doc.rust-lang.org/std/io/). Many of the submodules lack
|
||||
children, like
|
||||
[`io::fs`](http://doc.rust-lang.org/std/io/fs/)
|
||||
[`io::fs`](https://doc.rust-lang.org/std/io/fs/)
|
||||
and
|
||||
[`io::stdio`](http://doc.rust-lang.org/std/io/stdio/).
|
||||
[`io::stdio`](https://doc.rust-lang.org/std/io/stdio/).
|
||||
On the other hand,
|
||||
[`io::net`](http://doc.rust-lang.org/std/io/net/)
|
||||
[`io::net`](https://doc.rust-lang.org/std/io/net/)
|
||||
contains submodules, so it lives in a separate directory:
|
||||
|
||||
```
|
||||
@ -88,7 +88,7 @@ submodules of `io::net` easier to find.
|
||||
### Consider top-level definitions or reexports. [FIXME: needs RFC]
|
||||
|
||||
For modules with submodules,
|
||||
define or [reexport](http://doc.rust-lang.org/std/io/#reexports) commonly used
|
||||
define or [reexport](https://doc.rust-lang.org/std/io/#reexports) commonly used
|
||||
definitions at the top level:
|
||||
|
||||
* Functionality relevant to the module itself or to many of its
|
||||
@ -98,10 +98,10 @@ definitions at the top level:
|
||||
common definitions.
|
||||
|
||||
For example,
|
||||
[`IoError`](http://doc.rust-lang.org/std/io/struct.IoError.html)
|
||||
[`IoError`](https://doc.rust-lang.org/std/io/struct.IoError.html)
|
||||
is defined in `io/mod.rs`, since it pertains to the entirety of `io`,
|
||||
while
|
||||
[`TcpStream`](http://doc.rust-lang.org/std/io/net/tcp/struct.TcpStream.html)
|
||||
[`TcpStream`](https://doc.rust-lang.org/std/io/net/tcp/struct.TcpStream.html)
|
||||
is defined in `io/net/tcp.rs` and reexported in the `io` module.
|
||||
|
||||
### Use internal module hirearchies for organization. [FIXME: needs RFC]
|
||||
@ -113,11 +113,11 @@ is defined in `io/net/tcp.rs` and reexported in the `io` module.
|
||||
Internal module hirearchies (i.e., private submodules) may be used to
|
||||
hide implementation details that are not part of the module's API.
|
||||
|
||||
For example, in [`std::io`](http://doc.rust-lang.org/std/io/), `mod mem`
|
||||
For example, in [`std::io`](https://doc.rust-lang.org/std/io/), `mod mem`
|
||||
provides implementations for
|
||||
[`BufReader`](http://doc.rust-lang.org/std/io/struct.BufReader.html)
|
||||
[`BufReader`](https://doc.rust-lang.org/std/io/struct.BufReader.html)
|
||||
and
|
||||
[`BufWriter`](http://doc.rust-lang.org/std/io/struct.BufWriter.html),
|
||||
[`BufWriter`](https://doc.rust-lang.org/std/io/struct.BufWriter.html),
|
||||
but these are re-exported in `io/mod.rs` at the top level of the module:
|
||||
|
||||
```rust
|
||||
|
@ -32,7 +32,7 @@ treatment of ownership, as described below.
|
||||
|
||||
In some cases, constructing the final `T` does not require the builder itself to
|
||||
be consumed. The follow variant on
|
||||
[`std::io::process::Command`](http://static.rust-lang.org/doc/master/std/io/process/struct.Command.html)
|
||||
[`std::process::Command`](https://doc.rust-lang.org/stable/std/process/struct.Command.html)
|
||||
is one example:
|
||||
|
||||
```rust
|
||||
|
@ -13,7 +13,7 @@ even though some of these abstractions feel like those of a high-level
|
||||
language. Even then, Rust still allows precise control like a low-level
|
||||
language would.
|
||||
|
||||
[rust]: http://rust-lang.org
|
||||
[rust]: https://www.rust-lang.org
|
||||
|
||||
“The Rust Programming Language” is split into eight sections. This introduction
|
||||
is the first. After this:
|
||||
|
@ -115,7 +115,7 @@ In addition to procedural macros, you can define new
|
||||
extensions. See
|
||||
[`Registry::register_syntax_extension`](../rustc/plugin/registry/struct.Registry.html#method.register_syntax_extension)
|
||||
and the [`SyntaxExtension`
|
||||
enum](http://doc.rust-lang.org/syntax/ext/base/enum.SyntaxExtension.html). For
|
||||
enum](https://doc.rust-lang.org/syntax/ext/base/enum.SyntaxExtension.html). For
|
||||
a more involved macro example, see
|
||||
[`regex_macros`](https://github.com/rust-lang/regex/blob/master/regex_macros/src/lib.rs).
|
||||
|
||||
@ -156,7 +156,7 @@ so that the compiler can continue and find further errors.
|
||||
To print syntax fragments for debugging, you can use
|
||||
[`span_note`](../syntax/ext/base/struct.ExtCtxt.html#method.span_note) together
|
||||
with
|
||||
[`syntax::print::pprust::*_to_string`](http://doc.rust-lang.org/syntax/print/pprust/index.html#functions).
|
||||
[`syntax::print::pprust::*_to_string`](https://doc.rust-lang.org/syntax/print/pprust/index.html#functions).
|
||||
|
||||
The example above produced an integer literal using
|
||||
[`AstBuilder::expr_usize`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_usize).
|
||||
|
@ -76,7 +76,7 @@ This [unfortunate error](https://github.com/rust-lang/rust/issues/22547) is
|
||||
correct: documentation comments apply to the thing after them, and there's no
|
||||
thing after that last comment.
|
||||
|
||||
[rc-new]: http://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
|
||||
[rc-new]: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
|
||||
|
||||
### Writing documentation comments
|
||||
|
||||
@ -544,9 +544,9 @@ You can control a few aspects of the HTML that `rustdoc` generates through the
|
||||
`#![doc]` version of the attribute:
|
||||
|
||||
```rust
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/")]
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
|
||||
html_root_url = "https://doc.rust-lang.org/")]
|
||||
```
|
||||
|
||||
This sets a few different options, with a logo, favicon, and a root URL.
|
||||
|
@ -32,7 +32,7 @@ install dialog and on the "Product Features" page ensure "Add to PATH" is
|
||||
installed on the local hard drive.
|
||||
|
||||
|
||||
[install-page]: http://www.rust-lang.org/install.html
|
||||
[install-page]: https://www.rust-lang.org/install.html
|
||||
|
||||
## Uninstalling
|
||||
|
||||
@ -85,10 +85,10 @@ $ rustc --version
|
||||
```
|
||||
|
||||
You should see the version number, commit hash, and commit date. If you just
|
||||
installed version 1.0.0, you should see:
|
||||
installed version 1.2.0, you should see:
|
||||
|
||||
```bash
|
||||
rustc 1.0.0 (a59de37e9 2015-05-13)
|
||||
rustc 1.2.0 (082e47636 2015-08-03)
|
||||
```
|
||||
|
||||
If you did, Rust has been installed successfully! Congrats!
|
||||
@ -112,5 +112,5 @@ resources include [the user’s forum][users], and
|
||||
|
||||
[irc]: irc://irc.mozilla.org/#rust
|
||||
[mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
|
||||
[users]: http://users.rust-lang.org/
|
||||
[users]: https://users.rust-lang.org/
|
||||
[stackoverflow]: http://stackoverflow.com/questions/tagged/rust
|
||||
|
@ -50,7 +50,7 @@ documentation on [building Rust from Source][from-source], or [the official
|
||||
binary downloads][install-page].
|
||||
|
||||
[from-source]: https://github.com/rust-lang/rust#building-from-source
|
||||
[install-page]: http://www.rust-lang.org/install.html
|
||||
[install-page]: https://www.rust-lang.org/install.html
|
||||
|
||||
Oh, we should also mention the officially supported platforms:
|
||||
|
||||
@ -95,5 +95,5 @@ resources include [the user’s forum][users], and [Stack Overflow][stackoverflo
|
||||
|
||||
[irc]: irc://irc.mozilla.org/#rust
|
||||
[mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
|
||||
[users]: http://users.rust-lang.org/
|
||||
[users]: https://users.rust-lang.org/
|
||||
[stackoverflow]: http://stackoverflow.com/questions/tagged/rust
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div id="versioninfo">
|
||||
<img src="http://www.rust-lang.org/logos/rust-logo-32x32-blk.png" width="32" height="32" alt><br>
|
||||
<span class="white-sticker"><a href="http://rust-lang.org">Rust</a> VERSION</span><br>
|
||||
<a href="http://github.com/rust-lang/rust/commit/STAMP"
|
||||
<img src="https://www.rust-lang.org/logos/rust-logo-32x32-blk.png" width="32" height="32" alt><br>
|
||||
<span class="white-sticker"><a href="https://www.rust-lang.org">Rust</a> VERSION</span><br>
|
||||
<a href="https://github.com/rust-lang/rust/commit/STAMP"
|
||||
class="hash white-sticker">SHORT_HASH</a>
|
||||
</div>
|
||||
|
@ -41,14 +41,14 @@ def convert_path_spec(name, value):
|
||||
make = sys.argv[2]
|
||||
putenv('RUSTC', os.path.abspath(sys.argv[3]))
|
||||
putenv('TMPDIR', os.path.abspath(sys.argv[4]))
|
||||
putenv('CC', sys.argv[5])
|
||||
putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
|
||||
filt = sys.argv[7]
|
||||
putenv('LD_LIB_PATH_ENVVAR', sys.argv[8])
|
||||
putenv('HOST_RPATH_DIR', os.path.abspath(sys.argv[9]))
|
||||
putenv('TARGET_RPATH_DIR', os.path.abspath(sys.argv[10]))
|
||||
putenv('RUST_BUILD_STAGE', sys.argv[11])
|
||||
putenv('S', os.path.abspath(sys.argv[12]))
|
||||
putenv('CC', sys.argv[5] + ' ' + sys.argv[6])
|
||||
putenv('RUSTDOC', os.path.abspath(sys.argv[7]))
|
||||
filt = sys.argv[8]
|
||||
putenv('LD_LIB_PATH_ENVVAR', sys.argv[9])
|
||||
putenv('HOST_RPATH_DIR', os.path.abspath(sys.argv[10]))
|
||||
putenv('TARGET_RPATH_DIR', os.path.abspath(sys.argv[11]))
|
||||
putenv('RUST_BUILD_STAGE', sys.argv[12])
|
||||
putenv('S', os.path.abspath(sys.argv[13]))
|
||||
putenv('PYTHON', sys.executable)
|
||||
|
||||
if filt not in sys.argv[1]:
|
||||
|
@ -71,9 +71,6 @@
|
||||
|
||||
use boxed::Box;
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::atomic;
|
||||
use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
|
||||
use core::fmt;
|
||||
|
@ -53,9 +53,6 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use heap;
|
||||
use raw_vec::RawVec;
|
||||
|
||||
|
@ -64,9 +64,9 @@
|
||||
#![unstable(feature = "alloc",
|
||||
reason = "this library is unlikely to be stabilized in its current \
|
||||
form or name")]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
test(no_crate_inject))]
|
||||
#![no_std]
|
||||
|
||||
@ -92,7 +92,6 @@
|
||||
#![feature(unsize)]
|
||||
#![feature(core_slice_ext)]
|
||||
#![feature(core_str_ext)]
|
||||
#![cfg_attr(stage0, feature(core, core_prelude))]
|
||||
|
||||
#![cfg_attr(test, feature(test, alloc, rustc_private, box_raw))]
|
||||
#![cfg_attr(all(not(feature = "external_funcs"), not(feature = "external_crate")),
|
||||
@ -101,8 +100,6 @@
|
||||
#[cfg(all(not(feature = "external_funcs"), not(feature = "external_crate")))]
|
||||
extern crate libc;
|
||||
|
||||
#[cfg(stage0)] #[macro_use] extern crate core;
|
||||
|
||||
// Allow testing this library
|
||||
|
||||
#[cfg(test)] #[macro_use] extern crate std;
|
||||
|
@ -150,9 +150,6 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
#[cfg(not(test))]
|
||||
use boxed::Box;
|
||||
#[cfg(test)]
|
||||
|
@ -26,9 +26,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(alloc)]
|
||||
#![feature(box_syntax)]
|
||||
|
@ -151,9 +151,6 @@
|
||||
#![allow(missing_docs)]
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::iter::{FromIterator};
|
||||
use core::mem::swap;
|
||||
use core::ptr;
|
||||
|
@ -86,9 +86,6 @@
|
||||
//! println!("There are {} primes below {}", num_primes, max_prime);
|
||||
//! ```
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::cmp::Ordering;
|
||||
use core::cmp;
|
||||
use core::fmt;
|
||||
|
@ -17,9 +17,6 @@
|
||||
|
||||
use self::Entry::*;
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::cmp::Ordering;
|
||||
use core::fmt::Debug;
|
||||
use core::hash::{Hash, Hasher};
|
||||
@ -531,8 +528,6 @@ enum Continuation<A, B> {
|
||||
/// to nodes. By using this module much better safety guarantees can be made, and more search
|
||||
/// boilerplate gets cut out.
|
||||
mod stack {
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
use core::marker;
|
||||
use core::mem;
|
||||
use core::ops::{Deref, DerefMut};
|
||||
|
@ -16,9 +16,6 @@ pub use self::SearchResult::*;
|
||||
pub use self::ForceResult::*;
|
||||
pub use self::TraversalItem::*;
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::cmp::Ordering::{Greater, Less, Equal};
|
||||
use core::intrinsics::arith_offset;
|
||||
use core::iter::Zip;
|
||||
|
@ -11,9 +11,6 @@
|
||||
// This is pretty much entirely stolen from TreeSet, since BTreeMap has an identical interface
|
||||
// to TreeMap
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::cmp::Ordering::{self, Less, Greater, Equal};
|
||||
use core::fmt::Debug;
|
||||
use core::fmt;
|
||||
|
@ -17,9 +17,6 @@
|
||||
reason = "matches collection reform specification, \
|
||||
waiting for dust to settle")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::marker;
|
||||
use core::fmt;
|
||||
use core::iter::{FromIterator};
|
||||
|
@ -21,10 +21,10 @@
|
||||
#![unstable(feature = "collections",
|
||||
reason = "library is unlikely to be stabilized with the current \
|
||||
layout and name, use std::collections instead")]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/",
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/",
|
||||
test(no_crate_inject))]
|
||||
|
||||
#![allow(trivial_casts)]
|
||||
@ -59,13 +59,10 @@
|
||||
#![feature(utf8_error)]
|
||||
#![cfg_attr(test, feature(rand, test))]
|
||||
#![cfg_attr(not(test), feature(str_words))]
|
||||
#![cfg_attr(stage0, feature(core, core_prelude))]
|
||||
|
||||
#![feature(no_std)]
|
||||
#![no_std]
|
||||
|
||||
#[cfg(stage0)] #[macro_use] extern crate core;
|
||||
|
||||
extern crate rustc_unicode;
|
||||
extern crate alloc;
|
||||
|
||||
|
@ -21,9 +21,6 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use alloc::boxed::Box;
|
||||
use core::cmp::Ordering;
|
||||
use core::fmt;
|
||||
|
@ -12,9 +12,6 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::fmt;
|
||||
use core::hash;
|
||||
use core::iter::FromIterator;
|
||||
|
@ -58,9 +58,6 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use alloc::raw_vec::RawVec;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::heap::EMPTY;
|
||||
|
@ -18,9 +18,6 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::cmp::Ordering;
|
||||
use core::fmt;
|
||||
use core::iter::{self, repeat, FromIterator, RandomAccessIterator};
|
||||
|
@ -20,9 +20,6 @@
|
||||
|
||||
use self::Entry::*;
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::cmp::{max, Ordering};
|
||||
use core::fmt;
|
||||
use core::hash::{Hash, Hasher};
|
||||
|
@ -54,34 +54,32 @@
|
||||
stabilization in terms of structure and naming")]
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
#![doc(test(no_crate_inject))]
|
||||
|
||||
#![cfg_attr(stage0, feature(no_std))]
|
||||
#![cfg_attr(stage0, no_std)]
|
||||
#![cfg_attr(not(stage0), feature(no_core))]
|
||||
#![cfg_attr(not(stage0), no_core)]
|
||||
#![no_core]
|
||||
#![allow(raw_pointer_derive)]
|
||||
#![deny(missing_docs)]
|
||||
|
||||
#![feature(allow_internal_unstable)]
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(concat_idents)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(custom_attribute)]
|
||||
#![feature(fundamental)]
|
||||
#![feature(intrinsics)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(no_core)]
|
||||
#![feature(on_unimplemented)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(reflect)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(simd)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(fundamental)]
|
||||
#![feature(concat_idents)]
|
||||
#![feature(reflect)]
|
||||
#![feature(custom_attribute)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(allow_internal_unstable)]
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
@ -159,25 +157,3 @@ pub mod fmt;
|
||||
|
||||
// note: does not need to be public
|
||||
mod tuple;
|
||||
|
||||
// A curious inner-module that's not exported that contains the bindings of core
|
||||
// so that compiler-expanded references to `core::$foo` can be resolved within
|
||||
// core itself.
|
||||
//
|
||||
// Note that no crate-defined macros require this module due to the existence of
|
||||
// the `$crate` meta variable, only those expansions defined in the compiler
|
||||
// require this. This is because the compiler doesn't currently know that it's
|
||||
// compiling the core library when it's compiling this library, so it expands
|
||||
// all references to `::core::$foo`
|
||||
#[doc(hidden)]
|
||||
#[cfg(stage0)]
|
||||
mod core {
|
||||
pub use intrinsics; // derive(PartialOrd)
|
||||
pub use fmt; // format_args!
|
||||
pub use clone; // derive(Clone)
|
||||
pub use cmp; // derive(Ord)
|
||||
pub use hash; // derive(Hash)
|
||||
pub use marker; // derive(Copy)
|
||||
pub use option; // iterator protocol
|
||||
pub use iter; // iterator protocol
|
||||
}
|
||||
|
@ -21,9 +21,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(libc)]
|
||||
#![feature(staged_api)]
|
||||
|
@ -21,10 +21,10 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
|
||||
#![feature(staged_api)]
|
||||
#![feature(unicode)]
|
||||
|
@ -84,10 +84,10 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
|
||||
#![deny(missing_docs)]
|
||||
#![feature(staged_api)]
|
||||
|
@ -281,9 +281,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(into_cow)]
|
||||
#![feature(str_escape)]
|
||||
|
@ -15,13 +15,12 @@
|
||||
#![cfg_attr(not(feature = "cargo-build"), unstable(feature = "libc",
|
||||
reason = "use `libc` from crates.io"))]
|
||||
#![cfg_attr(not(feature = "cargo-build"), feature(staged_api, no_std))]
|
||||
#![cfg_attr(all(not(feature = "cargo-build"), stage0), feature(core))]
|
||||
#![cfg_attr(not(feature = "cargo-build"), staged_api)]
|
||||
#![cfg_attr(not(feature = "cargo-build"), no_std)]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
|
||||
//! Bindings for the C standard library and other platform libraries
|
||||
@ -79,7 +78,6 @@
|
||||
#![allow(bad_style, raw_pointer_derive)]
|
||||
#![cfg_attr(target_os = "nacl", allow(unused_imports))]
|
||||
#[cfg(feature = "cargo-build")] extern crate std as core;
|
||||
#[cfg(all(stage0, not(feature = "cargo-build")))] extern crate core;
|
||||
|
||||
#[cfg(test)] extern crate std;
|
||||
#[cfg(test)] extern crate test;
|
||||
|
@ -163,10 +163,10 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
#![deny(missing_docs)]
|
||||
|
||||
#![feature(box_raw)]
|
||||
|
@ -10,9 +10,6 @@
|
||||
|
||||
//! The ChaCha random number generator.
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use {Rng, SeedableRng, Rand};
|
||||
|
||||
const KEY_WORDS : usize = 8; // 8 words for the 256-bit key
|
||||
|
@ -17,9 +17,6 @@
|
||||
//! internally. The `IndependentSample` trait is for generating values
|
||||
//! that do not need to record state.
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::num::Float;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
|
@ -12,9 +12,6 @@
|
||||
|
||||
// this is surprisingly complicated to be both generic & correct
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::PartialOrd;
|
||||
|
||||
use Rng;
|
||||
use distributions::{Sample, IndependentSample};
|
||||
|
||||
|
@ -12,9 +12,6 @@
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::slice;
|
||||
use core::iter::repeat;
|
||||
use core::num::Wrapping as w;
|
||||
|
@ -20,10 +20,10 @@
|
||||
#![cfg_attr(stage0, feature(custom_attribute))]
|
||||
#![crate_name = "rand"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
#![no_std]
|
||||
#![staged_api]
|
||||
#![unstable(feature = "rand",
|
||||
@ -34,20 +34,14 @@
|
||||
#![feature(num_bits_bytes)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(step_by)]
|
||||
#![cfg_attr(stage0, feature(core, core_prelude))]
|
||||
|
||||
#![cfg_attr(test, feature(test, rand, rustc_private, iter_order))]
|
||||
|
||||
#![allow(deprecated)]
|
||||
|
||||
#[cfg(stage0)] #[macro_use] extern crate core;
|
||||
|
||||
#[cfg(test)] #[macro_use] extern crate std;
|
||||
#[cfg(test)] #[macro_use] extern crate log;
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::marker::PhantomData;
|
||||
|
||||
pub use isaac::{IsaacRng, Isaac64Rng};
|
||||
|
@ -10,9 +10,6 @@
|
||||
|
||||
//! The implementations of `Rand` for the built-in types.
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::char;
|
||||
use core::isize;
|
||||
use core::usize;
|
||||
|
@ -11,9 +11,6 @@
|
||||
//! A wrapper around another RNG that reseeds it after it
|
||||
//! generates a certain number of random bytes.
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use {Rng, SeedableRng};
|
||||
|
||||
/// How many bytes of entropy the underling RNG is allowed to generate
|
||||
|
@ -118,10 +118,10 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(staged_api)]
|
||||
|
@ -4,7 +4,7 @@ An informal guide to reading and working on the rustc compiler.
|
||||
If you wish to expand on this document, or have a more experienced
|
||||
Rust contributor add anything else to it, please get in touch:
|
||||
|
||||
* http://internals.rust-lang.org/
|
||||
* https://internals.rust-lang.org/
|
||||
* https://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
|
||||
|
||||
or file a bug:
|
||||
|
@ -21,9 +21,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(append)]
|
||||
#![feature(associated_consts)]
|
||||
@ -179,5 +179,18 @@ mod rustc {
|
||||
pub use lint;
|
||||
}
|
||||
|
||||
// FIXME(#27438): right now the unit tests of librustc don't refer to any actual
|
||||
// functions generated in librustc_data_structures (all
|
||||
// references are through generic functions), but statics are
|
||||
// referenced from time to time. Due to this bug we won't
|
||||
// actually correctly link in the statics unless we also
|
||||
// reference a function, so be sure to reference a dummy
|
||||
// function.
|
||||
#[test]
|
||||
fn noop() {
|
||||
rustc_data_structures::__noop_fix_for_27438();
|
||||
}
|
||||
|
||||
|
||||
// Build the diagnostics array at the end so that the metadata includes error use sites.
|
||||
__build_diagnostic_array! { librustc, DIAGNOSTICS }
|
||||
|
@ -28,9 +28,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![feature(fs_canonicalize)]
|
||||
|
@ -77,8 +77,8 @@ fn target_cpu(arch: Arch) -> String {
|
||||
Armv7 => "cortex-a8", // iOS7 is supported on iPhone 4 and higher
|
||||
Armv7s => "cortex-a9",
|
||||
Arm64 => "cyclone",
|
||||
I386 => "generic",
|
||||
X86_64 => "x86-64",
|
||||
I386 => "yonah",
|
||||
X86_64 => "core2",
|
||||
}.to_string()
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ use target::Target;
|
||||
pub fn target() -> Target {
|
||||
let mut base = super::windows_msvc_base::opts();
|
||||
base.cpu = "x86-64".to_string();
|
||||
base.custom_unwind_resume = true;
|
||||
|
||||
Target {
|
||||
llvm_target: "x86_64-pc-windows-msvc".to_string(),
|
||||
|
@ -158,6 +158,60 @@ fn main(){
|
||||
x = 5;
|
||||
}
|
||||
```
|
||||
"##,
|
||||
|
||||
E0387: r##"
|
||||
This error occurs when an attempt is made to mutate or mutably reference data
|
||||
that a closure has captured immutably. Examples of this error are shown below:
|
||||
|
||||
```
|
||||
// Accepts a function or a closure that captures its environment immutably.
|
||||
// Closures passed to foo will not be able to mutate their closed-over state.
|
||||
fn foo<F: Fn()>(f: F) { }
|
||||
|
||||
// Attempts to mutate closed-over data. Error message reads:
|
||||
// `cannot assign to data in a captured outer variable...`
|
||||
fn mutable() {
|
||||
let mut x = 0u32;
|
||||
foo(|| x = 2);
|
||||
}
|
||||
|
||||
// Attempts to take a mutable reference to closed-over data. Error message
|
||||
// reads: `cannot borrow data mutably in a captured outer variable...`
|
||||
fn mut_addr() {
|
||||
let mut x = 0u32;
|
||||
foo(|| { let y = &mut x; });
|
||||
}
|
||||
```
|
||||
|
||||
The problem here is that foo is defined as accepting a parameter of type `Fn`.
|
||||
Closures passed into foo will thus be inferred to be of type `Fn`, meaning that
|
||||
they capture their context immutably.
|
||||
|
||||
If the definition of `foo` is under your control, the simplest solution is to
|
||||
capture the data mutably. This can be done by defining `foo` to take FnMut
|
||||
rather than Fn:
|
||||
|
||||
```
|
||||
fn foo<F: FnMut()>(f: F) { }
|
||||
```
|
||||
|
||||
Alternatively, we can consider using the `Cell` and `RefCell` types to achieve
|
||||
interior mutability through a shared reference. Our example's `mutable` function
|
||||
could be redefined as below:
|
||||
|
||||
```
|
||||
use std::cell::Cell;
|
||||
|
||||
fn mutable() {
|
||||
let x = Cell::new(0u32);
|
||||
foo(|| x.set(2));
|
||||
}
|
||||
```
|
||||
|
||||
You can read more about cell types in the API documentation:
|
||||
|
||||
https://doc.rust-lang.org/std/cell/
|
||||
"##
|
||||
|
||||
}
|
||||
@ -166,7 +220,6 @@ register_diagnostics! {
|
||||
E0383, // partial reinitialization of uninitialized structure
|
||||
E0385, // {} in an aliasable location
|
||||
E0386, // {} in an immutable container
|
||||
E0387, // {} in a captured outer variable in an `Fn` closure
|
||||
E0388, // {} in a static location
|
||||
E0389 // {} in a `&` reference
|
||||
}
|
||||
|
@ -15,9 +15,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
|
@ -23,9 +23,9 @@
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![staged_api]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(rustc_private, staged_api)]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
@ -38,3 +38,7 @@ pub mod graph;
|
||||
pub mod bitvec;
|
||||
pub mod ivar;
|
||||
pub mod unify;
|
||||
|
||||
// See comments in src/librustc/lib.rs
|
||||
#[doc(hidden)]
|
||||
pub fn __noop_fix_for_27438() {}
|
||||
|
@ -21,9 +21,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![feature(libc)]
|
||||
|
@ -26,9 +26,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![cfg_attr(test, feature(test))]
|
||||
#![feature(box_patterns)]
|
||||
|
@ -21,9 +21,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(associated_consts)]
|
||||
#![feature(box_syntax)]
|
||||
@ -31,7 +31,7 @@
|
||||
#![feature(link_args)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(vec_push_all)]
|
||||
#![cfg_attr(not(stage0), feature(linked_from))]
|
||||
#![feature(linked_from)]
|
||||
|
||||
extern crate libc;
|
||||
#[macro_use] #[no_link] extern crate rustc_bitflags;
|
||||
@ -599,7 +599,7 @@ pub mod debuginfo {
|
||||
// automatically updated whenever LLVM is updated to include an up-to-date
|
||||
// set of the libraries we need to link to LLVM for.
|
||||
#[link(name = "rustllvm", kind = "static")]
|
||||
#[cfg_attr(not(stage0), linked_from = "rustllvm")] // not quite true but good enough
|
||||
#[linked_from = "rustllvm"] // not quite true but good enough
|
||||
extern {
|
||||
/* Create and destroy contexts. */
|
||||
pub fn LLVMContextCreate() -> ContextRef;
|
||||
|
@ -15,9 +15,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
#![feature(rustc_private)]
|
||||
|
@ -46,7 +46,7 @@ fn f() {
|
||||
See the Declaration Statements section of the reference for more information
|
||||
about what constitutes an Item declaration and what does not:
|
||||
|
||||
http://doc.rust-lang.org/reference.html#statements
|
||||
https://doc.rust-lang.org/reference.html#statements
|
||||
"##,
|
||||
|
||||
E0251: r##"
|
||||
@ -201,7 +201,7 @@ struct abc;
|
||||
See the Declaration Statements section of the reference for more information
|
||||
about what constitutes an Item declaration and what does not:
|
||||
|
||||
http://doc.rust-lang.org/reference.html#statements
|
||||
https://doc.rust-lang.org/reference.html#statements
|
||||
"##,
|
||||
|
||||
E0317: r##"
|
||||
@ -212,7 +212,7 @@ name as an existing primitive type.
|
||||
See the Types section of the reference for more information about the primitive
|
||||
types:
|
||||
|
||||
http://doc.rust-lang.org/reference.html#types
|
||||
https://doc.rust-lang.org/reference.html#types
|
||||
"##,
|
||||
|
||||
E0364: r##"
|
||||
@ -241,7 +241,7 @@ pub use foo::X;
|
||||
See the 'Use Declarations' section of the reference for more information
|
||||
on this topic:
|
||||
|
||||
http://doc.rust-lang.org/reference.html#use-declarations
|
||||
https://doc.rust-lang.org/reference.html#use-declarations
|
||||
"##,
|
||||
|
||||
E0365: r##"
|
||||
@ -270,7 +270,7 @@ pub use foo as foo2;
|
||||
See the 'Use Declarations' section of the reference for more information
|
||||
on this topic:
|
||||
|
||||
http://doc.rust-lang.org/reference.html#use-declarations
|
||||
https://doc.rust-lang.org/reference.html#use-declarations
|
||||
"##,
|
||||
|
||||
E0403: r##"
|
||||
@ -627,21 +627,29 @@ trait Foo {
|
||||
Self; // error: unresolved name `Self`
|
||||
}
|
||||
}
|
||||
|
||||
// or:
|
||||
let x = unknown_variable; // error: unresolved name `unknown_variable`
|
||||
```
|
||||
|
||||
Please verify you didn't misspell the name or that you're not using an
|
||||
invalid object. Example:
|
||||
Please verify that the name wasn't misspelled and ensure that the
|
||||
identifier being referred to is valid for the given situation. Example:
|
||||
|
||||
```
|
||||
enum something_that_does_exist {
|
||||
foo
|
||||
}
|
||||
|
||||
// or:
|
||||
mod something_that_does_exist {
|
||||
pub static foo : i32 = 0i32;
|
||||
}
|
||||
|
||||
something_that_does_exist::foo; // ok!
|
||||
|
||||
// or:
|
||||
let unknown_variable = 12u32;
|
||||
let x = unknown_variable; // ok!
|
||||
```
|
||||
"##,
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(associated_consts)]
|
||||
#![feature(borrow_state)]
|
||||
|
@ -21,9 +21,9 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
|
@ -745,13 +745,22 @@ pub fn invoke<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns whether this session's target will use SEH-based unwinding.
|
||||
///
|
||||
/// This is only true for MSVC targets, and even then the 64-bit MSVC target
|
||||
/// currently uses SEH-ish unwinding with DWARF info tables to the side (same as
|
||||
/// 64-bit MinGW) instead of "full SEH".
|
||||
pub fn wants_msvc_seh(sess: &Session) -> bool {
|
||||
sess.target.target.options.is_like_msvc && sess.target.target.arch == "x86"
|
||||
}
|
||||
|
||||
pub fn need_invoke(bcx: Block) -> bool {
|
||||
// FIXME(#25869) currently unwinding is not implemented for MSVC and our
|
||||
// normal unwinding infrastructure ends up just causing linker
|
||||
// errors with the current LLVM implementation, so landing
|
||||
// pads are disabled entirely for MSVC targets
|
||||
if bcx.sess().no_landing_pads() ||
|
||||
bcx.sess().target.target.options.is_like_msvc {
|
||||
// FIXME(#25869) currently SEH-based unwinding is pretty buggy in LLVM and
|
||||
// is being overhauled as this is being written. Until that
|
||||
// time such that upstream LLVM's implementation is more solid
|
||||
// and we start binding it we need to skip invokes for any
|
||||
// target which wants SEH-based unwinding.
|
||||
if bcx.sess().no_landing_pads() || wants_msvc_seh(bcx.sess()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -42,10 +42,10 @@ pub fn compute_abi_info(ccx: &CrateContext,
|
||||
let ty = match t.kind() {
|
||||
Struct => {
|
||||
match llsize_of_alloc(ccx, t) {
|
||||
1 => ArgType::direct(rty, Some(Type::i8(ccx)), None, None),
|
||||
2 => ArgType::direct(rty, Some(Type::i16(ccx)), None, None),
|
||||
4 => ArgType::direct(rty, Some(Type::i32(ccx)), None, None),
|
||||
8 => ArgType::direct(rty, Some(Type::i64(ccx)), None, None),
|
||||
1 => ArgType::direct(t, Some(Type::i8(ccx)), None, None),
|
||||
2 => ArgType::direct(t, Some(Type::i16(ccx)), None, None),
|
||||
4 => ArgType::direct(t, Some(Type::i32(ccx)), None, None),
|
||||
8 => ArgType::direct(t, Some(Type::i64(ccx)), None, None),
|
||||
_ => ArgType::indirect(t, Some(Attribute::ByVal))
|
||||
}
|
||||
}
|
||||
|
@ -595,7 +595,7 @@ impl<'a, 'tcx> FunctionContext<'a, 'tcx> {
|
||||
// landing pads as "landing pads for SEH".
|
||||
let target = &self.ccx.sess().target.target;
|
||||
match self.ccx.tcx().lang_items.eh_personality() {
|
||||
Some(def_id) if !target.options.is_like_msvc => {
|
||||
Some(def_id) if !base::wants_msvc_seh(self.ccx.sess()) => {
|
||||
callee::trans_fn_ref(self.ccx, def_id, ExprId(0),
|
||||
self.param_substs).val
|
||||
}
|
||||
@ -604,7 +604,7 @@ impl<'a, 'tcx> FunctionContext<'a, 'tcx> {
|
||||
match *personality {
|
||||
Some(llpersonality) => llpersonality,
|
||||
None => {
|
||||
let name = if !target.options.is_like_msvc {
|
||||
let name = if !base::wants_msvc_seh(self.ccx.sess()) {
|
||||
"rust_eh_personality"
|
||||
} else if target.arch == "x86" {
|
||||
"_except_handler3"
|
||||
|
@ -1037,7 +1037,7 @@ fn try_intrinsic<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
||||
Call(bcx, func, &[data], None, dloc);
|
||||
Store(bcx, C_null(Type::i8p(bcx.ccx())), dest);
|
||||
bcx
|
||||
} else if bcx.sess().target.target.options.is_like_msvc {
|
||||
} else if wants_msvc_seh(bcx.sess()) {
|
||||
trans_msvc_try(bcx, func, data, dest, dloc)
|
||||
} else {
|
||||
trans_gnu_try(bcx, func, data, dest, dloc)
|
||||
|
@ -190,7 +190,7 @@ trait_obj.method_two();
|
||||
You can read more about trait objects in the Trait Object section of the
|
||||
Reference:
|
||||
|
||||
http://doc.rust-lang.org/reference.html#trait-objects
|
||||
https://doc.rust-lang.org/reference.html#trait-objects
|
||||
"##,
|
||||
|
||||
E0034: r##"
|
||||
@ -642,6 +642,7 @@ item paths (ie, namespaced variables), dereferences, indexing expressions,
|
||||
and field references.
|
||||
|
||||
Let's start with some bad examples:
|
||||
|
||||
```
|
||||
use std::collections::LinkedList;
|
||||
|
||||
@ -653,8 +654,10 @@ LinkedList::new() += 1;
|
||||
fn some_func(i: &mut i32) {
|
||||
i += 12; // Error : '+=' operation cannot be applied on a reference !
|
||||
}
|
||||
```
|
||||
|
||||
And now some good examples:
|
||||
|
||||
```
|
||||
let mut i : i32 = 0;
|
||||
|
||||
@ -665,7 +668,6 @@ i += 12; // Good !
|
||||
fn some_func(i: &mut i32) {
|
||||
*i += 12; // Good !
|
||||
}
|
||||
|
||||
```
|
||||
"##,
|
||||
|
||||
@ -694,6 +696,7 @@ More details can be found here:
|
||||
https://doc.rust-lang.org/reference.html#lvalues,-rvalues-and-temporaries
|
||||
|
||||
Now, we can go further. Here are some bad examples:
|
||||
|
||||
```
|
||||
struct SomeStruct {
|
||||
x: i32,
|
||||
@ -1322,7 +1325,7 @@ fn bar(x: &str, y: &str) -> &str { ... }
|
||||
fn baz<'a>(x: &'a str, y: &str) -> &str { ... }
|
||||
```
|
||||
|
||||
[book-le]: http://doc.rust-lang.org/nightly/book/lifetimes.html#lifetime-elision
|
||||
[book-le]: https://doc.rust-lang.org/nightly/book/lifetimes.html#lifetime-elision
|
||||
"##,
|
||||
|
||||
E0107: r##"
|
||||
@ -1840,6 +1843,22 @@ Since we know for certain that Wrapper<u32> implements Clone, there's no reason
|
||||
to also specify it in a `where` clause.
|
||||
"##,
|
||||
|
||||
E0194: r##"
|
||||
A type parameter was declared which shadows an existing one. An example of this
|
||||
error:
|
||||
|
||||
```
|
||||
trait Foo<T> {
|
||||
fn do_something(&self) -> T;
|
||||
fn do_something_else<T: Clone>(&self, bar: T);
|
||||
}
|
||||
```
|
||||
|
||||
In this example, the trait `Foo` and the trait method `do_something_else` both
|
||||
define a type parameter `T`. This is not allowed: if the method wishes to
|
||||
define a type parameter, it must use a different name for it.
|
||||
"##,
|
||||
|
||||
E0195: r##"
|
||||
Your method's lifetime parameters do not match the trait declaration.
|
||||
Erroneous code example:
|
||||
@ -2595,7 +2614,6 @@ register_diagnostics! {
|
||||
E0188, // can not cast a immutable reference to a mutable pointer
|
||||
E0189, // deprecated: can only cast a boxed pointer to a boxed object
|
||||
E0190, // deprecated: can only cast a &-pointer to an &-object
|
||||
E0194,
|
||||
E0196, // cannot determine a type for this closure
|
||||
E0203, // type parameter has more than one relaxed default bound,
|
||||
// and only one is supported
|
||||
|
@ -69,9 +69,9 @@ This API is completely unstable and subject to change.
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
|
@ -26,10 +26,10 @@
|
||||
#![unstable(feature = "unicode")]
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/",
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/",
|
||||
test(no_crate_inject))]
|
||||
#![no_std]
|
||||
|
||||
@ -41,9 +41,6 @@
|
||||
#![feature(lang_items)]
|
||||
#![feature(no_std)]
|
||||
#![feature(staged_api)]
|
||||
#![cfg_attr(stage0, feature(core, core_prelude))]
|
||||
|
||||
#[cfg(stage0)] extern crate core;
|
||||
|
||||
mod normalize;
|
||||
mod tables;
|
||||
|
@ -14,8 +14,6 @@
|
||||
//! unicode parts of the CharExt trait.
|
||||
|
||||
use self::GraphemeState::*;
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use core::char;
|
||||
use core::cmp;
|
||||
|
@ -598,7 +598,7 @@ mod tests {
|
||||
assert_eq!(output, expect);
|
||||
}
|
||||
|
||||
t("hello [Rust](http://rust-lang.org) :)", "hello Rust :)");
|
||||
t("hello [Rust](https://www.rust-lang.org) :)", "hello Rust :)");
|
||||
t("code `let x = i32;` ...", "code `let x = i32;` ...");
|
||||
t("type `Type<'static>` ...", "type `Type<'static>` ...");
|
||||
t("# top header", "top header");
|
||||
|
@ -15,10 +15,10 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
|
@ -22,10 +22,10 @@ Core encoding and decoding interfaces.
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/")]
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![feature(collections)]
|
||||
|
@ -32,9 +32,6 @@
|
||||
#![unstable(feature = "os_str",
|
||||
reason = "recently added as part of path/io reform")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use borrow::{Borrow, Cow, ToOwned};
|
||||
use ffi::CString;
|
||||
use fmt::{self, Debug};
|
||||
|
@ -17,9 +17,6 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use fmt;
|
||||
use ffi::OsString;
|
||||
use io::{self, SeekFrom, Seek, Read, Write};
|
||||
|
@ -292,9 +292,6 @@ impl Write for Cursor<Vec<u8>> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use io::prelude::*;
|
||||
use io::{Cursor, SeekFrom};
|
||||
use vec::Vec;
|
||||
|
@ -8,9 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use boxed::Box;
|
||||
use cmp;
|
||||
use io::{self, SeekFrom, Read, Write, Seek, BufRead, Error, ErrorKind};
|
||||
|
@ -56,21 +56,21 @@ struct StderrRaw(stdio::Stderr);
|
||||
/// The returned handle has no external synchronization or buffering.
|
||||
fn stdin_raw() -> io::Result<StdinRaw> { stdio::Stdin::new().map(StdinRaw) }
|
||||
|
||||
/// Constructs a new raw handle to the standard input stream of this process.
|
||||
/// Constructs a new raw handle to the standard output stream of this process.
|
||||
///
|
||||
/// The returned handle does not interact with any other handles created nor
|
||||
/// handles returned by `std::io::stdout`. Note that data is buffered by the
|
||||
/// `std::io::stdin` handles so writes which happen via this raw handle may
|
||||
/// `std::io::stdout` handles so writes which happen via this raw handle may
|
||||
/// appear before previous writes.
|
||||
///
|
||||
/// The returned handle has no external synchronization or buffering layered on
|
||||
/// top.
|
||||
fn stdout_raw() -> io::Result<StdoutRaw> { stdio::Stdout::new().map(StdoutRaw) }
|
||||
|
||||
/// Constructs a new raw handle to the standard input stream of this process.
|
||||
/// Constructs a new raw handle to the standard error stream of this process.
|
||||
///
|
||||
/// The returned handle does not interact with any other handles created nor
|
||||
/// handles returned by `std::io::stdout`.
|
||||
/// handles returned by `std::io::stderr`.
|
||||
///
|
||||
/// The returned handle has no external synchronization or buffering layered on
|
||||
/// top.
|
||||
|
@ -10,9 +10,6 @@
|
||||
|
||||
#![allow(missing_copy_implementations)]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use prelude::v1::*;
|
||||
|
||||
use io::{self, Read, Write, ErrorKind, BufRead};
|
||||
|
||||
/// Copies the entire contents of a reader into a writer.
|
||||
|
@ -191,10 +191,10 @@
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "http://play.rust-lang.org/",
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
html_playground_url = "https://play.rust-lang.org/",
|
||||
test(no_crate_inject, attr(deny(warnings))),
|
||||
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
|
||||
|
||||
@ -249,7 +249,6 @@
|
||||
#![cfg_attr(test, feature(float_from_str_radix, range_inclusive, float_extras, hash_default))]
|
||||
#![cfg_attr(test, feature(test, rustc_private, float_consts))]
|
||||
#![cfg_attr(target_env = "msvc", feature(link_args))]
|
||||
#![cfg_attr(stage0, feature(core, core_prelude))]
|
||||
|
||||
// Don't link to std. We are std.
|
||||
#![no_std]
|
||||
@ -257,8 +256,6 @@
|
||||
#![allow(trivial_casts)]
|
||||
#![deny(missing_docs)]
|
||||
|
||||
#[cfg(stage0)] #[macro_use] extern crate core;
|
||||
|
||||
#[cfg(test)] extern crate test;
|
||||
#[cfg(test)] #[macro_use] extern crate log;
|
||||
|
||||
|
@ -11,9 +11,6 @@
|
||||
#![unstable(feature = "udp", reason = "remaining functions have not been \
|
||||
scrutinized enough to be stabilized")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use prelude::v1::*;
|
||||
|
||||
use fmt;
|
||||
use io::{self, Error, ErrorKind};
|
||||
use net::{ToSocketAddrs, SocketAddr, IpAddr};
|
||||
|
@ -15,9 +15,6 @@
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use prelude::v1::*;
|
||||
|
||||
use core::num;
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
use intrinsics;
|
||||
|
@ -15,9 +15,6 @@
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use prelude::v1::*;
|
||||
|
||||
use core::num;
|
||||
use intrinsics;
|
||||
use libc::c_int;
|
||||
|
@ -43,8 +43,6 @@ pub fn test_num<T>(ten: T, two: T) where
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
use super::*;
|
||||
use i8;
|
||||
use i16;
|
||||
|
@ -98,9 +98,6 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
|
||||
use ascii::*;
|
||||
use borrow::{Borrow, IntoCow, ToOwned, Cow};
|
||||
use cmp;
|
||||
@ -135,8 +132,6 @@ use self::platform::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix};
|
||||
#[cfg(unix)]
|
||||
mod platform {
|
||||
use super::Prefix;
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
use ffi::OsStr;
|
||||
|
||||
#[inline]
|
||||
@ -159,8 +154,6 @@ mod platform {
|
||||
|
||||
#[cfg(windows)]
|
||||
mod platform {
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
use ascii::*;
|
||||
|
||||
use super::{os_str_as_u8_slice, u8_slice_as_os_str, Prefix};
|
||||
@ -409,7 +402,6 @@ fn has_physical_root(s: &[u8], prefix: Option<Prefix>) -> bool {
|
||||
}
|
||||
|
||||
// basic workhorse for splitting stem and extension
|
||||
#[allow(unused_unsafe)] // FIXME
|
||||
fn split_file_at_dot(file: &OsStr) -> (Option<&OsStr>, Option<&OsStr>) {
|
||||
unsafe {
|
||||
if os_str_as_u8_slice(file) == b".." { return (Some(file), None) }
|
||||
@ -1750,8 +1742,6 @@ impl AsRef<Path> for PathBuf {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
#[cfg(stage0)]
|
||||
use core::prelude::v1::*;
|
||||
use string::{ToString, String};
|
||||
use vec::Vec;
|
||||
|
||||
|
@ -57,9 +57,6 @@
|
||||
|
||||
#![unstable(feature = "rand")]
|
||||
|
||||
#[cfg(stage0)]
|
||||
use prelude::v1::*;
|
||||
|
||||
use cell::RefCell;
|
||||
use io;
|
||||
use mem;
|
||||
|
@ -15,7 +15,6 @@ pub use self::imp::OsRng;
|
||||
|
||||
#[cfg(all(unix, not(target_os = "ios")))]
|
||||
mod imp {
|
||||
#[cfg(stage0)] use prelude::v1::*;
|
||||
use self::OsRngInner::*;
|
||||
|
||||
use fs::File;
|
||||
@ -182,12 +181,12 @@ mod imp {
|
||||
|
||||
#[cfg(target_os = "ios")]
|
||||
mod imp {
|
||||
use prelude::v1::*;
|
||||
#[cfg(stage0)] use prelude::v1::*;
|
||||
|
||||
use io;
|
||||
use mem;
|
||||
use rand::Rng;
|
||||
use libc::{c_int, c_void, size_t};
|
||||
use libc::{c_int, size_t};
|
||||
|
||||
/// A random number generator that retrieves randomness straight from
|
||||
/// the operating system. Platform sources:
|
||||
@ -249,9 +248,6 @@ mod imp {
|
||||
|
||||
#[cfg(windows)]
|
||||
mod imp {
|
||||
#[cfg(stage0)]
|
||||
use prelude::v1::*;
|
||||
|
||||
use io;
|
||||
use mem;
|
||||
use rand::Rng;
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
#[cfg(stage0)] use prelude::v1::*;
|
||||
use io::prelude::*;
|
||||
use rand::Rng;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user