Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 23 pull requests #40598

Merged
merged 58 commits into from
Mar 17, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
13341f4
Reword the non-dropping of `src` for `ptr::write{,_unaligned}`
tbu- Mar 9, 2017
97a1b6a
Update usages of 'OSX' (and other old names) to 'macOS'.
frewsxcv Mar 12, 2017
b38992c
some style fixes
tshepang Mar 13, 2017
0644773
Remove doc about highlighting code in other languages #40301
projektir Mar 13, 2017
6b7b262
Updating README.md to point to the correct doc location
projektir Mar 13, 2017
eb203d5
Adjust wording #40301
projektir Mar 13, 2017
adba642
fix format grammar
llogiq Mar 13, 2017
5e49f79
Add test for issue #29595
mattico Mar 10, 2017
11d3344
Using X headings #39850
projektir Mar 13, 2017
8b9b3b6
Fix sidebar not extending to the bottom of the page
wesleywiser Mar 14, 2017
5b7f330
Corrected very minor documentation detail about Unicode and Japanese
Mar 14, 2017
e06c515
Rust unstable book: basic desc and example for `const_fn`.
frewsxcv Mar 11, 2017
327e8e9
Rust unstable book: basic desc and example for `conservative_impl_tra…
frewsxcv Mar 11, 2017
0dd03ff
Rust unstable book: basic desc and example for `const_indexing`.
frewsxcv Mar 12, 2017
137c1e8
Rust unstable book: basic desc and example for `i128_type`.
frewsxcv Mar 12, 2017
e58e3d0
Rust unstable book: basic desc and example for `non_ascii_idents`.
frewsxcv Mar 12, 2017
d3ae2eb
Rust unstable book: basic desc and example for `concat_idents`.
frewsxcv Mar 12, 2017
1545f4e
std: remove a workaround for privacy limitations that isn't necessary…
swgillespie Mar 14, 2017
e7b0f2b
Remove function invokation parens from documentation links.
frewsxcv Mar 12, 2017
5cc056a
A few improvements to the `core::hash` top-level docs.
frewsxcv Mar 14, 2017
0671cc1
.gitmodules: use official URLs w/o redirect
nodakai Mar 14, 2017
8af3013
Inline functions Ordering::{then, then_with}
Mar 14, 2017
9a7b789
Add doc example for `OsStr::to_os_string`.
frewsxcv Mar 12, 2017
4d57d92
Add doc example for `OsString::reserve`.
frewsxcv Mar 12, 2017
5537955
Add doc example for `OsString::reserve_exact`.
frewsxcv Mar 12, 2017
bda57db
Add doc example for `OsString::shrink_to_fit`.
frewsxcv Mar 12, 2017
6adbbfc
Add doc example for `OsString::into_boxed_os_str`.
frewsxcv Mar 12, 2017
cc08edc
Remove incorrect feature from the 1.16 relnotes
steveklabnik Mar 14, 2017
8b7c7f3
Link core::slice to std::slice
steveklabnik Mar 14, 2017
e3b8550
Point out correct turbofish usage on `Foo<Bar<Baz>>`
estebank Mar 14, 2017
18a8494
Ammended minor documentation detail abour Unicode cases.
Mar 15, 2017
5de0406
rustbuild: Retry downloads of OpenSSL source
alexcrichton Mar 15, 2017
e66b3a2
Fix documentation for Vec::dedup_by.
kevinmehall Mar 15, 2017
3d01e1a
add sort_unstable to unstable book
steveklabnik Mar 16, 2017
bc6eecd
Merge branch 'master' into frewsxcv-osstr
frewsxcv Mar 17, 2017
70e7327
Rollup merge of #40387 - tbu-:pr_doc_ptr_write2, r=steveklabnik
frewsxcv Mar 17, 2017
01ad185
Rollup merge of #40433 - mattico:test-issue-29595, r=estebank
frewsxcv Mar 17, 2017
739d89a
Rollup merge of #40452 - frewsxcv:frewsxcv-unstable-docs, r=Guillaume…
frewsxcv Mar 17, 2017
6971717
Rollup merge of #40456 - frewsxcv:frewsxcv-docs-function-parens, r=Gu…
frewsxcv Mar 17, 2017
dee6989
Rollup merge of #40457 - frewsxcv:frewsxcv-macos, r=steveklabnik
frewsxcv Mar 17, 2017
695d7ec
Rollup merge of #40458 - frewsxcv:frewsxcv-osstr, r=GuillaumeGomez
frewsxcv Mar 17, 2017
cfca6fc
Rollup merge of #40463 - tshepang:nit, r=nikomatsakis
frewsxcv Mar 17, 2017
127c3ad
Rollup merge of #40466 - projektir:outdated_docs_highlighting, r=stev…
frewsxcv Mar 17, 2017
dcf5f07
Rollup merge of #40467 - projektir:readme_docs, r=steveklabnik
frewsxcv Mar 17, 2017
4fbd884
Rollup merge of #40495 - llogiq:format-docs, r=steveklabnik
frewsxcv Mar 17, 2017
f9236bd
Rollup merge of #40496 - projektir:docs_number_headings, r=frewsxcv
frewsxcv Mar 17, 2017
3ebce67
Rollup merge of #40497 - wesleywiser:fix_sidebar, r=GuillaumeGomez
frewsxcv Mar 17, 2017
e389f6a
Rollup merge of #40499 - ericfindlay:master, r=steveklabnik
frewsxcv Mar 17, 2017
5aab3b9
Rollup merge of #40500 - estebank:turbofish-help, r=pnkfelix
frewsxcv Mar 17, 2017
d7a09d4
Rollup merge of #40503 - swgillespie:thread-hack-removal, r=sfackler
frewsxcv Mar 17, 2017
f47a377
Rollup merge of #40505 - frewsxcv:hash-docs, r=alexcrichton
frewsxcv Mar 17, 2017
1909b62
Rollup merge of #40512 - nodakai:patch-1, r=alexcrichton
frewsxcv Mar 17, 2017
f90fab5
Rollup merge of #40514 - stjepang:inline-then-ordering, r=alexcrichton
frewsxcv Mar 17, 2017
6831180
Rollup merge of #40517 - rust-lang:release-notes-tweak, r=alexcrichton
frewsxcv Mar 17, 2017
2ba4a63
Rollup merge of #40520 - steveklabnik:link-core-slice, r=alexcrichton
frewsxcv Mar 17, 2017
dc1deeb
Rollup merge of #40536 - kevinmehall:dedup_docs_for_dedup_by, r=steve…
frewsxcv Mar 17, 2017
b71e5f7
Rollup merge of #40545 - alexcrichton:retry-download-openssl, r=nikom…
frewsxcv Mar 17, 2017
3bec563
Rollup merge of #40586 - steveklabnik:add-unstable-sort-to-unstable-b…
frewsxcv Mar 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5056,7 +5056,7 @@ Version 0.1 (2012-01-20)

* Compiler works with the following configurations:
* Linux: x86 and x86_64 hosts and targets
* MacOS: x86 and x86_64 hosts and targets
* macOS: x86 and x86_64 hosts and targets
* Windows: x86 hosts and targets

* Cross compilation / multi-target configuration supported.
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn main() {
if env::var("RUSTC_RPATH") == Ok("true".to_string()) {
let rpath = if target.contains("apple") {

// Note that we need to take one extra step on OSX to also pass
// Note that we need to take one extra step on macOS to also pass
// `-Wl,-instal_name,@rpath/...` to get things to work right. To
// do that we pass a weird flag to the compiler to get it to do
// so. Note that this is definitely a hack, and we should likely
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub fn compiletest(build: &Build,
cmd.arg("--docck-python").arg(build.python());

if build.config.build.ends_with("apple-darwin") {
// Force /usr/bin/python on OSX for LLDB tests because we're loading the
// Force /usr/bin/python on macOS for LLDB tests because we're loading the
// LLDB plugin's compiled module which only works with the system python
// (namely not Homebrew-installed python)
cmd.arg("--lldb-python").arg("/usr/bin/python");
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
cargo.env("CFG_LLVM_ROOT", s);
}
// Building with a static libstdc++ is only supported on linux right now,
// not for MSVC or OSX
// not for MSVC or macOS
if build.config.llvm_static_stdcpp &&
!target.contains("windows") &&
!target.contains("apple") {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ impl Build {
.filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
.collect::<Vec<_>>();

// If we're compiling on OSX then we add a few unconditional flags
// If we're compiling on macOS then we add a few unconditional flags
// indicating that we want libc++ (more filled out than libstdc++) and
// we want to compile for 10.7. This way we can ensure that
// LLVM/jemalloc/etc are all properly compiled.
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ pub fn check(build: &mut Build) {
}

for target in build.config.target.iter() {
// Can't compile for iOS unless we're on OSX
// Can't compile for iOS unless we're on macOS
if target.contains("apple-ios") &&
!build.config.build.contains("apple-darwin") {
panic!("the iOS target is only supported on OSX");
panic!("the iOS target is only supported on macOS");
}

// Make sure musl-root is valid if specified
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/src/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ And that's reflected in the summary line:
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
```

We also get a non-zero status code. We can use `$?` on OS X and Linux:
We also get a non-zero status code. We can use `$?` on macOS and Linux:

```bash
$ echo $?
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc_jemalloc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub use imp::*;
mod imp {
use libc::{c_int, c_void, size_t};

// Note that the symbols here are prefixed by default on OSX and Windows (we
// Note that the symbols here are prefixed by default on macOS and Windows (we
// don't explicitly request it), and on Android and DragonFly we explicitly
// request it as unprefixing cause segfaults (mismatches in allocators).
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/cstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub enum LinkagePreference {
pub enum NativeLibraryKind {
NativeStatic, // native static library (.a archive)
NativeStaticNobundle, // native static library, which doesn't get bundled into .rlibs
NativeFramework, // OSX-specific
NativeFramework, // macOS-specific
NativeUnknown, // default way to specify a dynamic library
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
always_encode_mir: bool = (false, parse_bool, [TRACKED],
"encode MIR of all functions into the crate metadata"),
osx_rpath_install_name: bool = (false, parse_bool, [TRACKED],
"pass `-install_name @rpath/...` to the OSX linker"),
"pass `-install_name @rpath/...` to the macOS linker"),
sanitizer: Option<Sanitizer> = (None, parse_sanitizer, [TRACKED],
"Use a sanitizer"),
}
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_back/target/apple_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ use std::env;
use target::TargetOptions;

pub fn opts() -> TargetOptions {
// ELF TLS is only available in OSX 10.7+. If you try to compile for 10.6
// ELF TLS is only available in macOS 10.7+. If you try to compile for 10.6
// either the linker will complain if it is used or the binary will end up
// segfaulting at runtime when run on 10.6. Rust by default supports OSX
// segfaulting at runtime when run on 10.6. Rust by default supports macOS
// 10.7+, but there is a standard environment variable,
// MACOSX_DEPLOYMENT_TARGET, which is used to signal targeting older
// versions of OSX. For example compiling on 10.10 with
// versions of macOS. For example compiling on 10.10 with
// MACOSX_DEPLOYMENT_TARGET set to 10.6 will cause the linker to generate
// warnings about the usage of ELF TLS.
//
Expand All @@ -33,7 +33,7 @@ pub fn opts() -> TargetOptions {
}).unwrap_or((10, 7));

TargetOptions {
// OSX has -dead_strip, which doesn't rely on function_sections
// macOS has -dead_strip, which doesn't rely on function_sections
function_sections: false,
dynamic_linking: true,
executables: true,
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_back/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ pub struct TargetOptions {
/// Whether the target toolchain is like OpenBSD's.
/// Only useful for compiling against OpenBSD, for configuring abi when returning a struct.
pub is_like_openbsd: bool,
/// Whether the target toolchain is like OSX's. Only useful for compiling against iOS/OS X, in
/// particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
/// Whether the target toolchain is like macOS's. Only useful for compiling against iOS/macOS,
/// in particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
pub is_like_osx: bool,
/// Whether the target toolchain is like Solaris's.
/// Only useful for compiling against Illumos/Solaris,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fn register_native_lib(sess: &Session,
}
let is_osx = sess.target.target.options.is_like_osx;
if lib.kind == cstore::NativeFramework && !is_osx {
let msg = "native frameworks are only available on OSX targets";
let msg = "native frameworks are only available on macOS targets";
match span {
Some(span) => span_err!(sess, span, E0455, "{}", msg),
None => sess.err(msg),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ name. Example:
"##,

E0455: r##"
Linking with `kind=framework` is only supported when targeting OS X,
Linking with `kind=framework` is only supported when targeting macOS,
as frameworks are specific to that operating system.

Erroneous code example:
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
//
// And here we run into yet another obscure archive bug: in which metadata
// loaded from archives may have trailing garbage bytes. Awhile back one of
// our tests was failing sporadically on the OSX 64-bit builders (both nopt
// our tests was failing sporadically on the macOS 64-bit builders (both nopt
// and opt) by having ebml generate an out-of-bounds panic when looking at
// metadata.
//
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_trans/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ fn link_rlib<'a>(sess: &'a Session,
}

// After adding all files to the archive, we need to update the
// symbol table of the archive. This currently dies on OSX (see
// symbol table of the archive. This currently dies on macOS (see
// #11162), and isn't necessary there anyway
if !sess.target.target.options.is_like_osx {
ab.update_symbols();
Expand Down Expand Up @@ -764,7 +764,7 @@ fn link_natively(sess: &Session,
// pain to land PRs when they spuriously fail due to a segfault.
//
// The issue #38878 has some more debugging information on it as well, but
// this unfortunately looks like it's just a race condition in OSX's linker
// this unfortunately looks like it's just a race condition in macOS's linker
// with some thread pool working in the background. It seems that no one
// currently knows a fix for this so in the meantime we're left with this...
info!("{:?}", &cmd);
Expand Down Expand Up @@ -841,7 +841,7 @@ fn link_natively(sess: &Session,
}


// On OSX, debuggers need this utility to get run to do some munging of
// On macOS, debuggers need this utility to get run to do some munging of
// the symbols
if sess.target.target.options.is_like_osx && sess.opts.debuginfo != NoDebugInfo {
match Command::new("dsymutil").arg(out_filename).output() {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl<'a> Linker for GnuLinker<'a> {
.arg("-l").arg(lib)
.arg("-Wl,--no-whole-archive");
} else {
// -force_load is the OSX equivalent of --whole-archive, but it
// -force_load is the macOS equivalent of --whole-archive, but it
// involves passing the full path to the library to link.
let mut v = OsString::from("-Wl,-force_load,");
v.push(&archive::find_library(lib, search_path, &self.sess));
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/back/symbol_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ fn mangle<PI: Iterator<Item=InternedString>>(path: PI, hash: &str) -> String {
// Follow C++ namespace-mangling style, see
// http://en.wikipedia.org/wiki/Name_mangling for more info.
//
// It turns out that on OSX you can actually have arbitrary symbols in
// It turns out that on macOS you can actually have arbitrary symbols in
// function names (at least when given to LLVM), but this is not possible
// when using unix's linker. Perhaps one day when we just use a linker from LLVM
// we won't need to do this name mangling. The problem with name mangling is
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_trans/debuginfo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ pub fn finalize(cx: &CrateContext) {
llvm::LLVMRustDIBuilderFinalize(DIB(cx));
llvm::LLVMRustDIBuilderDispose(DIB(cx));
// Debuginfo generation in LLVM by default uses a higher
// version of dwarf than OS X currently understands. We can
// version of dwarf than macOS currently understands. We can
// instruct LLVM to emit an older version of dwarf, however,
// for OS X to understand. For more info see #11352
// for macOS to understand. For more info see #11352
// This can be overridden using --llvm-opts -dwarf-version,N.
// Android has the same issue (#22398)
if cx.sess().target.target.options.is_like_osx ||
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/plugins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl PluginManager {
/// Load a plugin with the given name.
///
/// Turns `name` into the proper dynamic library filename for the given
/// platform. On windows, it turns into name.dll, on OS X, name.dylib, and
/// platform. On windows, it turns into name.dll, on macOS, name.dylib, and
/// elsewhere, libname.so.
pub fn load_plugin(&mut self, name: String) {
let x = self.prefix.join(libname(name));
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/os/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

//! MacOS-specific definitions
//! macOS-specific definitions

#![stable(feature = "raw_ext", since = "1.1.0")]

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/os/macos/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

//! MacOS-specific raw type definitions
//! macOS-specific raw type definitions

#![stable(feature = "raw_ext", since = "1.1.0")]
#![rustc_deprecated(since = "1.8.0",
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/rand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
//! If an application does not have `getrandom` and likely to be run soon after first booting,
//! or on a system with very few entropy sources, one should consider using `/dev/random` via
//! `ReaderRng`.
//! - On some systems (e.g. FreeBSD, OpenBSD and Mac OS X) there is no difference
//! - On some systems (e.g. FreeBSD, OpenBSD and macOS) there is no difference
//! between the two sources. (Also note that, on some systems e.g. FreeBSD, both `/dev/random`
//! and `/dev/urandom` may block once if the CSPRNG has not seeded yet.)

Expand Down Expand Up @@ -195,7 +195,7 @@ impl Rng for ThreadRng {
/// A random number generator that retrieves randomness straight from
/// the operating system. Platform sources:
///
/// - Unix-like systems (Linux, Android, Mac OSX): read directly from
/// - Unix-like systems (Linux, Android, macOS): read directly from
/// `/dev/urandom`, or from `getrandom(2)` system call if available.
/// - Windows: calls `CryptGenRandom`, using the default cryptographic
/// service provider with the `PROV_RSA_FULL` type.
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/sys/redox/fast_thread_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ pub unsafe extern fn destroy_value<T>(ptr: *mut u8) {
// `None`.
(*ptr).dtor_running.set(true);

// The OSX implementation of TLS apparently had an odd aspect to it
// The macOS implementation of TLS apparently had an odd aspect to it
// where the pointer we have may be overwritten while this destructor
// is running. Specifically if a TLS destructor re-accesses TLS it may
// trigger a re-initialization of all TLS variables, paving over at
// least some destroyed ones with initial values.
//
// This means that if we drop a TLS value in place on OSX that we could
// This means that if we drop a TLS value in place on macOS that we could
// revert the value to its original state halfway through the
// destructor, which would be bad!
//
// Hence, we use `ptr::read` on OSX (to move to a "safe" location)
// Hence, we use `ptr::read` on macOS (to move to a "safe" location)
// instead of drop_in_place.
if cfg!(target_os = "macos") {
ptr::read((*ptr).inner.get());
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/redox/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl Command {
// mutex, and then after the fork they unlock it.
//
// Despite this information, libnative's spawn has been witnessed to
// deadlock on both OSX and FreeBSD. I'm not entirely sure why, but
// deadlock on both macOS and FreeBSD. I'm not entirely sure why, but
// all collected backtraces point at malloc/free traffic in the
// child spawned process.
//
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/sys/unix/backtrace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// Some methods of getting a backtrace:
///
/// * The backtrace() functions on unix. It turns out this doesn't work very
/// well for green threads on OSX, and the address to symbol portion of it
/// well for green threads on macOS, and the address to symbol portion of it
/// suffers problems that are described below.
///
/// * Using libunwind. This is more difficult than it sounds because libunwind
Expand Down Expand Up @@ -51,9 +51,9 @@
///
/// * Use dladdr(). The original backtrace()-based idea actually uses dladdr()
/// behind the scenes to translate, and this is why backtrace() was not used.
/// Conveniently, this method works fantastically on OSX. It appears dladdr()
/// Conveniently, this method works fantastically on macOS. It appears dladdr()
/// uses magic to consult the local symbol table, or we're putting everything
/// in the dynamic symbol table anyway. Regardless, for OSX, this is the
/// in the dynamic symbol table anyway. Regardless, for macOS, this is the
/// method used for translation. It's provided by the system and easy to do.o
///
/// Sadly, all other systems have a dladdr() implementation that does not
Expand All @@ -75,7 +75,7 @@
/// * Use `libbacktrace`. It turns out that this is a small library bundled in
/// the gcc repository which provides backtrace and symbol translation
/// functionality. All we really need from it is the backtrace functionality,
/// and we only really need this on everything that's not OSX, so this is the
/// and we only really need this on everything that's not macOS, so this is the
/// chosen route for now.
///
/// In summary, the current situation uses libgcc_s to get a trace of stack
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/unix/ext/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl SocketAddr {
let len = self.len as usize - sun_path_offset();
let path = unsafe { mem::transmute::<&[libc::c_char], &[u8]>(&self.addr.sun_path) };

// OSX seems to return a len of 16 and a zeroed sun_path for unnamed addresses
// macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses
if len == 0 || (cfg!(not(target_os = "linux")) && self.addr.sun_path[0] == 0) {
AddressKind::Unnamed
} else if self.addr.sun_path[0] == 0 {
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/sys/unix/fast_thread_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
register_dtor_fallback(t, dtor);
}

// OSX's analog of the above linux function is this _tlv_atexit function.
// macOS's analog of the above linux function is this _tlv_atexit function.
// The disassembly of thread_local globals in C++ (at least produced by
// clang) will have this show up in the output.
#[cfg(target_os = "macos")]
Expand All @@ -154,17 +154,17 @@ pub unsafe extern fn destroy_value<T>(ptr: *mut u8) {
// `None`.
(*ptr).dtor_running.set(true);

// The OSX implementation of TLS apparently had an odd aspect to it
// The macOS implementation of TLS apparently had an odd aspect to it
// where the pointer we have may be overwritten while this destructor
// is running. Specifically if a TLS destructor re-accesses TLS it may
// trigger a re-initialization of all TLS variables, paving over at
// least some destroyed ones with initial values.
//
// This means that if we drop a TLS value in place on OSX that we could
// This means that if we drop a TLS value in place on macOS that we could
// revert the value to its original state halfway through the
// destructor, which would be bad!
//
// Hence, we use `ptr::read` on OSX (to move to a "safe" location)
// Hence, we use `ptr::read` on macOS (to move to a "safe" location)
// instead of drop_in_place.
if cfg!(target_os = "macos") {
ptr::read((*ptr).inner.get());
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/unix/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn max_len() -> usize {
// with the man page quoting that if the count of bytes to read is
// greater than `SSIZE_MAX` the result is "unspecified".
//
// On OSX, however, apparently the 64-bit libc is either buggy or
// On macOS, however, apparently the 64-bit libc is either buggy or
// intentionally showing odd behavior by rejecting any read with a size
// larger than or equal to INT_MAX. To handle both of these the read
// size is capped on both platforms.
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ impl File {
// Linux kernel then the flag is just ignored by the OS, so we continue
// to explicitly ask for a CLOEXEC fd here.
//
// The CLOEXEC flag, however, is supported on versions of OSX/BSD/etc
// The CLOEXEC flag, however, is supported on versions of macOS/BSD/etc
// that we support, so we only do this on Linux currently.
if cfg!(target_os = "linux") {
fd.set_cloexec()?;
Expand Down Expand Up @@ -573,7 +573,7 @@ impl fmt::Debug for File {
#[cfg(target_os = "macos")]
fn get_path(fd: c_int) -> Option<PathBuf> {
// FIXME: The use of PATH_MAX is generally not encouraged, but it
// is inevitable in this case because OS X defines `fcntl` with
// is inevitable in this case because macOS defines `fcntl` with
// `F_GETPATH` in terms of `MAXPATHLEN`, and there are no
// alternatives. If a better method is invented, it should be used
// instead.
Expand Down
Loading