Support 16-bit pointers as well as i/usize
I'm opening this pull request to get some feedback from the community.
Although Rust doesn't support any platforms with a native 16-bit pointer at the moment, the [AVR-Rust][ar] fork is working towards that goal. Keeping this forked logic up-to-date with the changes in master has been onerous so I'd like to merge these changes so that they get carried along when refactoring happens. I do not believe this should increase the maintenance burden.
This is based on the original work of Dylan McKay (@dylanmckay).
[ar]: https://github.com/avr-rust/rust
Rename main thread from "<main>" to "main".
Fix issue #33789
We may need to discuss whether this counts as a breaking change since code may check the main thread name against "\<main\>". Discussion is in #33789
this introduces a DropAndReplace terminator as a fix to #30380. That terminator
is suppsoed to be translated by desugaring during drop elaboration, which is
not implemented in this commit, so this breaks `-Z orbit` temporarily.
Use Docker for Travis
The primary motivtion is to use system LLVM from ubuntu.com, instead of llvm.org.
Travis provides two environments: Ubuntu 12.04 LTS aka precise by default, and Ubuntu 14.04 LTS aka trusty if you specify dist: trusty. According to travis-ci/travis-ci#5821, Ubuntu 16.04 LTS aka xenial is unlikely to be available this year, and Travis recommends to use Docker.
LLVM 3.7 binary for 12.04 and 14.04 is not available from ubuntu.com, that's why we used llvm.org. But LLVM 3.7 binary for 16.04 is available from ubuntu.com, and we can use Docker to run on 16.04.
Fix#34009.
Rewrite variadic-ffi pass to use test helper
The sprintf used in this test previously isn’t available on some versions of MSVC.
Fixes#32305
r? @alexcrichton
Hopefully this pacifies the 32bit windows. Apparently there’s an ABI out there that not only allows
non-64 bit variadic arguments, but also has differing ABI for them!
Good thing all variadic functions are unsafe.
The only applies to pthread mutexes. We solve this by creating the
mutex with the PTHREAD_MUTEX_NORMAL type, which guarantees that
re-locking from the same thread will deadlock.
Fix a few links in the book
Links to directories and direct links to doc.rust-lang.org don't work properly
when viewing the docs offline so fix them.
r? @steveklabnik
Restore original meaning of std::fs::read_dir's example changed in #33958
`DirEntry.file_type().is_dir()` will not follow symlinks, but the original example (`fs::metadata(&path).is_dir()`) does. Therefore the change in #33958 introduced a subtle difference that now it won't enter linked folders. To preserve the same behavior, we use `Path::is_dir()` instead, which does follow symlink.
(See discussion in the previous PR for detail.)
Implement split_off for BTreeMap and BTreeSet (RFC 509)
Fixes#19986 and refactors common with append methods.
It splits the tree with O(log n) operations and then calculates sizes by traversing the lower one.
CC @gereeter