From 1eeaf2065b61cc99f9e5d7f3dd4b77a018ee619f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Steinbrink?= Date: Fri, 7 Aug 2015 18:29:44 +0200 Subject: [PATCH 01/25] Fix ICE when trying to drop an unsized type from a different crate The code to get the LLVM type signature for the drop function doesn't handle unsized types correctly. --- src/librustc_trans/trans/type_of.rs | 7 +++++-- src/test/auxiliary/fat_drop.rs | 23 +++++++++++++++++++++++ src/test/run-pass/extern_fat_drop.rs | 23 +++++++++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 src/test/auxiliary/fat_drop.rs create mode 100644 src/test/run-pass/extern_fat_drop.rs diff --git a/src/librustc_trans/trans/type_of.rs b/src/librustc_trans/trans/type_of.rs index c5161a8bc2e78..86c9723bab7f2 100644 --- a/src/librustc_trans/trans/type_of.rs +++ b/src/librustc_trans/trans/type_of.rs @@ -472,6 +472,9 @@ fn llvm_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, } pub fn type_of_dtor<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, self_ty: Ty<'tcx>) -> Type { - let self_ty = type_of(ccx, self_ty).ptr_to(); - Type::func(&[self_ty], &Type::void(ccx)) + if type_is_sized(ccx.tcx(), self_ty) { + Type::func(&[type_of(ccx, self_ty).ptr_to()], &Type::void(ccx)) + } else { + Type::func(&type_of(ccx, self_ty).field_types(), &Type::void(ccx)) + } } diff --git a/src/test/auxiliary/fat_drop.rs b/src/test/auxiliary/fat_drop.rs new file mode 100644 index 0000000000000..1f944b6ed32f0 --- /dev/null +++ b/src/test/auxiliary/fat_drop.rs @@ -0,0 +1,23 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub static mut DROPPED: bool = false; + +pub struct S { + _unsized: [u8] +} + +impl Drop for S { + fn drop(&mut self) { + unsafe { + DROPPED = true; + } + } +} diff --git a/src/test/run-pass/extern_fat_drop.rs b/src/test/run-pass/extern_fat_drop.rs new file mode 100644 index 0000000000000..f587dc7821df0 --- /dev/null +++ b/src/test/run-pass/extern_fat_drop.rs @@ -0,0 +1,23 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:fat_drop.rs + +#![feature(core_intrinsics)] + +extern crate fat_drop; + +fn main() { + unsafe { + let s: &mut fat_drop::S = std::mem::uninitialized(); + std::intrinsics::drop_in_place(s); + assert!(fat_drop::DROPPED); + } +} From f804872502587290dcab42eda35301314173cbd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Steinbrink?= Date: Sat, 8 Aug 2015 15:32:35 +0200 Subject: [PATCH 02/25] Fix the function return type used in get_res_dtor() Instead of the actual return type, we're currently passing the function type to get_extern_fn(). The only reason this doesn't explode is because get_extern_fn() actually doesn't care about the actual return type, just about it being converging or not. --- src/librustc_trans/trans/glue.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/librustc_trans/trans/glue.rs b/src/librustc_trans/trans/glue.rs index 18fedda49193c..1254cf1c296fb 100644 --- a/src/librustc_trans/trans/glue.rs +++ b/src/librustc_trans/trans/glue.rs @@ -324,7 +324,6 @@ fn trans_struct_drop_flag<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, pub fn get_res_dtor<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, did: ast::DefId, - t: Ty<'tcx>, parent_id: ast::DefId, substs: &Substs<'tcx>) -> ValueRef { @@ -347,11 +346,8 @@ pub fn get_res_dtor<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, let name = csearch::get_symbol(&ccx.sess().cstore, did); let class_ty = tcx.lookup_item_type(parent_id).ty.subst(tcx, substs); let llty = type_of_dtor(ccx, class_ty); - let dtor_ty = ccx.tcx().mk_ctor_fn(did, - &[get_drop_glue_type(ccx, t)], - ccx.tcx().mk_nil()); foreign::get_extern_fn(ccx, &mut *ccx.externs().borrow_mut(), &name[..], llvm::CCallConv, - llty, dtor_ty) + llty, ccx.tcx().mk_nil()) } } @@ -366,7 +362,7 @@ fn trans_struct_drop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, debug!("trans_struct_drop t: {}", t); // Find and call the actual destructor - let dtor_addr = get_res_dtor(bcx.ccx(), dtor_did, t, class_did, substs); + let dtor_addr = get_res_dtor(bcx.ccx(), dtor_did, class_did, substs); // Class dtors have no explicit args, so the params should // just consist of the environment (self). From d83a0fdf7da8b93b21de6ff2809e81a69447a9a5 Mon Sep 17 00:00:00 2001 From: Alisdair Owens Date: Sat, 8 Aug 2015 17:32:13 +0100 Subject: [PATCH 03/25] add diagnostics for E0387 --- src/librustc_borrowck/diagnostics.rs | 37 +++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/librustc_borrowck/diagnostics.rs b/src/librustc_borrowck/diagnostics.rs index 24bbd4fcb7eef..79abd08bcb1df 100644 --- a/src/librustc_borrowck/diagnostics.rs +++ b/src/librustc_borrowck/diagnostics.rs @@ -95,6 +95,42 @@ 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: 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. + +The solution is to capture the data mutably. This can be done by defining `foo` +to take FnMut rather than Fn: + +``` +fn foo(f: F) { } +``` "## } @@ -104,7 +140,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 } From bbbfed2f93d3ba58a53ed8bf353ed11f3bb751db Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sun, 9 Aug 2015 14:15:05 -0700 Subject: [PATCH 04/25] Use https URLs to refer to rust-lang.org where appropriate. Also fixes a few outdated links. --- CONTRIBUTING.md | 6 +- README.md | 6 +- RELEASES.md | 110 +++++++++--------- mk/docs.mk | 4 +- src/doc/favicon.inc | 2 +- src/doc/not_found.md | 8 +- src/doc/style/README.md | 2 +- src/doc/style/errors/ergonomics.md | 2 +- src/doc/style/errors/signaling.md | 2 +- .../features/functions-and-methods/input.md | 7 +- src/doc/style/features/modules.md | 20 ++-- src/doc/style/ownership/builders.md | 2 +- src/doc/trpl/README.md | 2 +- src/doc/trpl/compiler-plugins.md | 4 +- src/doc/trpl/documentation.md | 8 +- src/doc/trpl/installing-rust.md | 4 +- src/doc/trpl/nightly-rust.md | 4 +- src/doc/version_info.html.template | 6 +- src/liballoc/lib.rs | 4 +- src/libarena/lib.rs | 4 +- src/libcollections/lib.rs | 6 +- src/libcore/lib.rs | 6 +- src/libflate/lib.rs | 4 +- src/libfmt_macros/lib.rs | 6 +- src/libgetopts/lib.rs | 6 +- src/libgraphviz/lib.rs | 4 +- src/liblibc/lib.rs | 6 +- src/liblog/lib.rs | 6 +- src/librand/lib.rs | 6 +- src/librbml/lib.rs | 6 +- src/librustc/README.md | 2 +- src/librustc/lib.rs | 4 +- src/librustc_back/lib.rs | 4 +- src/librustc_borrowck/lib.rs | 4 +- src/librustc_data_structures/lib.rs | 6 +- src/librustc_driver/lib.rs | 4 +- src/librustc_lint/lib.rs | 4 +- src/librustc_llvm/lib.rs | 4 +- src/librustc_privacy/lib.rs | 4 +- src/librustc_resolve/diagnostics.rs | 10 +- src/librustc_resolve/lib.rs | 4 +- src/librustc_trans/lib.rs | 4 +- src/librustc_typeck/diagnostics.rs | 4 +- src/librustc_typeck/lib.rs | 4 +- src/librustc_unicode/lib.rs | 6 +- src/librustdoc/html/markdown.rs | 2 +- src/librustdoc/lib.rs | 6 +- src/libserialize/lib.rs | 6 +- src/libstd/lib.rs | 6 +- src/libsyntax/diagnostics/plugin.rs | 2 +- src/libsyntax/lib.rs | 4 +- src/libterm/lib.rs | 6 +- src/libtest/lib.rs | 4 +- src/rustbook/build.rs | 2 +- .../loops-reject-duplicate-labels-2.rs | 2 +- src/test/run-pass/cleanup-arm-conditional.rs | 10 -- src/test/run-pass/cleanup-shortcircuit.rs | 10 -- 57 files changed, 185 insertions(+), 206 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 22a23de070780..048cdc08fb5e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/README.md b/README.md index 9e54704a5ebad..0ae93380e5920 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/RELEASES.md b/RELEASES.md index 1dfd2186e1385..e964396c76d05 100644 --- a/RELEASES.md +++ b/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/ diff --git a/mk/docs.mk b/mk/docs.mk index a8ab6d55d7f87..c547e35bb7010 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -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 diff --git a/src/doc/favicon.inc b/src/doc/favicon.inc index 51609a660d397..8f881657bdc1a 100644 --- a/src/doc/favicon.inc +++ b/src/doc/favicon.inc @@ -1 +1 @@ - + diff --git a/src/doc/not_found.md b/src/doc/not_found.md index 0efdf45c640cb..5d632ebc68f7a 100644 --- a/src/doc/not_found.md +++ b/src/doc/not_found.md @@ -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/)